openresty/openresty-systemtap-toolkit

question about sample-bt-off-cpu

qqibrow opened this issue · 4 comments

Hi, Yichun

I tried your sample-bt-off-cpu to track the latency of my program. Is there a way to track only only one thread rather than the whole process? Another question is that my output has a lot of warnings like:

WARNING: Missing unwind data for module, ...
WARNING: Missing unwind data for module, rerun with 'stap -d XXX'
WARNING: Missing unwind data for module, rerun with 'stap -d XXX'
WARNING: Missing unwind data for module, rerun with 'stap -d XXX'

and my final result contains a lot of init method form glibc, not many from my own libraries. What if I only want show analysis about my own libraries?

Thank you very much!

@qqibrow Regarding tracing a single thread instead of a whole process, yes, it's possible to implement an option for that tool to specify the thread ID instead of the process ID. I think you can just use the tid() tapset function for that:

https://sourceware.org/systemtap/tapsets/API-tid.html

Patches welcome :)

Cool! I will investigate on that. Another question is in the graph, why my functions are all mangled symbol ?

@qqibrow Do you mean C++ mangled symbols? If yes, you need to use the c++filt tool to postprocess the output.

Yeah. I got it. Thank you!