Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
apply agier fixes for StarPU build
[simgrid.git] / src / instr / instr_paje_trace.cpp
index 49aa668..2a440d1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2018. The SimGrid Team.
+/* Copyright (c) 2010-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -15,15 +15,15 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_trace, instr, "tracing event system")
 
 extern std::ofstream tracing_file;
 
-std::vector<simgrid::instr::PajeEvent*> buffer;
+static std::vector<simgrid::instr::PajeEvent*> buffer;
 
-void dump_comment(std::string comment)
+void dump_comment(const std::string& comment)
 {
   if (not comment.empty())
     tracing_file << "# " << comment << std::endl;
 }
 
-void dump_comment_file(std::string filename)
+void dump_comment_file(const std::string& filename)
 {
   if (filename.empty())
     return;
@@ -85,11 +85,6 @@ static void buffer_debug(std::vector<simgrid::instr::PajeEvent*>* buf)
 /* internal do the instrumentation module */
 void simgrid::instr::PajeEvent::insert_into_buffer()
 {
-  if (not TRACE_buffer()) {
-    print();
-    delete this;
-    return;
-  }
   buffer_debug(&buffer);
 
   XBT_DEBUG("%s: insert event_type=%u, timestamp=%f, buffersize=%zu)", __func__, eventType_, timestamp_, buffer.size());