52 printf(
"Test type : \tNo profiling\n" );
54 printf(
TAB1,
"PAPI_TOT_CYC:", (
values[0] )[1] );
62 unsigned long blength;
64 const char *profstr[2] = {
"PAPI_PROFIL_POSIX",
"PAPI_PROFIL_INST_EAR" };
71 num_profs =
sizeof ( profflags ) /
sizeof (
int );
73 blength =
prof_size( plength, scale, bucket, &num_buckets );
76 for (
i = 0;
i < num_profs;
i++ ) {
78 printf(
"Test type : \t%s\n", profstr[
i] );
82 profflags[
i] | bucket ) ) !=
PAPI_OK ) {
95 printf(
TAB1,
"PAPI_TOT_CYC:", (
values[1] )[1] );
104 "address\t\t\tPOSIX\tINST_DEAR\n" );
109 for (
i = 0;
i < num_profs;
i++ ) {
137 test_fail( __FILE__, __LINE__,
"PAPI_get_executable_info", 1 );
141 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 0 );
145 strlen(
"Itanium" ) ) != 0 ) &&
147 strlen(
"32" ) ) != 0 ) ) {
148 if (!
quiet) printf(
"Itanium only for now.\n");
182 (
"Test earprofile: POSIX compatible event address register profiling.\n",
193 test_fail( __FILE__, __LINE__,
"Can't remove events", retval2 );
198 test_fail( __FILE__, __LINE__,
"No information in buffers", 1 );
static const PAPI_hw_info_t * hw_info
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Convert a name to a numeric hardware event code.
Get the executable's address space info.
get information about the system hardware
initialize the PAPI library.
Generate a histogram of hardware counter overflows vs. PC addresses.
removes a hardware event from a PAPI event set.
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)
static int do_profile(vptr_t start, unsigned long plength, unsigned scale, int thresh, int bucket)
#define PAPI_PROFIL_POSIX
#define PAPI_PROFIL_BUCKET_16
#define PAPI_PROFIL_INST_EAR
static long long values[NUM_EVENTS]
static struct timeval start
Return codes and api definitions.
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
long long ** allocate_test_space(int num_tests, int num_events)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(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)
void prof_print_prof_info(vptr_t start, vptr_t end, int threshold, char *event_name)
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 prof_print_address(const char *title, const PAPI_exe_info_t *prginfo)
get the executable's info
PAPI_address_map_t address_info
char model_string[PAPI_MAX_STR_LEN]