lucko / spark

A performance profiler for Minecraft clients, servers, and proxies.
https://spark.lucko.me/
GNU General Public License v3.0
1.05k stars 144 forks source link

A way to filter out sleeping time #367

Open ghost opened 1 year ago

ghost commented 1 year ago

Description

Hello, it would be nice to see how much actual cpu active time is spent by each thread, as in, not sleeping, a way to filter out wait/sleep calls would be nice, for example:

java.lang.Object.wait() jdk.internal.misc.Unsafe.park() java.util.concurrent.TimeUnit.sleep() libpthread-2.31.so.__pthread_cond_timedwait() java.util.concurrent.locks.LockSupport.park() java.util.concurrent.locks.Condition.await() etc.

Proposed Behaviour

A button in the spark web GUI to filter out certain methods from the tree, like the search bar but in reverse

Extra Details

No response

himekifee commented 1 month ago

I believe this is also relevant for MCMT mod where ticks are run in parallel causing a lot of CPU time waiting on locks. I wonder if there is a way to filter out things like java.util.concurrent.Phaser.arriveAndAwaitAdvance(), java.util.concurrent.ThreadPoolExecutor.getTask() etc which is basically waiting for other threads.