pmcstat -z32 -G truncates callgraph to 8

Brendan Gregg brendan.d.gregg at gmail.com
Mon Oct 27 20:37:45 UTC 2014


G'Day,

I'm using pmcstat to capture call graphs, however, these always seem
truncated to 8 stack frames. Anyone else hit this? Anyone know a fix
or workaround?

Example:

pmcstat -S CPU_CLK_UNHALTED.THREAD_P -z 32 -O out.pmclog
pmstat -R out.pmclog -z 32 -G out.pmc

The problem is that out.pmc never goes deeper than 8 frames, despite
-z 32, and despite PMC_CALLCHAIN_DEPTH_MAX = 32.

I need deeper stacks to generate flame graphs
(https://github.com/brendangregg/FlameGraph), and was trying Ed
Maste's stackcollapse-pmc.pl to do it.

Using pmcstat -F, and bringing up the output in Kcachegrind, shows
that some stacks are indeed deeper than 8 as expected (although it
seems to only work for kernel stacks, and not user-level). I don't
know if Kcachegrind is doing its own workaround, of if the -F output
is deeper than -G (still studying the output formats)...

thanks,

Brendan


More information about the freebsd-performance mailing list