45 unsigned long blength;
48 const char *profstr[5] = {
"PAPI_PROFIL_POSIX",
50 "PAPI_PROFIL_WEIGHTED",
51 "PAPI_PROFIL_COMPRESS",
64 blength =
prof_size( plength, scale, bucket, &num_buckets );
67 for (
i = 0;
i < 5;
i++ ) {
69 printf(
"Test type : \t%s\n", profstr[
i] );
76 profflags[
i] | bucket ) ) !=
PAPI_OK ) {
80 sprintf(warning,
"PAPI_profil %s not supported",
82 test_warn( __FILE__, __LINE__, warning, 1 );
112 printf(
TAB1,
"PAPI_TOT_CYC", (
values[1] )[1] );
124 "address\t\t\tflat\trandom\tweight\tcomprs\tall\n" );
129 for (
i = 0;
i < 5;
i++ ) {
char event_name[2][PAPI_MAX_STR_LEN]
int PAPI_stop(int EventSet, long long *values)
#define PAPI_PROFIL_COMPRESS
#define PAPI_PROFIL_POSIX
static struct timeval start
void test_warn(const char *file, int line, const char *call, int retval)
unsigned long prof_size(unsigned long plength, unsigned scale, int bucket, int *num_buckets)
int PAPI_profil(void *buf, unsigned bufsiz, caddr_t offset, unsigned scale, int EventSet, int EventCode, int threshold, int flags)
void prof_out(caddr_t start, int n, int bucket, int num_buckets, unsigned int scale)
#define PAPI_PROFIL_RANDOM
void prof_head(unsigned long blength, int bucket, int num_buckets, const char *header)
void test_fail(const char *file, int line, const char *call, int retval)
void do_no_profile(int quiet)
int prof_check(int n, int bucket, int num_buckets)
#define PAPI_PROFIL_FORCE_SW
#define PAPI_PROFIL_WEIGHTED
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
void prof_alloc(int num, unsigned long blength)