[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Is here good documentation/tutorial about user-level profiling with `pmcstat'
From:       Lev Serebryakov <lev () FreeBSD ! org>
Date:       2021-01-29 10:35:35
Message-ID: 602f671d-683d-d291-c8d2-f01526eca34b () FreeBSD ! org
[Download RAW message or body]


  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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic