X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a64a287d9d534a31e5b49dc99be038f9c0b7c6af..ace6ec5d4b81b85275732c9ba244d358ddc30107:/src/instr/instr_paje_header.cpp?ds=inline diff --git a/src/instr/instr_paje_header.cpp b/src/instr/instr_paje_header.cpp index 44092c26dc..d69e4ddf15 100644 --- a/src/instr/instr_paje_header.cpp +++ b/src/instr/instr_paje_header.cpp @@ -1,14 +1,13 @@ -/* Copyright (c) 2010-2022. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved. */ /* 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/version.h" #include "src/instr/instr_private.hpp" #include "src/smpi/include/private.hpp" -#include "xbt/virtu.h" /* xbt::cmdline */ +#include +#include extern std::ofstream tracing_file; namespace simgrid::instr::paje { @@ -18,7 +17,7 @@ void dump_generator_version() tracing_file << "#This file was generated using SimGrid-" << SIMGRID_VERSION_MAJOR << "." << SIMGRID_VERSION_MINOR << "." << SIMGRID_VERSION_PATCH << '\n'; tracing_file << "#["; - for (auto const& str : simgrid::xbt::cmdline) { + for (auto const& str : simgrid::s4u::Engine::get_instance()->get_cmdline()) { tracing_file << str << " "; } tracing_file << "]\n"; @@ -34,11 +33,9 @@ void dump_comment_file(const std::string& filename) throw TracingError(XBT_THROW_POINT, xbt::string_printf("Comment file %s could not be opened for reading.", filename.c_str())); - while (not fs.eof()) { - std::string line; - std::getline(fs, line); + std::string line; + while (std::getline(fs, line)) tracing_file << "# " << line; - } fs.close(); }