brendangregg/FlameGraph

Not aggregating stacks for threads

mux opened this issue · 3 comments

mux commented

I have an application with multiple worker threads that share the same entry point. If the threads have different names, I can see traces for individual threads. If they share the same name, they are aggregated. Is there a way to get non-aggregated flamegraphs even when the threads have the same name?

It depends on the tool you are using. For example when using stackcollapse-jstack.pl, the --include-tid can be used to include a thread ID.

mux commented

I am using perf, and haven't seen any such option in the stackcollapse-perf.pl utility.

I guess, the --tid flag should do the trick:

--tid # include TID and PID with process names [1]