From: Gabriel Corona Date: Thu, 10 Mar 2016 09:31:29 +0000 (+0100) Subject: [mc] Move code in simgrid::mc X-Git-Tag: v3_13~453^2~1^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/30d60b272963b1b130ea80840af783ee9c146b97 [mc] Move code in simgrid::mc --- diff --git a/src/mc/ObjectInformation.hpp b/src/mc/ObjectInformation.hpp index ac1fd1b2df..56f80dc0c4 100644 --- a/src/mc/ObjectInformation.hpp +++ b/src/mc/ObjectInformation.hpp @@ -9,10 +9,12 @@ #include #include +#include #include #include +#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 createObjectInformation( + std::vector const& maps, const char* name); +XBT_PRIVATE void postProcessObjectInformation( + simgrid::mc::Process* process, simgrid::mc::ObjectInformation* info); } } diff --git a/src/mc/Process.cpp b/src/mc/Process.cpp index 74f6411ac8..df6d46187d 100644 --- a/src/mc/Process.cpp +++ b/src/mc/Process.cpp @@ -29,7 +29,6 @@ #include #include -#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 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"); diff --git a/src/mc/mc_dwarf.cpp b/src/mc/mc_dwarf.cpp index dc7736a29a..7942ae22b3 100644 --- a/src/mc/mc_dwarf.cpp +++ b/src/mc/mc_dwarf.cpp @@ -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 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 MC_find_object_info( +std::shared_ptr createObjectInformation( std::vector const& maps, const char *name) { std::shared_ptr result = @@ -1326,7 +1329,7 @@ std::shared_ptr 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 index da93084f24..0000000000 --- a/src/mc/mc_object_info.h +++ /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 -#include - -#include - -#include "src/mc/mc_forward.hpp" -#include "src/xbt/memory_map.hpp" - -XBT_PRIVATE std::shared_ptr MC_find_object_info( - std::vector const& maps, const char* name); -XBT_PRIVATE void MC_post_process_object_info(simgrid::mc::Process* process, simgrid::mc::ObjectInformation* info); - -#endif diff --git a/teshsuite/mc/dwarf/dwarf.cpp b/teshsuite/mc/dwarf/dwarf.cpp index 83862c4c16..048984e271 100644 --- a/teshsuite/mc/dwarf/dwarf.cpp +++ b/teshsuite/mc/dwarf/dwarf.cpp @@ -14,7 +14,6 @@ #include #include "mc/datatypes.h" -#include "src/mc/mc_object_info.h" #include "src/mc/mc_private.h" #include "src/mc/Process.hpp" diff --git a/teshsuite/mc/dwarf_expression/dwarf_expression.cpp b/teshsuite/mc/dwarf_expression/dwarf_expression.cpp index fbe890e8ae..f059b2c058 100644 --- a/teshsuite/mc/dwarf_expression/dwarf_expression.cpp +++ b/teshsuite/mc/dwarf_expression/dwarf_expression.cpp @@ -13,7 +13,6 @@ #include #include "src/mc/mc_private.h" -#include "src/mc/mc_object_info.h" #include "src/mc/Process.hpp" #include "src/mc/Type.hpp" diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 053598dd2f..e7033d9fcb 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -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