19 main(
int argc,
char **argv )
22 unsigned long length, blength;
23 int num_buckets, mask;
39 test_fail( __FILE__, __LINE__,
"PAPI_get_executable_info", 1 );
49 if (!
quiet) printf(
"No events could be added\n");
50 test_skip( __FILE__, __LINE__,
"No FP or Total Ins. event", 1 );
54 test_fail( __FILE__, __LINE__,
"Profile length < 0!", 0 );
58 prof_print_address(
"Test case profile: POSIX compatible profiling with two events.\n",
70 printf(
"Test type : \tPAPI_PROFIL_POSIX\n" );
96 printf(
TAB1,
"PAPI_TOT_CYC:", (
values[1] )[1] );
110 sprintf( title,
" \t\t %s\tPAPI_TOT_CYC\naddress\t\t\tcounts\tcounts\n",
122 for (
i = 0;
i < 2;
i++ ) {
127 test_fail( __FILE__, __LINE__,
"No information in buffers", 1 );
char event_name[2][PAPI_MAX_STR_LEN]
int PAPI_stop(int EventSet, long long *values)
void test_pass(const char *filename)
#define PAPI_PROFIL_BUCKET_16
get the executable's info
#define PAPI_PROFIL_POSIX
static struct timeval start
Return codes and api definitions.
void test_skip(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_library_init(int version)
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)
const PAPI_exe_info_t * PAPI_get_executable_info(void)
PAPI_address_map_t address_info
int main(int argc, char **argv)
void prof_head(unsigned long blength, int bucket, int num_buckets, const char *header)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
void prof_print_address(const char *title, const PAPI_exe_info_t *prginfo)
void prof_print_prof_info(caddr_t start, caddr_t end, int threshold, char *event_name)
void do_no_profile(int quiet)
int prof_check(int n, int bucket, int num_buckets)
int prof_events(int num_tests)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
int remove_test_events(int *EventSet, int mask)
void prof_alloc(int num, unsigned long blength)