new projector files
authorArun Singla <asingla@uiuc.edu>
Wed, 1 May 2002 16:52:29 +0000 (16:52 +0000)
committerArun Singla <asingla@uiuc.edu>
Wed, 1 May 2002 16:52:29 +0000 (16:52 +0000)
src/conv-perf/converseProjections.C [new file with mode: 0644]
src/conv-perf/converseProjections.h [new file with mode: 0644]
src/conv-perf/traceCoreAPI.h [new file with mode: 0644]

diff --git a/src/conv-perf/converseProjections.C b/src/conv-perf/converseProjections.C
new file mode 100644 (file)
index 0000000..545d057
--- /dev/null
@@ -0,0 +1,52 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "converse.h"
+#include "converseEvents.h"
+#include "traceCoreCommon.h"
+#include "converseProjections.h"
+
+extern "C" void msgSent(int destPE, int size)
+{
+       int* iData = (int*)malloc(sizeof(int)*2); 
+       iData[0] = destPE;
+       iData[1] = size;
+       LogEvent1(_CONVERSE_LANG_ID, _E_MSG_SENT, 2, iData); 
+}
+
+//TODO
+extern "C" void msgQueued();
+//TODO
+extern "C" void msgRecvMC();
+//TODO
+extern "C" void msgRecvSC();
+
+extern "C" void handlerBegin(int handlerIdx)
+{      
+       int* iData = (int*)malloc(sizeof(int)*2); 
+       iData[0] = handlerIdx;
+       iData[1] = CmiMyPe();
+       LogEvent1(_CONVERSE_LANG_ID, _E_HANDLER_BEGIN, 2, iData); 
+}
+
+extern "C" void handlerEnd(int handlerIdx)
+{      
+       int* iData = (int*)malloc(sizeof(int)*2); 
+       iData[0] = handlerIdx;
+       iData[1] = CmiMyPe();
+       LogEvent1(_CONVERSE_LANG_ID, _E_HANDLER_END, 2, iData); 
+}
+
+extern "C" void procIdle()
+{      
+       int* iData = (int*)malloc(sizeof(int)); 
+       iData[0] = CmiMyPe();
+       LogEvent1(_CONVERSE_LANG_ID, _E_PROC_IDLE, 1, iData); 
+}
+
+extern "C" void procBusy()
+{      
+       int* iData = (int*)malloc(sizeof(int)); 
+       iData[0] = CmiMyPe();
+       LogEvent1(_CONVERSE_LANG_ID, _E_PROC_BUSY, 1, iData); 
+}
diff --git a/src/conv-perf/converseProjections.h b/src/conv-perf/converseProjections.h
new file mode 100644 (file)
index 0000000..314d857
--- /dev/null
@@ -0,0 +1,22 @@
+
+#ifndef __CONVERSE_PROJECTIONS_H__
+#define __CONVERSE_PROJECTIONS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void msgSent(int destPE, int size);
+void msgQueued();              //TODO
+void msgRecvMC();              //TODO
+void msgRecvSC();              //TODO
+void handlerBegin(int handlerIdx);
+void handlerEnd  (int handlerIdx);
+void procIdle();
+void procBusy();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/conv-perf/traceCoreAPI.h b/src/conv-perf/traceCoreAPI.h
new file mode 100644 (file)
index 0000000..3c3c986
--- /dev/null
@@ -0,0 +1,22 @@
+
+#ifndef __TRACE_CORE_API_H__
+#define __TRACE_CORE_API_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Tracing API */
+void RegisterLanguage(int lID, char* ln);
+void RegisterEvent(int lID, int eID);
+//TODO some cleanup required below
+void LogEvent(int lID, int eID);
+void LogEvent1(int lID, int eID, int iLen, int* iData);
+void LogEvent2(int lID, int eID, int sLen, char* sData);
+void LogEvent3(int lID, int eID, int iLen, int* iData, int sLen, char* sData);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif