X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=Robust%2Fsrc%2FRuntime%2FDSTM%2Finterface%2Fdsmdebug.h;h=0dd0e691328ad527817183bd88f81dcc140fbe7c;hb=e2b4c06112fc83db8a33696a500732b903b3fbde;hp=c95695a4b172983019c8173ba94f34963b49a876;hpb=368602cf7f0d7082a043fb9da596589f6ca3349f;p=IRC.git diff --git a/Robust/src/Runtime/DSTM/interface/dsmdebug.h b/Robust/src/Runtime/DSTM/interface/dsmdebug.h index c95695a4..0dd0e691 100644 --- a/Robust/src/Runtime/DSTM/interface/dsmdebug.h +++ b/Robust/src/Runtime/DSTM/interface/dsmdebug.h @@ -1,6 +1,8 @@ #ifndef _DSMDEBUG_H_ #define _DSMDEBUG_H_ +#include + #define TABORT1(s) {printf("%s\n", s); fflush(stdout);} #define TABORT2(s, msg) {printf("%s(): %s\n", s, msg); fflush(stdout);} #define TABORT3(func, s, msg, d) {printf("%s(): %s: for %s = %d\n", func, s, msg, d); fflush(stdout);} @@ -11,5 +13,25 @@ #define TABORT8(func, s, d) {printf("%s(): %s = %d\n", func, s, d); fflush(stdout);} #define TABORT9(func, a, b, c, d, val1, val2, val3) {printf("%s(): %s for %s =%x, %s = %d, %s = %x\n", func, a, b, val1, c, val2, d, val3); fflush(stdout);} +#define ARRAY_SIZE 10100 +#define GETSTARTDELAY(start, count) { \ + struct timeval tv; \ + count++; \ + gettimeofday(&tv, NULL); \ + start = tv.tv_sec+(tv.tv_usec/1000000.0); \ +} + +#define GETSTART(start) { \ + struct timeval tv; \ + gettimeofday(&tv, NULL); \ + start = tv.tv_sec+(tv.tv_usec/1000000.0); \ +} + +#define GETENDDELAY(start, end, time) { \ + struct timeval tv; \ + gettimeofday(&tv, NULL); \ + end = tv.tv_sec+(tv.tv_usec/1000000.0); \ + time = (end-start); \ +} #endif