-/* 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 "xbt/xbt_os_time.h"
#include <sys/stat.h>
-#ifdef WIN32
-#include <direct.h> // _mkdir
-#endif
#include <fstream>
#include <string>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration");
std::ofstream tracing_file;
-std::map<const simgrid::instr::Container*, std::ofstream*> tracing_files; // TI specific
+static std::map<const simgrid::instr::Container*, std::ofstream*> tracing_files; // TI specific
constexpr char OPT_TRACING_BASIC[] = "tracing/basic";
constexpr char OPT_TRACING_COMMENT_FILE[] = "tracing/comment-file";
namespace simgrid::instr {
static bool trace_active = false;
TraceFormat trace_format = TraceFormat::Paje;
-int trace_precision;
+static int trace_precision;
/*************
* Callbacks *
if (not simgrid::config::get_value<bool>("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) {
std::string folder_name = simgrid::config::get_value<std::string>("tracing/filename") + "_files";
std::string filename = folder_name + "/" + std::to_string(prefix) + "_" + c.get_name() + ".txt";
-#ifdef WIN32
- _mkdir(folder_name.c_str());
-#else
mkdir(folder_name.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
-#endif
ti_unique_file = new std::ofstream(filename.c_str(), std::ofstream::out);
xbt_assert(not ti_unique_file->fail(), "Tracefile %s could not be opened for writing", filename.c_str());
tracing_file << filename << '\n';