#include "gcqueue.h"
#include "markbit.h"
#endif
+#ifdef PERFCOUNT
+#include "bme_perf_counter.h"
+#endif
int msgsizearray[] = {
0, //MSGSTART,
1, //TERMINATE, // 0xDf
3, //MEMREQUEST, // 0xE0
3, //MEMRESPONSE, // 0xE1
+#ifdef PERFCOUNT
+ 1,
+ 1,
+#endif
#if defined(MULTICORE_GC)||defined(PMC_GC)
1, //GCINVOKE
1, //GCSTARTPRE, // 0xE2
break;
}
#endif
+#ifdef PERFCOUNT
+ case MSGPERFCOUNT: {
+ profile_stop();
+ if(BAMBOO_CHECK_SEND_MODE()) {
+ cache_msg_1_I(STARTUPCORE, MSGPERFRESPONSE);
+ } else {
+ send_msg_1_I(STARTUPCORE, MSGPERFRESPONSE);
+ }
+ break;
+ }
+ case MSGPERFRESPONSE: {
+ coreperfcount--;
+ break;
+ }
+#endif
#if defined(MULTICORE_GC)||defined(PMC_GC)
// GC msgs
case GCINVOKE: {
TERMINATE, // 0xDf
MEMREQUEST, // 0xE0
MEMRESPONSE, // 0xE1
+#ifdef PERFCOUNT
+ MSGPERFCOUNT,
+ MSGPERFRESPONSE,
+#endif
#if defined(MULTICORE_GC)||defined(PMC_GC)
GCINVOKE, // 0xE2
GCSTARTPRE, // 0xE3
pmc_onceInit();
#endif
#ifdef PERFCOUNT
- profile_init(_LOCAL_DRD_CNT,_LOCAL_WR_CNT, _REMOTE_DRD_CNT, _REMOTE_WR_CNT);
+ if (BAMBOO_NUM_OF_CORE==STARTUPCORE)
+ profile_init(_LOCAL_DRD_CNT,_LOCAL_WR_CNT, _REMOTE_DRD_CNT, _REMOTE_WR_CNT);
+ else {
+ int offcore=4*(BAMBOO_NUM_OF_CORE-1);
+ profile_init(validevents[(offcore)%87], validevents[(offcore+1)%87], validevents[(offcore+2)%87], validevents[(offcore+3)%87]);
+ }
#endif
if (BAMBOO_NUM_OF_CORE==STARTUPCORE) {
numconfirm=NUMCORES-1;