Go to the source code of this file.
◆ MAX_EVENTS
◆ do_cycles()
| static void do_cycles |
( |
int |
program_time | ) |
|
|
static |
Definition at line 95 of file system_overflow.c.
104 for (
x = 1.0;
x < 250000.0;
x += 1.0 )
107 printf(
"==>> SUM IS NEGATIVE !! <<==\n" );
static struct timeval start
int gettimeofday(void *ptr1, void *ptr2)
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 155 of file system_overflow.c.
184 if ( access(
"./burn", X_OK ) == 0 )
186 else if ( access(
"./ctests/burn", X_OK ) == 0 )
188 system(
"./ctests/burn" ) );
static void do_cycles(int program_time)
void test_pass(const char *filename)
static void run(const char *str, int len)
static void my_papi_start(void)
int PAPI_library_init(int version)
static void zero_count(void)
static void print_here(const char *str)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
volatile int buf[CACHE_FLUSH_BUFFER_SIZE_INTS]
◆ my_handler()
| static void my_handler |
( |
int |
EventSet, |
|
|
void * |
pc, |
|
|
long long |
ovec, |
|
|
void * |
context |
|
) |
| |
|
static |
◆ my_papi_start()
| static void my_papi_start |
( |
void |
| ) |
|
|
static |
Definition at line 116 of file system_overflow.c.
123 test_fail(
name, __LINE__,
"PAPI_create_eventset failed", 1 );
127 if (!
TESTS_QUIET) printf(
"Trouble adding event\n");
int PAPI_add_event(int EventSet, int EventCode)
int PAPI_overflow(int EventSet, int EventCode, int threshold, int flags, PAPI_overflow_handler_t handler)
void test_skip(const char *file, int line, const char *call, int retval)
static int Event[MAX_EVENTS]
int PAPI_create_eventset(int *EventSet)
static void my_handler(int EventSet, void *pc, long long ovec, void *context)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_start(int EventSet)
static int Threshold[MAX_EVENTS]
◆ print_here()
| static void print_here |
( |
const char * |
str | ) |
|
|
static |
◆ print_rate()
| static void print_rate |
( |
const char * |
str | ) |
|
|
static |
Definition at line 63 of file system_overflow.c.
65 static int last_count = -1;
67 double st_secs, last_secs;
71 + ( ( double ) ( now.tv_usec -
start.
tv_usec ) ) / 1000000.0;
72 last_secs = ( double ) ( now.tv_sec -
last.
tv_sec )
73 + ( ( double ) ( now.tv_usec -
last.
tv_usec ) ) / 1000000.0;
74 if ( last_secs <= 0.001 )
78 printf(
"[%d] %s, time = %.3f, total = %ld, last = %ld, rate = %.1f/sec\n",
80 ( (
double )
count ) / last_secs );
83 if ( last_count != -1 ) {
84 if (
count < .1 * last_count ) {
89 last_count = ( int )
count;
static struct timeval start
int gettimeofday(void *ptr1, void *ptr2)
void test_fail(const char *file, int line, const char *call, int retval)
static struct timeval start last
◆ run()
| static void run |
( |
const char * |
str, |
|
|
int |
len |
|
) |
| |
|
static |
Definition at line 144 of file system_overflow.c.
148 for ( n = 1; n <= len; n++ ) {
static void do_cycles(int program_time)
static void print_rate(const char *str)
◆ zero_count()
| static void zero_count |
( |
void |
| ) |
|
|
static |
Definition at line 48 of file system_overflow.c.
static struct timeval start
int gettimeofday(void *ptr1, void *ptr2)
static struct timeval start last
◆ count
◆ Event
◆ EventSet
◆ last
◆ name
| const char* name = "unknown" |
|
static |
◆ num_events
◆ Threshold
◆ total