Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Move code in simgrid::mc
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 10 Mar 2016 09:31:29 +0000 (10:31 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 10 Mar 2016 09:31:29 +0000 (10:31 +0100)
src/mc/ObjectInformation.hpp
src/mc/Process.cpp
src/mc/mc_dwarf.cpp
src/mc/mc_object_info.h [deleted file]
teshsuite/mc/dwarf/dwarf.cpp
teshsuite/mc/dwarf_expression/dwarf_expression.cpp
tools/cmake/DefinePackages.cmake

index ac1fd1b..56f80dc 100644 (file)
@@ -9,10 +9,12 @@
 
 #include <string>
 #include <unordered_map>
+#include <memory>
 #include <vector>
 
 #include <xbt/base.h>
 
+#include "src/xbt/memory_map.hpp"
 #include "src/mc/mc_forward.h"
 #include "src/mc/Type.hpp"
 #include "src/mc/Frame.hpp"
@@ -97,7 +99,10 @@ public:
     const char* name, const char* scope);
 };
 
-
+XBT_PRIVATE std::shared_ptr<ObjectInformation> createObjectInformation(
+  std::vector<simgrid::xbt::VmMap> const& maps, const char* name);
+XBT_PRIVATE void postProcessObjectInformation(
+  simgrid::mc::Process* process, simgrid::mc::ObjectInformation* info);
 
 }
 }
index 74f6411..df6d461 100644 (file)
@@ -29,7 +29,6 @@
 #include <xbt/base.h>
 #include <xbt/mmalloc.h>
 
-#include "src/mc/mc_object_info.h"
 #include "src/mc/mc_unw.h"
 #include "src/mc/mc_snapshot.h"
 #include "src/mc/mc_ignore.h"
@@ -357,7 +356,7 @@ void Process::init_memory_map_info()
     }
 
     std::shared_ptr<simgrid::mc::ObjectInformation> info =
-      MC_find_object_info(this->memory_map_, pathname);
+      simgrid::mc::createObjectInformation(this->memory_map_, pathname);
     this->object_infos.push_back(info);
     if (is_executable)
       this->binary_info = info;
@@ -371,7 +370,7 @@ void Process::init_memory_map_info()
 
   // Resolve time (including accross differents objects):
   for (auto const& object_info : this->object_infos)
-    MC_post_process_object_info(this, object_info.get());
+    postProcessObjectInformation(this, object_info.get());
 
   xbt_assert(this->maestro_stack_start_, "Did not find maestro_stack_start");
   xbt_assert(this->maestro_stack_end_, "Did not find maestro_stack_end");
index dc7736a..7942ae2 100644 (file)
@@ -25,7 +25,6 @@
 #include "src/mc/mc_private.h"
 #include "src/mc/mc_dwarf.hpp"
 
-#include "src/mc/mc_object_info.h"
 #include "src/mc/Process.hpp"
 #include "src/mc/ObjectInformation.hpp"
 #include "src/mc/Variable.hpp"
@@ -1093,6 +1092,7 @@ std::string to_hex(std::vector<char> const& data)
 }
 
 /** Base directories for external debug files */
+static
 const char* debug_paths[] = {
   "/usr/lib/debug/",
   "/usr/local/lib/debug/",
@@ -1307,8 +1307,11 @@ static void MC_post_process_types(simgrid::mc::ObjectInformation* info)
   }
 }
 
+namespace simgrid {
+namespace mc {
+
 /** \brief Finds informations about a given shared object/executable */
-std::shared_ptr<simgrid::mc::ObjectInformation> MC_find_object_info(
+std::shared_ptr<simgrid::mc::ObjectInformation> createObjectInformation(
   std::vector<simgrid::xbt::VmMap> const& maps, const char *name)
 {
   std::shared_ptr<simgrid::mc::ObjectInformation> result =
@@ -1326,7 +1329,7 @@ std::shared_ptr<simgrid::mc::ObjectInformation> MC_find_object_info(
 
 /*************************************************************************/
 
-void MC_post_process_object_info(simgrid::mc::Process* process, simgrid::mc::ObjectInformation* info)
+void postProcessObjectInformation(simgrid::mc::Process* process, simgrid::mc::ObjectInformation* info)
 {
   for (auto& i : info->types) {
 
@@ -1355,6 +1358,9 @@ void MC_post_process_object_info(simgrid::mc::Process* process, simgrid::mc::Obj
   }
 }
 
+}
+}
+
 namespace simgrid {
 namespace dwarf {
 
diff --git a/src/mc/mc_object_info.h b/src/mc/mc_object_info.h
deleted file mode 100644 (file)
index da93084..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (c) 2007-2015. 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. */
-
-#ifndef SIMGRID_MC_OBJECT_INFO_H
-#define SIMGRID_MC_OBJECT_INFO_H
-
-#include <vector>
-#include <memory>
-
-#include <xbt/base.h>
-
-#include "src/mc/mc_forward.hpp"
-#include "src/xbt/memory_map.hpp"
-
-XBT_PRIVATE std::shared_ptr<simgrid::mc::ObjectInformation> MC_find_object_info(
-  std::vector<simgrid::xbt::VmMap> const& maps, const char* name);
-XBT_PRIVATE  void MC_post_process_object_info(simgrid::mc::Process* process, simgrid::mc::ObjectInformation* info);
-
-#endif
index 83862c4..048984e 100644 (file)
@@ -14,7 +14,6 @@
 #include <mc/mc.h>
 
 #include "mc/datatypes.h"
-#include "src/mc/mc_object_info.h"
 #include "src/mc/mc_private.h"
 
 #include "src/mc/Process.hpp"
index fbe890e..f059b2c 100644 (file)
@@ -13,7 +13,6 @@
 #include <stdlib.h>
 
 #include "src/mc/mc_private.h"
-#include "src/mc/mc_object_info.h"
 
 #include "src/mc/Process.hpp"
 #include "src/mc/Type.hpp"
index 053598d..e7033d9 100644 (file)
@@ -572,7 +572,6 @@ set(MC_SRC
   src/mc/mc_unw.h
   src/mc/mc_unw.cpp
   src/mc/mc_unw_vmread.cpp
-  src/mc/mc_object_info.h
   src/mc/mc_checkpoint.cpp
   src/mc/mc_snapshot.h
   src/mc/mc_snapshot.cpp