#include "src/instr/instr_private.h"
#include "src/instr/instr_smpi.h"
+#include "src/smpi/private.hpp"
#include "xbt/virtu.h" /* sg_cmdline */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_trace, instr, "tracing event system");
-FILE *tracing_file = NULL;
+FILE *tracing_file = nullptr;
void print_NULL(paje_event_t event){}
print_NULL, print_NULL
};
-xbt_dynar_t buffer = NULL;
+xbt_dynar_t buffer = nullptr;
void dump_comment (const char *comment)
{
void TRACE_init()
{
- buffer = xbt_dynar_new(sizeof(paje_event_t), NULL);
+ buffer = xbt_dynar_new(sizeof(paje_event_t), nullptr);
}
void TRACE_finalize()
event->free (event);
}
xbt_dynar_free (&buffer);
- buffer = xbt_dynar_new (sizeof(paje_event_t), NULL);
+ buffer = xbt_dynar_new (sizeof(paje_event_t), nullptr);
}else{
paje_event_t event;
unsigned int cursor;
((setState_t)(event->data))->container = container;
((setState_t)(event->data))->value = value;
- smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
-
- ((setState_t)(event->data))->filename = loc->filename;
- ((setState_t)(event->data))->linenumber = loc->linenumber;
+#if HAVE_SMPI
+ if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
+ smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
+ ((setState_t)(event->data))->filename = loc->filename;
+ ((setState_t)(event->data))->linenumber = loc->linenumber;
+ }
+#endif
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);
((pushState_t)(event->data))->value = value;
((pushState_t)(event->data))->extra = extra;
- smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
- ((pushState_t)(event->data))->filename = loc->filename;
- ((pushState_t)(event->data))->linenumber = loc->linenumber;
+#if HAVE_SMPI
+ if (xbt_cfg_get_boolean("smpi/trace-call-location")) {
+ smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
+ ((pushState_t)(event->data))->filename = loc->filename;
+ ((pushState_t)(event->data))->linenumber = loc->linenumber;
+ }
+#endif
XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event->event_type, event->timestamp);