Go to the source code of this file.
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 117 of file zero_fork.c.
118{
119 int flops1;
121
123# if (defined(__ALPHA) && defined(__osf__))
124 test_skip( __FILE__, __LINE__,
"main: fork not supported.", 0 );
125#endif
126
128 printf( "This tests if PAPI_library_init(),2*fork(),PAPI_library_init() works.\n" );
129 }
130
132 flops1 = 1000000;
133 if ( fork( ) == 0 ) {
134
136
138
140 exit( 0 );
141 }
142 flops1 = 2000000;
143 if ( fork( ) == 0 ) {
144
146
148
150 exit( 0 );
151 }
152
153 flops1 = 4000000;
155
156
158
160
161
163
165 return 0;
166}
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
◆ process_fini()
| void process_fini |
( |
void |
| ) |
|
Definition at line 89 of file zero_fork.c.
90{
94 }
95
98
100
102 printf(
"Process %d %-12s : \t%lld\n", (
int ) getpid( ),
event_name,
104 printf( "Process %d PAPI_TOT_CYC : \t%lld\n", ( int ) getpid( ),
106 printf( "Process %d Real usec : \t%lld\n", ( int ) getpid( ),
108 printf( "Process %d Real cycles : \t%lld\n", ( int ) getpid( ),
110 }
111
113
114}
get real time counter value in clock cycles Returns the total real time passed since some arbitrary s...
get real time counter value in microseconds
Stop counting hardware events in an event set.
void free_test_space(long long **values, int num_tests)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
int remove_test_events(int *EventSet, int mask)
char event_name[PAPI_MAX_STR_LEN]
◆ process_init()
| void process_init |
( |
void |
| ) |
|
Definition at line 56 of file zero_fork.c.
57{
58 if (!
TESTS_QUIET) printf(
"Process %d \n", (
int ) getpid( ) );
59
60
64 }
65
66
67
68
69
71
73
77 }
78
81
85 }
86}
Convert a numeric hardware event code to a name.
initialize the PAPI library.
Start counting hardware events in an event set.
long long ** allocate_test_space(int num_tests, int num_events)
int add_two_events(int *num_events, int *papi_event, int *mask)
◆ elapsed_cyc
◆ elapsed_us
◆ event_name
◆ EventSet1
◆ mask1
◆ num_events1
◆ num_tests
◆ PAPI_event
◆ retval
◆ values