Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2014 13:37:24 -0700
From:      Brendan Gregg <brendan.d.gregg@gmail.com>
To:        freebsd-performance@freebsd.org
Subject:   pmcstat -z32 -G truncates callgraph to 8
Message-ID:  <CAE40pdf5AzR4tuGZUQugoK6jfbvd_dLLBtdfv2FPQYY3Lb5PrA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE40pdf5AzR4tuGZUQugoK6jfbvd_dLLBtdfv2FPQYY3Lb5PrA>