#include "src/instr/instr_private.h"
#include "xbt/virtu.h" /* sg_cmdline */
#include <sstream>
+#include <vector>
#include <iomanip> /** std::setprecision **/
#include "simgrid/sg_config.h"
static std::stringstream stream;
+void buffer_debug(std::vector<PajeEvent*> *buf);
+void buffer_debug(std::vector<PajeEvent*> *buf) {
+ XBT_DEBUG(">>>>>> Dump the state of the buffer. %zu events", buf->size());
+ for (auto event :*buf){
+ event->print();
+ XBT_DEBUG("%s", stream.str().c_str());
+ stream.str("");
+ stream.clear();
+ }
+ XBT_DEBUG("<<<<<<");
+}
+
static void print_paje_debug(std::string functionName, PajeEvent* event) {
XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event->event_type, TRACE_precision(),
event->timestamp);
#include "xbt/virtu.h" /* sg_cmdline */
#include "typeinfo"
+#include <vector>
+
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_trace, instr, "tracing event system");
FILE *tracing_file = nullptr;
&print_NULL, &print_NULL, &print_NULL, &print_NULL, &print_NULL, &print_NULL};
std::vector<PajeEvent*> buffer;
+void buffer_debug(std::vector<PajeEvent*> *buf);
void dump_comment (const char *comment)
{
delete tbi;
return;
}
+ buffer_debug(&buffer);
XBT_DEBUG("%s: insert event_type=%d, timestamp=%f, buffersize=%zu)",
__FUNCTION__, (int)tbi->event_type, tbi->timestamp, buffer.size());