|
PAPI
5.0.1.0
|

Go to the source code of this file.
Data Structures | |
| struct | PPC64_register_t |
| struct | PPC64_groups_t |
| struct | native_event_entry_t |
| struct | PPC64_native_map_t |
Defines | |
| #define | GROUP_INTS 8 |
| #define | PAPI_MAX_NATIVE_EVENTS 1024 |
| #define | MAX_GROUPS (GROUP_INTS * 32) |
Typedefs | |
| typedef PPC64_register_t | hwd_register_t |
| typedef PPC64_groups_t | hwd_groups_t |
Functions | |
| int | check_native_name () |
Variables | |
| native_event_entry_t | native_table [1024] |
| hwd_pminfo_t | pminfo |
| pm_groups_info_t | pmgroups |
| PPC64_native_map_t | native_name_map [1024] |
| hwd_groups_t | group_map [(8 *32)] |
| #define GROUP_INTS 8 |
Definition at line 16 of file ppc64_events.h.
| #define MAX_GROUPS (GROUP_INTS * 32) |
Definition at line 24 of file ppc64_events.h.
| #define PAPI_MAX_NATIVE_EVENTS 1024 |
Definition at line 22 of file ppc64_events.h.
| typedef PPC64_groups_t hwd_groups_t |
Definition at line 56 of file ppc64_events.h.
| typedef PPC64_register_t hwd_register_t |
Definition at line 40 of file ppc64_events.h.
| int check_native_name | ( | ) |
Definition at line 168 of file ppc64_events.c.
{
enum native_name foo;
int itemCount = 0;
int i;
/* This should ensure that the cardinality of native_name is the same
as that of native_name_map which may be true iff native_name
expresses the same data as native_name_map and there is a 1:1
mapping from one onto the other, though there is no guarantee of
order. */
if ( ( NATNAME_GUARD - PAPI_NATIVE_MASK ) != MAX_NATNAME_MAP_INDEX ) {
SUBDBG( "%i is the number of elements apparently in native_name, "
"but really should be %i, according to native_name_map.\n",
( NATNAME_GUARD - PAPI_NATIVE_MASK ), MAX_NATNAME_MAP_INDEX );
PAPIERROR
( "Inconsistent cardinality between native_name and native_name_map "
"detected in preliminary check\n" );
return PAPI_EBUG;
}
/* The following is sanity checking only. It attempts to verify some level
of consistency between native_name and native_name_map and native_table.
This should imply that native_name is a subset of native_name_map. */
for ( foo = PAPI_NATIVE_MASK; foo < NATNAME_GUARD; foo++ ) {
for ( i = 0; i < MAX_NATNAME_MAP_INDEX; i++ ) {
/* Now, if the event we are on is the native event we seek... */
if ( ( native_name_map[i].index | PAPI_NATIVE_MASK ) == foo ) {
itemCount++;
break;
}
}
}
if ( itemCount != MAX_NATNAME_MAP_INDEX ) {
SUBDBG( "Inconsistency between native_name_map and native_name. "
"%i events matched, but really should be %i\n", itemCount,
MAX_NATNAME_MAP_INDEX );
PAPIERROR
( "Inconsistent cardinality between native_name and native_name_map\n" );
return PAPI_EBUG;
}
return PAPI_OK;
}


| hwd_groups_t group_map[(8 *32)] |