60{
62 unsigned long blength;
63 int num_buckets;
64 const char *profstr[2] = { "PAPI_PROFIL_POSIX", "PAPI_PROFIL_INST_EAR" };
65 int profflags[2] =
67 int num_profs;
68
70
71 num_profs = sizeof ( profflags ) / sizeof ( int );
73 blength =
prof_size( plength, scale, bucket, &num_buckets );
75
76 for (
i = 0;
i < num_profs;
i++ ) {
78 printf(
"Test type : \t%s\n", profstr[
i] );
79
82 profflags[
i] | bucket ) ) !=
PAPI_OK ) {
84 }
87
89
92
95 printf(
TAB1,
"PAPI_TOT_CYC:", (
values[1] )[1] );
96 }
101 }
102
104 "address\t\t\tPOSIX\tINST_DEAR\n" );
106
108
109 for (
i = 0;
i < num_profs;
i++ ) {
111 }
112
114}
Generate a histogram of hardware counter overflows vs. PC addresses.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
char event_name[2][PAPI_MAX_STR_LEN]
static void ear_no_profile(void)
#define PAPI_PROFIL_POSIX
#define PAPI_PROFIL_INST_EAR
static long long values[NUM_EVENTS]
static struct timeval start
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
int prof_check(int n, int bucket, int num_buckets)
void prof_head(unsigned long blength, int bucket, int num_buckets, const char *header)
unsigned long prof_size(unsigned long plength, unsigned scale, int bucket, int *num_buckets)
void prof_alloc(int num, unsigned long blength)
void prof_out(vptr_t start, int n, int bucket, int num_buckets, unsigned int scale)