91 test_fail( __FILE__, __LINE__,
"PAPI_get_component_info", 0 );
93 if ( cmpinfo->
attach == 0 )
94 test_skip( __FILE__, __LINE__,
"Platform does not support attaching",
99 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 0 );
112 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component",
123 if (!
quiet) printf(
"Problem adding PAPI_TOT_CYC\n");
151 if (!
quiet) printf(
"Debugger exited wait() with %d\n",child );
154 if (!
quiet) printf(
"Child has stopped due to signal %d (%s)\n",
157 if (WIFSIGNALED(
status ))
159 if (!
quiet) printf(
"Child %ld received signal %d (%s)\n",
169 if (!
quiet) printf(
"Continuing\n");
170 #if defined(__FreeBSD__) 171 if ( ptrace( PT_CONTINUE,
pid, (
caddr_t) 1, 0 ) == -1 ) {
173 if ( ptrace( PTRACE_CONT,
pid, NULL, NULL ) == -1 ) {
175 perror(
"ptrace(PTRACE_CONT)" );
182 if (!
quiet) printf(
"Debugger exited wait() with %d\n", child);
185 if (!
quiet) printf(
"Child has stopped due to signal %d (%s)\n",
188 if (WIFSIGNALED(
status ))
190 if (!
quiet) printf(
"Child %ld received signal %d (%s)\n",
194 }
while (!WIFEXITED(
status ));
196 if (!
quiet) printf(
"Child exited with value %d\n",WEXITSTATUS(
status));
197 if (WEXITSTATUS(
status) != 0) {
221 printf(
"Test case: 3rd party attach start, stop.\n" );
222 printf(
"-----------------------------------------------\n" );
226 printf(
"Default granularity is: %d (%s)\n",
tmp,
228 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS );
229 printf(
"-------------------------------------------------------------------------\n" );
231 printf(
"Test type : \t 1\n" );
233 printf(
TAB1,
"PAPI_TOT_CYC : \t", (
values[0] )[0] );
237 printf(
TAB1,
"Virt usec : \t", elapsed_virt_us );
238 printf(
TAB1,
"Virt cycles : \t", elapsed_virt_cyc );
240 printf(
"-------------------------------------------------------------------------\n" );
242 printf(
"Verification: none\n" );
char event_name[2][PAPI_MAX_STR_LEN]
int PAPI_stop(int EventSet, long long *values)
const PAPI_component_info_t * PAPI_get_component_info(int cidx)
void test_pass(const char *filename)
int PAPI_add_event(int EventSet, int EventCode)
long long PAPI_get_virt_usec(void)
static int wait_for_attach_and_loop(void)
char * stringify_granularity(int granularity)
long long PAPI_get_virt_cyc(void)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_add_named_event(int EventSet, const char *EventName)
int PAPI_library_init(int version)
char * stringify_all_domains(int domains)
unsigned int attach_must_ptrace
int PAPI_get_opt(int option, PAPI_option_t *ptr)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_assign_eventset_component(int EventSet, int cidx)
int PAPI_create_eventset(int *EventSet)
long long PAPI_get_real_usec(void)
char * PAPI_strerror(int errorCode)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_destroy_eventset(int *EventSet)
int PAPI_attach(int EventSet, unsigned long tid)
long long PAPI_get_real_cyc(void)
int PAPI_start(int EventSet)
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
static long long values[NUM_EVENTS]
long long ** allocate_test_space(int num_tests, int num_events)
static const PAPI_hw_info_t * hw_info