build: fix travis MPI/SMP build
[charm.git] / src / conv-perf / converseEvents.h
blob556d53ec4784fcb5293182107e0179225f1bd45d
2 #ifndef __CONVERSE_EVENTS_H__
3 #define __CONVERSE_EVENTS_H__
5 #include "traceCoreAPI.h"
6 #include "converseProjections.h"
8 /* Language ID */
9 #define _CONVERSE_LANG_ID 1 // language ID for converse
11 /* Event IDs */
12 #define _E_MSG_SENT 0
13 #define _E_MSG_QUEUED 1 // DOUBT: Queued where ?
14 #define _E_MSG_RECV_MC 2 // Message received in machine layer
15 #define _E_MSG_RECV_SC 3 // Message received in scheduler
16 #define _E_HANDLER_BEGIN 4
17 #define _E_HANDLER_END 5
19 /* Trace Macros */
20 #define REGISTER_CONVERSE \
21 { RegisterLanguage(_CONVERSE_LANG_ID, "converse\0"); \
22 RegisterEvent(_CONVERSE_LANG_ID, _E_MSG_SENT ); \
23 RegisterEvent(_CONVERSE_LANG_ID, _E_MSG_QUEUED ); \
24 RegisterEvent(_CONVERSE_LANG_ID, _E_MSG_RECV_MC ); \
25 RegisterEvent(_CONVERSE_LANG_ID, _E_MSG_RECV_SC ); \
26 RegisterEvent(_CONVERSE_LANG_ID, _E_HANDLER_BEGIN); \
27 RegisterEvent(_CONVERSE_LANG_ID, _E_HANDLER_END ); \
31 #define _LOG_E_MSG_SENT(destPE, size) \
32 { LOGCONDITIONAL (converse_msgSent(destPE, size)); }
33 #define _LOG_E_MSG_QUEUED() \
34 { LOGCONDITIONAL (LogEvent(_CONVERSE_LANG_ID, _E_MSG_QUEUED)); } //TODO
35 #define _LOG_E_MSG_RECV_MC() \
36 { LOGCONDITIONAL (LogEvent(_CONVERSE_LANG_ID, _E_MSG_RECV_MC)); } //TODO
37 #define _LOG_E_MSG_RECV_SC() \
38 { LOGCONDITIONAL (LogEvent(_CONVERSE_LANG_ID, _E_MSG_RECV_SC)); } //TODO
39 #define _LOG_E_HANDLER_BEGIN(handlerIdx) \
40 { LOGCONDITIONAL (converse_handlerBegin(handlerIdx)); }
41 #define _LOG_E_HANDLER_END(handlerIdx) \
42 { LOGCONDITIONAL (converse_handlerEnd(handlerIdx)); }
44 #endif