You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some scenarios, you only want to sample specific threads rather than the whole application. While it is possible to filter samples afterwards for the threads you're interested in, this can skew the results, especially if the number of threads fluctuates. That also makes it more difficult to compare results.
It also makes the results less precise. If you have 10 running threads and you're only interested in the data of one thread, you have to throw away 90% of the samples. You can try to counter that with lower sampling intervals, but that will add overhead and there are limits to that. It will also increase the data collected just to be thrown away.
Async-profiler has the ability to filter threads using the --filter option (or via API), but JFR does not have any equivalent.
Such a feature can be designed in multiple ways, with specific upsides and downsides:
Define all threads to profile by id before starting profiling
Define a glob pattern/regex and select currently running threads based on that
Use a glob pattern/regex to dynamically adjust threads to profile during runtime
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
In some scenarios, you only want to sample specific threads rather than the whole application. While it is possible to filter samples afterwards for the threads you're interested in, this can skew the results, especially if the number of threads fluctuates. That also makes it more difficult to compare results.
It also makes the results less precise. If you have 10 running threads and you're only interested in the data of one thread, you have to throw away 90% of the samples. You can try to counter that with lower sampling intervals, but that will add overhead and there are limits to that. It will also increase the data collected just to be thrown away.
Async-profiler has the ability to filter threads using the
--filteroption (or via API), but JFR does not have any equivalent.Such a feature can be designed in multiple ways, with specific upsides and downsides:
I'd like to hear your thoughts on this
Beta Was this translation helpful? Give feedback.
All reactions