Add support for collecting PAPI native events
authordmp@rice.edu <unknown>
Tue, 22 Jun 2010 19:59:53 +0000 (19:59 +0000)
committerdmp@rice.edu <unknown>
Tue, 22 Jun 2010 19:59:53 +0000 (19:59 +0000)
commitd4942f78fc3cce355d340b7bba0b42e4123103fa
tree2913764572587c71822d04d74bead2aec3c86a9b
parentcec00a4113d5b3079308b11f5e257c25908f9b37
Add support for collecting PAPI native events

This patch extends the PAPI support in the RTS to allow collection of native
events. PAPI can collect data for native events that are exposed by the
hardware beyond the PAPI present events. The native events supported on your
hardware can found by using the papi_native_avail tool.

The RTS already allows users to specify PAPI preset events from the command
line. This patch extends that support to allow users to specify native events.
The changes needed are:

1) New option (#) for the RTS PAPI flag for native events. For example, to
   collect the native event 0x40000000, use ./a.out +RTS -a#0x40000000 -sstderr

2) Update the PAPI_FLAGS struct to store whether the user specified event is a
   papi preset or a native event

3) Update init_countable_events function to add the native events after parsing
   the event code and decoding the name using PAPI_event_code_to_name
includes/rts/Flags.h
rts/Papi.c
rts/RtsFlags.c