X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e3b2f1d55a07271c05db2ed5b3fec27561097f9..c587485ee2aae6b2c54ed80656cbdc4e3ba8d157:/src/instr/instr_paje_trace.cpp diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index 2a440d15bf..927a8dbfe8 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -4,6 +4,7 @@ /* 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 "simgrid/Exception.hpp" #include "simgrid/sg_config.hpp" #include "src/instr/instr_private.hpp" #include "src/instr/instr_smpi.hpp" @@ -30,7 +31,9 @@ void dump_comment_file(const std::string& filename) std::ifstream fs(filename.c_str(), std::ifstream::in); if (fs.fail()) - THROWF(system_error, 1, "Comment file %s could not be opened for reading.", filename.c_str()); + throw simgrid::TracingError( + XBT_THROW_POINT, + simgrid::xbt::string_printf("Comment file %s could not be opened for reading.", filename.c_str())); while (not fs.eof()) { std::string line; @@ -68,25 +71,9 @@ void TRACE_paje_dump_buffer(bool force) XBT_DEBUG("%s: ends", __func__); } -static void buffer_debug(std::vector* buf) -{ - if (not XBT_LOG_ISENABLED(instr_paje_trace, xbt_log_priority_debug)) - return; - XBT_DEBUG(">>>>>> Dump the state of the buffer. %zu events", buf->size()); - for (auto const& event : *buf) { - event->print(); - XBT_DEBUG("%p %s", event, event->stream_.str().c_str()); - event->stream_.str(""); - event->stream_.clear(); - } - XBT_DEBUG("<<<<<<"); -} - /* internal do the instrumentation module */ void simgrid::instr::PajeEvent::insert_into_buffer() { - buffer_debug(&buffer); - XBT_DEBUG("%s: insert event_type=%u, timestamp=%f, buffersize=%zu)", __func__, eventType_, timestamp_, buffer.size()); std::vector::reverse_iterator i; for (i = buffer.rbegin(); i != buffer.rend(); ++i) { @@ -102,6 +89,4 @@ void simgrid::instr::PajeEvent::insert_into_buffer() else XBT_DEBUG("%s: inserted at pos= %zd from its end", __func__, std::distance(buffer.rbegin(), i)); buffer.insert(i.base(), this); - - buffer_debug(&buffer); }