====== Related Work ====== Links to reported research and other open-source projects using CPU PMCs: ===== Academic Research ===== * [[http://citeseer.ist.psu.edu/ammons97exploiting.html|Exploiting Hardware Performance Counters with Flow and Context Sensitive Profiling]], Glenn Ammons, Thomas Ball, James R. Larus, 1997.\\ This is the paper that got me thinking about building a next-generation profiling system for %%FreeBSD%%. ===== Open-Source Tools ===== ==== Linux ==== Under Linux there are three projects that use in-CPU performance counters for performance measurements: * [[http://www.csd.uu.se/~mikpe/linux/perfctr/|Perfctr]]\\ A driver for Linux kernels that provides per-process "virtual" hardware performance counters. It is distributed in the form of a source patch. * [[http://oprofile.sourceforge.net/|Oprofile]]\\ A Linux kernel driver that does "whole system" profiling using hardware performance counters. Oprofile does not support using PMCs for simple counting or for process-specific sampling. It is however present in most Linux-based distributions. * [[http://perfmon2.sourceforge.net/|Perfmon2]]\\ Perfmon2 is the Linux kernel profiling & performance measurement framework that comes the closest to [[/PmcTools|PmcTools]] in terms of features. It supports process-mode and system-wide modes of operation and can do profiling as well as counting. Perfmon2 has support for callgraphs (which **hwpmc(4)** doesn't do yet), but does not do remote profiling. It also doesn't appear to do cross-architecture profiles.\\ Perfmon2 is distributed in the form of a patch. There is also an additional older project: [[http://www.scl.ameslab.gov/Projects/Rabbit/|Rabbit]], from the AMES Lab. ==== NetBSD ==== %%NetBSD%%'s implementation of a PMC API: %%NetBSD%%/pmc(3): ''%%http://www.daemon-systems.org/man/pmc.9.html %%'' (This link is broken). Possible link from archive.org: https://web.archive.org/web/20180218094454/https://www.daemon-systems.org/man/pmc.9.html ==== Solaris ==== Solaris™ has a ''%%CDC(3EXT)%%'' API for accessing CPU performance counters. It supports the CPUs that Solaris™ runs on. ==== Other Tools ==== These tools use build over the lower layers and provide visualization and easy to use interfaces: * [[http://prospect.sourceforge.net/|Prospect]]\\ Measurement tools for Linux that use the Oprofile driver. * [[http://icl.cs.utk.edu/papi/|PAPI]]\\ A cross platform open-source API for performance measurement. See: * [[http://www.cs.utk.edu/~mucci/latest/pubs/ICPDCS2001-papi_end_user.pdf|End-user Tools for Application Performance Analysis Using Hardware Counters]], K. London, J. Dongarra, S. Moore, P. Mucci, K. Seymour, T. Spencer, 2001.\\ Short descriptions of PAPI-based tools that represent performance information graphically. * [[http://citeseer.ist.psu.edu/397493.html|A Scalable Cross-Platform Infrastructure for Application Performance Tuning Using Hardware Counters]], S. Browne, J. Dongarra, N. Garner, K. London, P. Mucci, 2000.\\ An introduction to PAPI. * [[http://citeseer.ist.psu.edu/derose98svpablo.html|SvPablo: A Multi-Language Performance Analysis System]], Luiz De Rose, Ying Zhang, Daniel A. Reed, 1998.\\ A language independent performance analysis and visualization system. * [[http://www.dyninst.org/|DynInst]]\\ An API for patching running binaries. Useful for adding performance monitoring instrumentation to running applications. See: * [[http://citeseer.ist.psu.edu/miller95paradyn.html|The Paradyn Parallel Performance Measurement Tools]], Barton P. Miller Mark D. Callaghan Jonathan M. Cargille Jeffrey K...., 1995. * [[http://kprof.sourceforge.net/|KProf]]\\ A profile data visualization tool based on KDE.