FlameGraph icon indicating copy to clipboard operation
FlameGraph copied to clipboard

Loved it - but needed it to work with pstack output

Open lmnca opened this issue 11 years ago • 6 comments

Hi Brendan,

I used your flamegraph scripts and found them great! However my stack samples were in a slightly different format than those supported, as they were produced by repeatedly calling pstack at intervals on a process running a gcc-compiled executable coded in C++. I have the modified version of the script which I am willing to contribute, as well as examples of the stack format if you're interested. Please just let me know.

Regards,

Laurent.

lmnca avatar Nov 15 '13 19:11 lmnca

Hi Laurent,

Could you provide that script? I think this is an invaluable script to use for flame graphs because a lot of people use linux production environments and most of these environments have easy access to pstack.

Thanks, Nick

nromito avatar Jun 30 '15 22:06 nromito

@lmnca could you provide the pstack script?

xen0l avatar May 28 '16 11:05 xen0l

@xen01 pstack is usually in /usr/bin/pstack. In my case it is a link to /usr/bin/gstack. In my company we are using CentOs distros.

lmnca avatar May 30 '16 11:05 lmnca

@lmnca Did you got a solution?

I have accounted a platform that no perf tool works, only pstack can dump function backtrace.

Many thanks ~

yejw5 avatar Sep 20 '22 19:09 yejw5

@lmnca Did you got a solution?

I have accounted a platform that no perf tool works, only pstack can dump function backtrace.

Many thanks ~

I have found stackcollapse-gdb.pl, but it seems that haven't distinguish on/off-cpu?

yejw5 avatar Sep 21 '22 02:09 yejw5

I have found stackcollapse-gdb.pl, but it seems that haven't distinguish on/off-cpu?

Another solution might be to use elfutils stack with stackcollapse-elfutils.pl.

In all three cases, this would include both on-CPU and off-CPU time.

randomstuff avatar Sep 21 '22 09:09 randomstuff