# HG changeset patch # User Me # Date 1289217466 28800 # Node ID 7b799a46cc8721572b30ffa19773b7a4b54bb582 # Parent 407f8ede98b4f5e1c862a1e2dfbccce3dc69ac1c Added compiler switch to turn on and off debug-only probes, deleted time-junk diff -r 407f8ede98b4 -r 7b799a46cc87 VMS.h --- a/VMS.h Sun Nov 07 06:51:34 2010 -0800 +++ b/VMS.h Mon Nov 08 03:57:46 2010 -0800 @@ -33,21 +33,22 @@ //turns on the probe-instrumentation in the application -- when not // defined, the calls to the probe functions turn into comments #define STATS__ENABLE_PROBES +//#define TURN_ON_DEBUG_PROBES //These defines turn types of bug messages on and off // be sure debug messages are un-commented (next block of defines) -#define dbgProbes FALSE /* for issues inside probes themselves*/ -#define dbgAppFlow TRUE /* Top level flow of application code -- general*/ -#define dbgB2BMaster FALSE/* in coreloop, back to back master VPs*/ -#define dbgRqstHdlr FALSE /* in request handler code*/ +#define dbgProbes FALSE /* for issues inside probes themselves*/ +#define dbgAppFlow FALSE /* Top level flow of application code -- general*/ +#define dbgB2BMaster FALSE /* in coreloop, back to back master VPs*/ +#define dbgRqstHdlr FALSE /* in request handler code*/ //Comment or un- the substitute half to turn on/off types of debug message #define DEBUG( bool, msg) \ - if( bool){ printf(msg); fflush(stdin);} +// if( bool){ printf(msg); fflush(stdin);} #define DEBUG1( bool, msg, param) \ - if(bool){printf(msg, param); fflush(stdin);} +// if(bool){printf(msg, param); fflush(stdin);} #define DEBUG2( bool, msg, p1, p2) \ - //if(bool) {printf(msg, p1, p2); fflush(stdin);} +// if(bool) {printf(msg, p1, p2); fflush(stdin);} #define ERROR(msg) printf(msg); fflush(stdin); #define ERROR1(msg, param) printf(msg, param); fflush(stdin); diff -r 407f8ede98b4 -r 7b799a46cc87 probes.c --- a/probes.c Sun Nov 07 06:51:34 2010 -0800 +++ b/probes.c Mon Nov 08 03:57:46 2010 -0800 @@ -91,7 +91,6 @@ } } #else -#ifdef STATS__USE_DBL_PROBES /* * In practice, probe operations are called from the app, from inside slaves @@ -353,31 +352,3 @@ fflush( stdout ); } #endif -#endif - -/* Junk left over from when trying the different ways to get time stamps.. - struct timeval tim; - gettimeofday(&tim, NULL); - double t1=tim.tv_sec+(tim.tv_usec/1000000.0); - - clock_t startClockStamp = clock(); - - TSCount startMultStamp = getTSCount(); -*/ - -/* - TSCount endMultStamp = getTSCount(); - - dividerParams->numTSCsToExe = endMultStamp - startMultStamp; - printf("\ntime to execute: %d\n", endMultStamp - startMultStamp); - - //================================================================== - clock_t endClockStamp = clock(); - printf("%.4lf seconds of processing\n", - (endClockStamp - startClockStamp)/(double)CLOCKS_PER_SEC); - - //================================================================== - gettimeofday(&tim, NULL); - double t2=tim.tv_sec+(tim.tv_usec/1000000.0); - printf("%.6lf seconds elapsed\n", t2-t1); -*/ diff -r 407f8ede98b4 -r 7b799a46cc87 vmalloc.c --- a/vmalloc.c Sun Nov 07 06:51:34 2010 -0800 +++ b/vmalloc.c Mon Nov 08 03:57:46 2010 -0800 @@ -68,7 +68,7 @@ if( foundElem == NULL ) { ERROR("\nmalloc failed\n") - return NULL; //indicates malloc failed + return (void *)NULL; //indicates malloc failed } //Using a kludge to identify the element that is the top chunk in the // heap -- saving top-of-heap addr in head's nextHigherInMem -- and