Related Reading

Performance speed ups

Use the data in hwpmc(4) logs to intelligently reorder executables. For example, we could:

Group 'hot' functions into contiguous virtual addresses to minimize the usage of physical memory.

Order functions to improve startup time for executables.

We could have 'soft' PMCs (see PmcTools/PmcKinds) that 'sample' on page faults, in addition to samples from true PMCs.

Drive 'cc -pg' profiles from PMC hardware

This is an extension of existing profiling infrastructure. In it we integrate conventional profiling (timer based profiling) with a 'clock' derived from the PMC sampling interrupt. We'd change monitor() to allocate a PMC if a specific environment variable is present.

PMCs and Scheduling

Use PMC-based measurements to drive scheduling decisions. For example, measuring cache activity at the end of a CPU slice could help us measure how 'cold' the cache has become w.r.t., other processes.

PMC driven static analysis of code

Use static analysis and data from CPU cache behaviour to identify areas of code where we could reduce cache thrashing and improve cache locality.