Is here good documentation/tutorial about user-level profiling with `pmcstat'
Lev Serebryakov
lev at FreeBSD.org
Fri Jan 29 10:35:37 UTC 2021
I'm trying to use `pmcstat' to profile my userland (single threaded) program.
And I can not find good instructions about how to use it.
What event should I use for simple CPU profile? Is it cpu_clk_unhalted.thread or inst_retired.any or anything else?
How to provide symbols from `/usr/lib/debug' to `pmcstat'? I've tried `pmcstat -R' but it doesn't see any function names outside my program:
# pmcstat -R out-3.pmcstat -z100 -G out-3.stacks
CONVERSION STATISTICS:
#exec/elf 1
#samples/total 248539181
#samples/unknown-function 43228216
#callchain/dubious-frames 132121
#
How could I filter-our kernel stacks? I don't need them (now) and they take a lot of space on flame graph.
How could I drill-down to source-line-level (from per-function level) for some functions which take most of time?
I've tried to Google but could not find any good documentation and `man pmcstat' is very terse.
Thank you.
--
// Lev Serebryakov
More information about the freebsd-hackers
mailing list