/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/surf/surf_interface.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_events, instr, "Paje tracing event system (events)");
#include "src/surf/surf_interface.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_events, instr, "Paje tracing event system (events)");
-extern FILE* tracing_file;
-std::map<container_t, FILE*> tracing_files; // TI specific
+extern std::ofstream tracing_file;
+extern std::map<container_t, std::ofstream*> tracing_files; // TI specific
stream_ << std::fixed << std::setprecision(TRACE_precision());
stream_ << eventType_ << " " << timestamp_ << " " << type_->get_id() << " " << container_->get_id();
}
stream_ << std::fixed << std::setprecision(TRACE_precision());
stream_ << eventType_ << " " << timestamp_ << " " << type_->get_id() << " " << container_->get_id();
}
StateEvent::StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value, TIData* extra)
: PajeEvent::PajeEvent(container, type, SIMIX_get_clock(), event_type), value(value), extra_(extra)
{
#if HAVE_SMPI
StateEvent::StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value, TIData* extra)
: PajeEvent::PajeEvent(container, type, SIMIX_get_clock(), event_type), value(value), extra_(extra)
{
#if HAVE_SMPI
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
filename = loc->filename;
linenumber = loc->linenumber;
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
filename = loc->filename;
linenumber = loc->linenumber;
if (trace_format == simgrid::instr::TraceFormat::Paje) {
if (value != nullptr) // PAJE_PopState Event does not need to have a value
if (trace_format == simgrid::instr::TraceFormat::Paje) {
if (value != nullptr) // PAJE_PopState Event does not need to have a value
stream_ << " \"" << filename << "\" " << linenumber;
}
#endif
XBT_DEBUG("Dump %s", stream_.str().c_str());
stream_ << " \"" << filename << "\" " << linenumber;
}
#endif
XBT_DEBUG("Dump %s", stream_.str().c_str());
/* Unimplemented calls are: WAITANY, SENDRECV, SCAN, EXSCAN, SSEND, and ISSEND. */
// FIXME: dirty extract "rank-" from the name, as we want the bare process id here
/* Unimplemented calls are: WAITANY, SENDRECV, SCAN, EXSCAN, SSEND, and ISSEND. */
// FIXME: dirty extract "rank-" from the name, as we want the bare process id here
- if (getContainer()->get_name().find("rank-") != 0)
- stream_ << getContainer()->get_name() << " " << extra_->print();
+ if (get_container()->get_name().find("rank-") != 0)
+ stream_ << get_container()->get_name() << " " << extra_->print();