Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Show the user-level call in MC backtraces
[simgrid.git] / src / mc / explo / Exploration.cpp
index 8bf0110..f6b4c85 100644 (file)
@@ -86,8 +86,14 @@ static const char* signal_name(int status)
 std::vector<std::string> Exploration::get_textual_trace()
 {
   std::vector<std::string> trace;
-  for (auto const& transition : get_record_trace())
-    trace.push_back(xbt::string_printf("%ld: %s", transition->aid_, transition->to_string().c_str()));
+  for (auto const& transition : get_record_trace()) {
+    auto call_location = transition->get_call_location();
+    if (not call_location.empty())
+      trace.push_back(xbt::string_printf("Actor %ld in %s ==> simcall: %s", transition->aid_, call_location.c_str(),
+                                         transition->to_string().c_str()));
+    else
+      trace.push_back(xbt::string_printf("Actor %ld in simcall %s", transition->aid_, transition->to_string().c_str()));
+  }
   return trace;
 }