How to application sample profiling?
Stanislav Sedov
stas at freebsd.org
Wed Aug 26 20:25:36 UTC 2015
> On Aug 23, 2015, at 3:13 PM, Slawa Olhovchenkov <slw at zxy.spb.ru> wrote:
>
> I have multi-thread application fully utilise all CPU cores.
> I am need to determine lines give mostly CPU loads.
> How I can do this?
>
> `pmcstat -P BU_CPU_CLK_UNHALTED -t application_pid -n 500000 -O sample.out`
> consume to many CPU (performance drop x100 times) and mostly show
> himself in kernel and pmc locks and none for application.
> pmcstat -S BU_CPU_CLK_UNHALTED -- same here.
>
Did you try something like `pmcstat -S instructions -T` by any chance?
That should give some quick clues as to which functions are being hot
at least.
Which FreeBSD version are you using by the way?
--
Stanislav Sedov
ST4096-RIPE
More information about the freebsd-hackers
mailing list