This is an old revision of the document!
-– Work in progress —
Where: http://gitorious.org/~fabient/freebsd/fabient-sandbox/commits/work/hwpmc_plugin
PmcTools Kcachegrind support allow full inspection of pmc capture under Kcachegrind (kde4sdk).
Sample command:
pmcstat -Sinstructions -O/tmp/pmctest.bin ~/pmctest/prog/pmctest 1000
pmcstat -R/tmp/pmctest.bin -F/tmp/pmctest.cg
/usr/local/kde4/bin/kcachegrind /tmp/pmctest.cg
Tips:
- you can add formula to the file or with the editor in kcachegrind
- “event: Sum = INST_RETIRED.ANY0 + INST_RETIRED.ANY1” (Sum of 2 core)
- “event: CPI = CPU_CLK_UNHALTED.CORE0 / INST_RETIRED.ANY0” (Clocks per Instructions Retired)
- call count is actually roughly estimated by detecting when two consecutive sample hit with a distance > 1
Sample output for graph view:
Sample output for source view (C+asm):
Sample output for full frame capture:


