X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7a3a100990355eb757dc81106b5aac6daed0b8e1..2f2db04b850386899392bc06568f17f071f8620f:/src/mc/mc_replay.hpp diff --git a/src/mc/mc_replay.hpp b/src/mc/mc_replay.hpp index 813d138b89..7c0ae437e1 100644 --- a/src/mc/mc_replay.hpp +++ b/src/mc/mc_replay.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2008-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. */ @@ -6,19 +6,26 @@ #ifndef SIMGRID_MC_REPLAY_H #define SIMGRID_MC_REPLAY_H -#include "xbt/base.h" #include /** Replay path (if any) in string representation * * This is using the format generated by traceToString(). + * Use a function to avoid static initialization order fiasco. */ -XBT_PUBLIC_DATA std::string MC_record_path; +inline auto& MC_record_path() +{ + static std::string value; + return value; +} /** Whether the replay mode is enabled */ static inline int MC_record_replay_is_active() { - return not MC_record_path.empty(); + return not MC_record_path().empty(); } +/** Whether we should display extra information during this MC replay */ +extern bool simgrid_mc_replay_show_backtraces; + #endif