This is an old revision of the document!


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:

  • pmctools/pmckcachegrind.1265929552.txt.gz
  • Last modified: 2010/02/11 23:05
  • by FabienThomas