From a57327d86b9fb16acacc71a3359817acd2a2816b Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 20 May 2019 17:23:00 +0200 Subject: [PATCH 1/1] Ahem. You mean I need to actually compile with MC after moving files? --- include/xbt/range.hpp | 2 ++ src/mc/compare.cpp | 34 ++----------------- src/mc/inspect/DwarfExpression.cpp | 10 +++--- src/mc/inspect/Frame.cpp | 2 +- src/mc/inspect/LocationList.cpp | 13 ++++--- src/mc/inspect/ObjectInformation.cpp | 6 ++-- src/mc/inspect/mc_dwarf.cpp | 30 ++++++++-------- src/mc/inspect/mc_dwarf_attrnames.cpp | 7 ++-- src/mc/inspect/mc_dwarf_tagnames.cpp | 7 ++-- src/mc/inspect/mc_member.cpp | 7 ++-- src/mc/inspect/mc_unw.cpp | 11 +++--- src/mc/inspect/mc_unw_vmread.cpp | 11 +++--- src/mc/sosp/mc_checkpoint.cpp | 4 --- .../mc/dwarf-expression/dwarf-expression.cpp | 17 +++++----- teshsuite/mc/dwarf/dwarf.cpp | 15 ++++---- 15 files changed, 65 insertions(+), 111 deletions(-) diff --git a/include/xbt/range.hpp b/include/xbt/range.hpp index fde48b9777..872efe16c0 100644 --- a/include/xbt/range.hpp +++ b/include/xbt/range.hpp @@ -7,6 +7,8 @@ #ifndef SIMGRID_XBT_RANGE_HPP #define SIMGRID_XBT_RANGE_HPP +#include + namespace simgrid { namespace xbt { diff --git a/src/mc/compare.cpp b/src/mc/compare.cpp index 8d86c1abed..845020a405 100644 --- a/src/mc/compare.cpp +++ b/src/mc/compare.cpp @@ -5,37 +5,7 @@ /** \file compare.cpp Memory snapshooting and comparison */ -#include - -#include -#include -#include -#include -#include - -#include "xbt/dynar.h" -#include "xbt/sysdep.h" -#include - -#include -#include - -#include "src/internal_config.h" - -#include "src/xbt/mmalloc/mmprivate.h" - -#if HAVE_SMPI -#include "src/smpi/include/private.hpp" -#endif - -#include "src/mc/Frame.hpp" -#include "src/mc/ObjectInformation.hpp" -#include "src/mc/Type.hpp" -#include "src/mc/Variable.hpp" #include "src/mc/mc_config.hpp" -#include "src/mc/mc_dwarf.hpp" -#include "src/mc/mc_forward.hpp" -#include "src/mc/mc_private.hpp" #include "src/mc/mc_smx.hpp" #include "src/mc/sosp/mc_snapshot.hpp" @@ -1577,17 +1547,17 @@ int snapshot_compare(Snapshot* s1, Snapshot* s2) xbt_assert(region1->object_info() == region2->object_info()); xbt_assert(region1->object_info()); - std::string const& name = region1->object_info()->file_name; - /* Compare global variables */ if (compare_global_variables(*state_comparator, region1->object_info(), simgrid::mc::ProcessIndexDisabled, region1, region2, s1, s2)) { #ifdef MC_DEBUG + std::string const& name = region1->object_info()->file_name; XBT_DEBUG("(%d - %d) Different global variables in %s", s1->num_state, s2->num_state, name.c_str()); errors++; #else #ifdef MC_VERBOSE + std::string const& name = region1->object_info()->file_name; XBT_VERB("(%d - %d) Different global variables in %s", s1->num_state_, s2->num_state_, name.c_str()); #endif diff --git a/src/mc/inspect/DwarfExpression.cpp b/src/mc/inspect/DwarfExpression.cpp index 42f590ebfb..89bca9510b 100644 --- a/src/mc/inspect/DwarfExpression.cpp +++ b/src/mc/inspect/DwarfExpression.cpp @@ -7,11 +7,11 @@ #include #include "src/mc/AddressSpace.hpp" -#include "src/mc/DwarfExpression.hpp" -#include "src/mc/Frame.hpp" -#include "src/mc/LocationList.hpp" -#include "src/mc/ObjectInformation.hpp" -#include "src/mc/mc_dwarf.hpp" +#include "src/mc/inspect/DwarfExpression.hpp" +#include "src/mc/inspect/Frame.hpp" +#include "src/mc/inspect/LocationList.hpp" +#include "src/mc/inspect/ObjectInformation.hpp" +#include "src/mc/inspect/mc_dwarf.hpp" #include "src/mc/mc_private.hpp" using simgrid::mc::remote; diff --git a/src/mc/inspect/Frame.cpp b/src/mc/inspect/Frame.cpp index 2d8620fc45..dca624da69 100644 --- a/src/mc/inspect/Frame.cpp +++ b/src/mc/inspect/Frame.cpp @@ -8,7 +8,7 @@ #include "xbt/sysdep.h" -#include "src/mc/Frame.hpp" +#include "src/mc/inspect/Frame.hpp" namespace simgrid { namespace mc { diff --git a/src/mc/inspect/LocationList.cpp b/src/mc/inspect/LocationList.cpp index 500b851f9b..ce194386bf 100644 --- a/src/mc/inspect/LocationList.cpp +++ b/src/mc/inspect/LocationList.cpp @@ -3,18 +3,17 @@ /* 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 -#include -#include +#include "src/mc/inspect/LocationList.hpp" +#include "src/mc/inspect/ObjectInformation.hpp" +#include "src/mc/inspect/mc_dwarf.hpp" #include "xbt/asserts.h" #include "xbt/sysdep.h" +#include +#include #include - -#include "src/mc/LocationList.hpp" -#include "src/mc/ObjectInformation.hpp" -#include "src/mc/mc_dwarf.hpp" +#include namespace simgrid { namespace dwarf { diff --git a/src/mc/inspect/ObjectInformation.cpp b/src/mc/inspect/ObjectInformation.cpp index e0f96bfcef..7d3229ca74 100644 --- a/src/mc/inspect/ObjectInformation.cpp +++ b/src/mc/inspect/ObjectInformation.cpp @@ -8,9 +8,9 @@ #include -#include "src/mc/Frame.hpp" -#include "src/mc/ObjectInformation.hpp" -#include "src/mc/Variable.hpp" +#include "src/mc/inspect/Frame.hpp" +#include "src/mc/inspect/ObjectInformation.hpp" +#include "src/mc/inspect/Variable.hpp" namespace simgrid { namespace mc { diff --git a/src/mc/inspect/mc_dwarf.cpp b/src/mc/inspect/mc_dwarf.cpp index 81f61f1c42..9fbe7255cc 100644 --- a/src/mc/inspect/mc_dwarf.cpp +++ b/src/mc/inspect/mc_dwarf.cpp @@ -3,33 +3,31 @@ /* 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 "src/simgrid/util.hpp" +#include "xbt/log.h" +#include "xbt/string.hpp" +#include "xbt/sysdep.h" +#include + +#include "src/mc/inspect/ObjectInformation.hpp" +#include "src/mc/inspect/Variable.hpp" +#include "src/mc/inspect/mc_dwarf.hpp" +#include "src/mc/mc_private.hpp" +#include "src/mc/remote/RemoteClient.hpp" + #include #include - +#include +#include #include #include #include -#include #include -#include #include -#include "src/simgrid/util.hpp" -#include "xbt/log.h" -#include "xbt/string.hpp" -#include "xbt/sysdep.h" -#include - -#include "src/mc/mc_dwarf.hpp" -#include "src/mc/mc_private.hpp" - -#include "src/mc/ObjectInformation.hpp" -#include "src/mc/Variable.hpp" -#include "src/mc/remote/RemoteClient.hpp" - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_dwarf, mc, "DWARF processing"); /** @brief The default DW_TAG_lower_bound for a given DW_AT_language. diff --git a/src/mc/inspect/mc_dwarf_attrnames.cpp b/src/mc/inspect/mc_dwarf_attrnames.cpp index 018d9c27fa..cbbc5b23b7 100644 --- a/src/mc/inspect/mc_dwarf_attrnames.cpp +++ b/src/mc/inspect/mc_dwarf_attrnames.cpp @@ -1,16 +1,13 @@ -/* Copyright (c) 2014-2019. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2019. 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. */ -/* Warning: autogenerated, do not edit! */ +#include "src/mc/inspect/mc_dwarf.hpp" #include #include -#include "src/mc/mc_dwarf.hpp" - namespace { const std::unordered_map attrname_map = { {0x01, "DW_AT_sibling"}, diff --git a/src/mc/inspect/mc_dwarf_tagnames.cpp b/src/mc/inspect/mc_dwarf_tagnames.cpp index 4db55c3389..3cf69dd755 100644 --- a/src/mc/inspect/mc_dwarf_tagnames.cpp +++ b/src/mc/inspect/mc_dwarf_tagnames.cpp @@ -1,16 +1,15 @@ -/* Copyright (c) 2014-2019. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2019. 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. */ /* Warning: autogenerated, do not edit! */ +#include "src/mc/inspect/mc_dwarf.hpp" + #include #include -#include "src/mc/mc_dwarf.hpp" - namespace { const std::unordered_map tagname_map = { {0x00, "DW_TAG_invalid"}, diff --git a/src/mc/inspect/mc_member.cpp b/src/mc/inspect/mc_member.cpp index 63493620a1..5b01e582b2 100644 --- a/src/mc/inspect/mc_member.cpp +++ b/src/mc/inspect/mc_member.cpp @@ -1,11 +1,10 @@ -/* Copyright (c) 2014-2019. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2019. 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 "src/mc/Type.hpp" -#include "src/mc/mc_dwarf.hpp" +#include "src/mc/inspect/Type.hpp" +#include "src/mc/inspect/mc_dwarf.hpp" #include "src/mc/mc_private.hpp" namespace simgrid { diff --git a/src/mc/inspect/mc_unw.cpp b/src/mc/inspect/mc_unw.cpp index da7553997d..c942b04407 100644 --- a/src/mc/inspect/mc_unw.cpp +++ b/src/mc/inspect/mc_unw.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2015-2019. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2015-2019. 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. */ @@ -11,6 +10,10 @@ // We need this for the register indices: // #define _GNU_SOURCE +#include "src/mc/inspect/mc_unw.hpp" +#include "src/mc/inspect/Frame.hpp" +#include "src/mc/remote/RemoteClient.hpp" + #include // On x86_64, libunwind unw_context_t has the same layout as ucontext_t: @@ -22,10 +25,6 @@ typedef register_t greg_t; #include -#include "src/mc/Frame.hpp" -#include "src/mc/mc_unw.hpp" -#include "src/mc/remote/RemoteClient.hpp" - using simgrid::mc::remote; namespace simgrid { diff --git a/src/mc/inspect/mc_unw_vmread.cpp b/src/mc/inspect/mc_unw_vmread.cpp index 9075f7b3aa..1b52e68ca4 100644 --- a/src/mc/inspect/mc_unw_vmread.cpp +++ b/src/mc/inspect/mc_unw_vmread.cpp @@ -1,9 +1,11 @@ -/* Copyright (c) 2015-2019. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2015-2019. 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 "src/mc/inspect/mc_unw.hpp" +#include "src/mc/remote/RemoteClient.hpp" + #include #include @@ -11,13 +13,8 @@ #include #include -#include "src/mc/mc_unw.hpp" -#include "src/mc/remote/RemoteClient.hpp" - /** \file * Libunwind namespace implementation using process_vm_readv. - *. - * This implem */ /** Partial structure of libunwind-ptrace context in order to get the PID diff --git a/src/mc/sosp/mc_checkpoint.cpp b/src/mc/sosp/mc_checkpoint.cpp index 51495c82e7..200ee93268 100644 --- a/src/mc/sosp/mc_checkpoint.cpp +++ b/src/mc/sosp/mc_checkpoint.cpp @@ -30,13 +30,9 @@ #include "src/mc/mc_hash.hpp" #include "src/mc/mc_mmu.hpp" #include "src/mc/mc_smx.hpp" -#include "src/mc/mc_unw.hpp" #include "src/mc/remote/mc_protocol.h" #include "src/mc/sosp/mc_snapshot.hpp" -#include "src/mc/Frame.hpp" -#include "src/mc/ObjectInformation.hpp" -#include "src/mc/Variable.hpp" #include "src/mc/sosp/RegionSnapshot.hpp" using simgrid::mc::remote; diff --git a/teshsuite/mc/dwarf-expression/dwarf-expression.cpp b/teshsuite/mc/dwarf-expression/dwarf-expression.cpp index 8a63108c45..e38b70ad0c 100644 --- a/teshsuite/mc/dwarf-expression/dwarf-expression.cpp +++ b/teshsuite/mc/dwarf-expression/dwarf-expression.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2014-2019. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2019. 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. */ @@ -8,18 +7,18 @@ #undef NDEBUG #endif +#include "src/mc/mc_private.hpp" + +#include "src/mc/inspect/ObjectInformation.hpp" +#include "src/mc/inspect/Type.hpp" +#include "src/mc/inspect/Variable.hpp" +#include "src/mc/remote/RemoteClient.hpp" + #include #include #include #include -#include "src/mc/mc_private.hpp" - -#include "src/mc/ObjectInformation.hpp" -#include "src/mc/Type.hpp" -#include "src/mc/Variable.hpp" -#include "src/mc/remote/RemoteClient.hpp" - static std::default_random_engine rnd_engine; static simgrid::mc::RemoteClient* process; diff --git a/teshsuite/mc/dwarf/dwarf.cpp b/teshsuite/mc/dwarf/dwarf.cpp index cd3cc80e65..da8102fef5 100644 --- a/teshsuite/mc/dwarf/dwarf.cpp +++ b/teshsuite/mc/dwarf/dwarf.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2014-2019. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2019. 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. */ @@ -8,19 +7,19 @@ #undef NDEBUG #endif -#include -#include - #include #include "mc/datatypes.h" #include "src/mc/mc_private.hpp" -#include "src/mc/ObjectInformation.hpp" -#include "src/mc/Type.hpp" -#include "src/mc/Variable.hpp" +#include "src/mc/inspect/ObjectInformation.hpp" +#include "src/mc/inspect/Type.hpp" +#include "src/mc/inspect/Variable.hpp" #include "src/mc/remote/RemoteClient.hpp" +#include +#include + // Test broken with multi-dimensional arrays. See https://sourceware.org/bugzilla/show_bug.cgi?id=22546 // int test_some_array[4][5][6]; int test_some_array[4 * 5 * 6]; -- 2.20.1