hotspot icon indicating copy to clipboard operation
hotspot copied to clipboard

Warn when lots of call stacks are broken

Open tmcguire opened this issue 6 years ago • 3 comments

Often backtraces are broken, for example because of missing debug symbols or because the call stack size that was recorded is too small. In the top-down and in the flame graph, broken backtraces manifest in top-level entries. If lots of backtraces are broken, these views become very inaccurate, as the top-level entries are misattributed and should be attributed to other places.

If such a situation happens, it would be nice to prominently display a warning to the user. Maybe only if >XX% of backtraces are incomplete. Some random ideas:

  • Visually indicate broken backtraces in those views, for example by color or with a warning icon
  • Give an explanation in the tooltip of the function
  • Give suggestions on how to fix the problem ("Install debug symbols for libxyz.so", "Increase call stack size when recording"). This requires detecting the cause of the failed unwinding.
  • Mention this prominently in the summary page

tmcguire avatar Feb 05 '18 16:02 tmcguire

I consider myself an advanced user, and yet it took me a while to realize that my results were wrong because my call stack size was too small. I suspect novice users are completely lost in these kind of situations and don't even realize the problem.

tmcguire avatar Feb 05 '18 16:02 tmcguire

The problem will be how to figure out that a call stack is broken. I don't know yet how we can reliable figure that out...

Otherwise I agree that this would be a very useful addition.

milianw avatar Feb 07 '18 19:02 milianw

Well, in theory:

  • The kernel should know if the whole stack or only parts of it was copied, as it knows the stack size. That information would need to be propagated all the way to Hotspot.
  • libunwind should be able to know that getting to the next stack frame fails because of missing debug symbols. Again that info would need to be propagated to Hotspot.

tmcguire avatar Feb 08 '18 09:02 tmcguire