Changes between Version 4 and Version 5 of PAPI
- Timestamp:
- 01/11/07 07:20:09 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PAPI
v4 v5 1 1 = Measuring program performance using CPU events = 2 2 3 The GHC runtime has been extended to support the use of the PAPIlibrary to count occurrences of CPU events such as cache misses and branch mispredictions. The PAPI extension separates the events occurring in the garbage collector and mutator code for more accurate pinpointing of performance problems.3 The GHC runtime has been extended to support the use of the [http://icl.cs.utk.edu/papi/ PAPI] library to count occurrences of CPU events such as cache misses and branch mispredictions. The PAPI extension separates the events occurring in the garbage collector and mutator code for more accurate pinpointing of performance problems. 4 4 5 5 This page describes how to compile the RTS with PAPI enabled and explains the RTS options for CPU event selection. This page also contains patches to collect CPU event information in nofib runs and to allow their comparison using nofib-analyse. This is especially useful to measure the effects of optimisations accross a whole range of programs systematically. 6 6 7 = Status of the implementation = 8 9 GHC with PAPI support should compile on any platform where PAPI is installed. It should also be possible to monitor the cache miss events of a ghc compiled program. 10 11 At present, the monitoring of branch mispredictions and stalled cycles is AMD Opteron specific. In the case of branch mispredictions, the portable PAPI API only monitors conditional jumps. We would like to monitor all jumps, especially indirect jumps, that is why we used a native AMD PAPI counter. For strange reasons, the PAPI conditional jump counter maps to the native counter we are using, but we cannot rely on this behaviour on other platforms, so we use the native counter anyway. 12 7 13 = Compiling and running programs with PAPI = 8 14 9 to do 15 First of all, make sure that you have installed the [http://icl.cs.utk.edu/papi/ PAPI library]. 16 17 Follow the instructions in [wiki:Building/Hacking] and add the following line to {{{build.mk}}} before compiling the RTS: 18 {{{ 19 GhcRtsWithPapi = YES 20 }}} 21 22 Now, to monitor and report level 1 cache misses, invoke a program compiled by ghc as follows: 23 {{{ 24 ./program +RTS -sstderr -a1 -RTS 25 }}} 26 The help screen provides options to monitor more events: 27 {{{ 28 ./program +RTS -h -RTS 29 }}} 10 30 11 31 = Using PAPI with the nofib benchmarking suite =
