PACMAN is written in C++ and provides a simple interface to access the
performance monitor counters available on the Intel Pentium 4
processor. It is built on top of the Perfctr interface. One notable
feature of the library is that it handles to collection of events on
both contexts of Hyperthreaded processors in per-thread mode, which is
something not provided in other similar libraries. Using per-thread
collection and running a thread on the second context requires a
modification to the Perfctr library to remove restrictions (please
email for directions). However, PACMAN works correctly with unaltered
Perfctr for one thread executing on the first execution context of a
CPU (or on a non-HT CPU) or for global mode collection. Because the library simply provides
an interface to the P4 counters, the same P4 architectural limitations
apply (
see P4 System Programming Guide). We have provided sample source code
files to give examples of how to use the library.