43{
45 unsigned long blength;
46 int num_buckets;
47
48 const char *profstr[5] = { "PAPI_PROFIL_POSIX",
49 "PAPI_PROFIL_RANDOM",
50 "PAPI_PROFIL_WEIGHTED",
51 "PAPI_PROFIL_COMPRESS",
52 "PAPI_PROFIL_<all>"
53 };
54
61 };
62
64 blength =
prof_size( plength, scale, bucket, &num_buckets );
66
67 for (
i = 0;
i < 5;
i++ ) {
69 printf(
"Test type : \t%s\n", profstr[
i] );
70 }
71
72#ifndef SWPROFILE
76 profflags[
i] | bucket ) ) !=
PAPI_OK ) {
78 char warning[BUFSIZ];
79
80 sprintf(warning,"PAPI_profil %s not supported",
82 test_warn( __FILE__, __LINE__, warning, 1 );
83 }
84 else {
86 }
87 }
88#else
95 }
96#endif
97
99 break;
100
103
104 do_flops( getenv(
"NUM_FLOPS" ) ? atoi( getenv(
"NUM_FLOPS" ) ) :
106
109
112 printf(
TAB1,
"PAPI_TOT_CYC", (
values[1] )[1] );
113 }
119 }
120 }
121
124 "address\t\t\tflat\trandom\tweight\tcomprs\tall\n" );
127 }
128
129 for (
i = 0;
i < 5;
i++ ) {
131 }
132
134}
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]
#define PAPI_PROFIL_WEIGHTED
#define PAPI_PROFIL_POSIX
#define PAPI_PROFIL_FORCE_SW
#define PAPI_PROFIL_COMPRESS
#define PAPI_PROFIL_RANDOM
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)
void test_warn(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)
void do_no_profile(int quiet)