I'm a bit confused about some details of the CPU Sampling and Thread Dump results.
I always thought that I can see waiting threads also in the CPU samples as I can often see some Methodcalls of wait() in the traces.
But when we tried to analyse some problems with stuck threads in a jboss environment the thread dump shows more threads than a CPU sample which ran for 2 minutes and also during the time the thread dump was taken.
Is it possible that I can only see those threads which were actually calling the wait() method during the sample but not for those which were just waiting the whole period of sampling?
Solved! Go to Solution.
one quick question upfront: are you referring to Classic Agents or OneAgents?
currently I can't think of a good reason for missing threads during CPU sampling apart from some maximum thread limits that we might have in the Agents (specifically OneAgent).
CPU sampling should always query all the stacktraces from the JVM itself, so there shouldn't be any missing.
can you provide us such an example with both CPU sampling and thread dump where you experience missing threads? that would be great!
Please also note that native threads with no java stack frames, will never be seen in a CPU sampling.
Also consider unchecking the option "only active" to see all threads in the CPU sampling dashlet.