Add test programs for ihk_os_getrusage()

This commit is contained in:
Masamichi Takagi
2017-09-20 19:48:32 +09:00
parent 47b4bd5aba
commit 4d9a1628f2
63 changed files with 6461 additions and 0 deletions

31
test/rusage/verbs/debug.h Executable file
View File

@ -0,0 +1,31 @@
#ifndef MYLIB_H
#define MYLIB_H
#ifndef NULL
#define NULL ((void *) 0)
#endif
#ifdef DEBUG
#define debug_printf(fmt,arg...) {printf("[DEBUG] " fmt, ##arg);}
#define debug_print_mem(arg...) {fprintf(stderr, "[DEBUG] ");print_mem(arg);}
#else
#define debug_printf(fmt,arg...) {}
#define debug_print_mem(arg...) {}
#endif
#ifdef ERROR
#define error_printf(fmt,arg...) {fprintf(stderr, "[ERROR] " fmt, ##arg);}
#define error_perror(arg...) {fprintf(stderr, "[ERROR] "); perror(arg);}
#else
#define error_printf(fmt,arg...) {}
#define error_perror(fmt,arg...) {}
#endif
#include "mtype.h"
/**
* get current time(sec)
*/
extern double cur_time();
extern void print_mem(addr_t addr, int size);
#endif