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
The jdk.ExecutionSample event is used as an approximation of the CPU profiling capability. The profiles based on this event are not directly associated with the spent CPU time but rather the CPU time needs to be inferred from the thread CPU load and number of events emitted per that thread during the period for which the CPU load was calculated.
The results are quite acceptable, in fact. However, there is one small issue there - the execution sampler will handle invalid thread states (states in which the sampler can not reliably and safely walk the stack) by simply ignoring the samples. This, in turn, will skew the statistics and the CPU time heuristic.
Proposal
In order to 'straighten' the statistics the execution sampler should emit sample events even if it can not walk the stack. The event could have an empty stacktrace or a stacktrace with one synthetic frame, perhaps explaining the reason why the stack could not be walked. Either option is fine as it would allow correctly assign the spent CPU time to the collected samples and which will be picked should be based on how easy the current tooling will be able to handle the 'failed' samples without adjusting it too much.
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.
-
Background
The
jdk.ExecutionSampleevent is used as an approximation of the CPU profiling capability. The profiles based on this event are not directly associated with the spent CPU time but rather the CPU time needs to be inferred from the thread CPU load and number of events emitted per that thread during the period for which the CPU load was calculated.The results are quite acceptable, in fact. However, there is one small issue there - the execution sampler will handle invalid thread states (states in which the sampler can not reliably and safely walk the stack) by simply ignoring the samples. This, in turn, will skew the statistics and the CPU time heuristic.
Proposal
In order to 'straighten' the statistics the execution sampler should emit sample events even if it can not walk the stack. The event could have an empty stacktrace or a stacktrace with one synthetic frame, perhaps explaining the reason why the stack could not be walked. Either option is fine as it would allow correctly assign the spent CPU time to the collected samples and which will be picked should be based on how easy the current tooling will be able to handle the 'failed' samples without adjusting it too much.
Beta Was this translation helpful? Give feedback.
All reactions