Go to the source code of this file.
◆ NUM_EVENTS
◆ NUM_PTHREADS
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 77 of file smoke_tests/threads.c.
78{
82 void* retval2;
83
84
88 exit(EXIT_FAILURE);
89 } else {
90 printf ( "PAPI_VERSION : %4d %6d %7d\n",
94 }
95
99 exit(EXIT_FAILURE);
100 }
101
106 printf(
"ERROR: pthread_create: %d\n",
retval );
107 exit(EXIT_FAILURE);
108 }
109 }
110
112 printf(
"Trying to join with tid %d\n",
i);
113 retval = pthread_join(tids[
i], &retval2);
115 printf(
"ERROR: pthread_join: %d\n",
retval );
116 exit(EXIT_FAILURE);
117 } else {
118 printf(
"Joined with tid %d\n",
i);
119 }
120 }
121
123 return EXIT_SUCCESS;
124}
initialize the PAPI library.
Finish using PAPI and free all related resources.
Returns a string describing the PAPI error code.
Initialize thread support in the PAPI library.
#define PAPI_VERSION_REVISION(x)
#define PAPI_VERSION_MAJOR(x)
#define PAPI_VERSION_MINOR(x)
unsigned long int pthread_t
◆ Thread()
| void * Thread |
( |
void * |
arg | ) |
|
Definition at line 10 of file smoke_tests/threads.c.
11{
16 char *EventName[] = { "PAPI_TOT_CYC", "PAPI_TOT_INS" };
17
20
24 exit(EXIT_FAILURE);
25 }
26
31 exit(EXIT_FAILURE);
32 }
33 }
34
38 exit(EXIT_FAILURE);
39 }
40
44 exit(EXIT_FAILURE);
45 }
46
50 exit(EXIT_FAILURE);
51 }
52
53
54 sleep(3);
55
59 exit(EXIT_FAILURE);
60 }
61
63 printf(
"%12lld \t\t --> %s (thread %d) \n",
values[
i],
65 }
66
70 exit(EXIT_FAILURE);
71 }
72
73 return 0;
74}
add multiple PAPI presets or native hardware events to an event set
Create a new empty PAPI EventSet.
Convert a name to a numeric hardware event code.
Notify PAPI that a thread has 'appeared'.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
Notify PAPI that a thread has 'disappeared'.
char events[MAX_EVENTS][BUFSIZ]
static long long values[NUM_EVENTS]