Pmctools: Plan of Work

Current Plan: Callgraph support

Callgraph support requires changes to the kernel to capture a stack at the time of the PMC NMI interrupt. It also requires changes to the userland API (libpmc(3)) and reporting tools (pmcstat(8)).

The current approach of using gprof(1) for the final display of profiling data is suboptimal for analysing callgraphs that span executable modules. pmcstat(8) will need to be enhanced to support callgraphs directly. I'm planning to do this in the following phases:

  1. Implement a cross-platform libelf(3) API. One of my goals is to create a cross-platform performance analysis toolset. Rather than parsing ELF files directly in pmcstat, as most of our other tools do (e.g., gprof, readelf, others), I'd rather use a libelf API for pmcstat and the other tools. See wiki page "LibElf". Status: Completed, and in -current/FreeBSD 7.

  2. Implement cross-module callgraph support in pmcstat. The hwpmc log will contain call graph information that could traverse module boundaries (e.g., calls from an executable into a shared library). Status: completed in Perforce, undergoing community review.

  3. Implement code to capture callgraphs inside the hwpmc(4) driver. Status: completed in Perforce, and undergoing community review.

A patch against recent -CURRENT (Aug 2007) may be found at:

Near Future

Stuff that needs to be done in the near future:

For longer term work, please see PmcTools/PmcResearch.

PmcTools/PlanOfWork (last edited 2008-06-17 21:37:15 by localhost)