This is an old revision of the document!
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:
- 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.
- 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).
- Implement code to capture callgraphs inside the hwpmc(4) driver. Doing this for kernel code (walking a kernel stack) appears to be doable. Taking a stack backtrace of userland processes is something that needs to thought about (the best point for a userland stack trace appears to be when the process is exiting the kernel).
Near Future
Stuff that needs to be done in the near future:
- Implement a proper test suite for hwpmc(4) and libpmc(3). Since hwpmc(4) can log data remotely, I looked around for a test framework that can manage distributed test cases. I found TET 3.7, which I'm happy with.
- Bugs reported in PmcTools/KnownBugs need to be fixed.
For longer term work, please see PmcTools/PmcResearch.