41 unsigned short **
buf = (
unsigned short ** )
profbuf;
42 unsigned long length, blength;
59 test_fail( __FILE__, __LINE__,
"PAPI_get_executable_info", 1 );
69 prof_print_address(
"Test case sprofile: POSIX compatible profiling over multiple regions.\n",
79 sprof[0].
pr_size = (
unsigned int ) blength;
81 #if defined(linux) && defined(__ia64__) 83 fprintf( stderr,
"do_flops is at %p %p\n", &
do_flops, sprof[0].pr_off );
88 sprof[1].
pr_size = (
unsigned int ) blength;
90 #if defined(linux) && defined(__ia64__) 92 fprintf( stderr,
"do_reads is at %p %p\n", &
do_reads, sprof[1].pr_off );
109 if (!
quiet) printf(
"Trouble creating events\n");
136 printf(
"Test case: PAPI_sprofil()\n" );
137 printf(
"---------Buffer 1--------\n" );
138 for (
i = 0;
i < ( int )
length / 2;
i++ ) {
140 printf(
"%#lx\t%d\n",
DO_FLOPS + 2 * (
unsigned long )
i,
143 printf(
"---------Buffer 2--------\n" );
144 for (
i = 0;
i < ( int )
length / 2;
i++ ) {
146 printf(
"%#lx\t%d\n",
DO_READS + 2 * (
unsigned long )
i,
149 printf(
"-------------------------\n" );
150 printf(
"%u samples fell outside the regions.\n", *
buf[2] );
154 for (
i = 0;
i < 3;
i++ ) {
158 test_fail( __FILE__, __LINE__,
"No information in buffers", 1 );
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
int PAPI_sprofil(PAPI_sprofil_t *prof, int profcnt, int EventSet, int EventCode, int threshold, int flags)
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)
const PAPI_exe_info_t * PAPI_get_executable_info(void)
PAPI_address_map_t address_info
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)
int prof_check(int n, int bucket, int num_buckets)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
long long ** allocate_test_space(int num_tests, int num_events)
volatile int buf[CACHE_FLUSH_BUFFER_SIZE_INTS]
int remove_test_events(int *EventSet, int mask)
void prof_alloc(int num, unsigned long blength)
int add_test_events(int *number, int *mask, int allow_derived)