From: bdemsky Date: Mon, 4 Jul 2011 08:48:05 +0000 (+0000) Subject: make it compile X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=288bda15e846b80c9dee7524725d537ba11226cc;p=IRC.git make it compile --- diff --git a/Robust/src/Runtime/bamboo/multicoreprofile.c b/Robust/src/Runtime/bamboo/multicoreprofile.c index f8306c2c..acde454a 100644 --- a/Robust/src/Runtime/bamboo/multicoreprofile.c +++ b/Robust/src/Runtime/bamboo/multicoreprofile.c @@ -3,13 +3,13 @@ struct profiledata * eventdata; -void startEvent(enum eventprofile event) { +void startEvent(enum eventtypes event) { struct eventprofile *profile=&eventdata->cores[BAMBOO_NUM_OF_CORE].events[event]; profile->totaltimestarts+=BAMBOO_GET_EXE_TIME(); profile->numstarts++; } -void stopEvent(enum eventprofile event) { +void stopEvent(enum eventtypes event) { struct eventprofile *profile=&eventdata->cores[BAMBOO_NUM_OF_CORE].events[event]; profile->totaltimestops+=BAMBOO_GET_EXE_TIME(); profile->numstops++; @@ -18,7 +18,7 @@ void stopEvent(enum eventprofile event) { void printResults() { for(int core=0;corecores[core].events[event]; if (profile->numstarts!=profile->numstops) { diff --git a/Robust/src/Runtime/bamboo/multicoreprofile.h b/Robust/src/Runtime/bamboo/multicoreprofile.h index 4c0e0bac..91522e0c 100644 --- a/Robust/src/Runtime/bamboo/multicoreprofile.h +++ b/Robust/src/Runtime/bamboo/multicoreprofile.h @@ -1,12 +1,13 @@ #ifndef MULTICOREPROFILE_H #define MULTICOREPROFILE_H +#include "structdefs.h" -enum profileevents { - GCTIME, - NUMEVENTS; +enum eventtypes { + EV_GCTIME, + EV_NUMEVENTS }; -char ** eventnames={"gctime", "endmarker"}; +char eventnames[][30]={"gctime", "endmarker"}; struct eventprofile { long long totaltimestarts; @@ -16,7 +17,7 @@ struct eventprofile { }; struct coreprofile { - struct eventprofile events[NUMEVENTS]; + struct eventprofile events[EV_NUMEVENTS]; }; struct profiledata { @@ -25,8 +26,8 @@ struct profiledata { extern struct profiledata * eventdata; -void startEvent(enum eventprofile event); -void stopEvent(enum eventprofile event); +void startEvent(enum eventtypes event); +void stopEvent(enum eventtypes event); void printResults(); #endif