From: Gabriel Corona Date: Wed, 4 May 2016 12:26:42 +0000 (+0200) Subject: [mc] Remove useless header file X-Git-Tag: v3_14~1274^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c5fa23d0d0ca68403115c1a460e3d7715217523c?hp=63e36b5e3deb6682ba14b5f4c7533d0b2c54a024 [mc] Remove useless header file --- diff --git a/src/mc/compare.cpp b/src/mc/compare.cpp index 3e6a37ee34..df86f558f5 100644 --- a/src/mc/compare.cpp +++ b/src/mc/compare.cpp @@ -34,21 +34,35 @@ #include "src/mc/mc_private.h" #include "src/mc/mc_smx.h" #include "src/mc/mc_dwarf.hpp" -#include "src/mc/malloc.hpp" #include "src/mc/Frame.hpp" #include "src/mc/ObjectInformation.hpp" #include "src/mc/Variable.hpp" -#include "src/mc/malloc.hpp" #include "src/mc/mc_private.h" #include "src/mc/mc_snapshot.h" #include "src/mc/mc_dwarf.hpp" #include "src/mc/Type.hpp" -using simgrid::mc::remote; - XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, xbt, "Logging specific to mc_compare in mc"); +namespace simgrid { +namespace mc { + +struct ProcessComparisonState; +struct StateComparator; + +static int compare_heap_area( + int process_index, const void *area1, const void* area2, + Snapshot* snapshot1, Snapshot* snapshot2, + xbt_dynar_t previous, Type* type, int pointer_level); + +static void reset_heap_information(void); + +} +} + +using simgrid::mc::remote; + /*********************************** Heap comparison ***********************************/ /***************************************************************************************/ @@ -272,15 +286,6 @@ void StateComparator::match_equals(xbt_dynar_t list) } } -int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2, - std::vector* i1, - std::vector* i2) -{ - if (mc_diff_info == nullptr) - mc_diff_info = std::unique_ptr(new StateComparator()); - return mc_diff_info->initHeapInformation(heap1, heap2, i1, i2); -} - void ProcessComparisonState::initHeapInformation(xbt_mheap_t heap, std::vector* i) { @@ -308,6 +313,17 @@ int StateComparator::initHeapInformation(xbt_mheap_t heap1, xbt_mheap_t heap2, return 0; } +static +int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2, + std::vector* i1, + std::vector* i2) +{ + if (mc_diff_info == nullptr) + mc_diff_info = std::unique_ptr(new StateComparator()); + return mc_diff_info->initHeapInformation(heap1, heap2, i1, i2); +} + +static inline void reset_heap_information() { @@ -323,6 +339,7 @@ mc_mem_region_t MC_get_heap_region(simgrid::mc::Snapshot* snapshot) xbt_die("No heap region"); } +static int mmalloc_compare_heap(simgrid::mc::Snapshot* snapshot1, simgrid::mc::Snapshot* snapshot2) { simgrid::mc::Process* process = &mc_model_checker->process(); @@ -989,6 +1006,7 @@ static simgrid::mc::Type* get_offset_type(void *real_base_address, simgrid::mc:: * @param pointer_level * @return 0 (same), 1 (different), -1 */ +static int compare_heap_area(int process_index, const void *area1, const void *area2, simgrid::mc::Snapshot* snapshot1, simgrid::mc::Snapshot* snapshot2, xbt_dynar_t previous, simgrid::mc::Type* type, int pointer_level) diff --git a/src/mc/malloc.hpp b/src/mc/malloc.hpp deleted file mode 100644 index b07d3ed0b8..0000000000 --- a/src/mc/malloc.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2010-2016. 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. */ - -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. - This file was then part of the GNU C Library. */ - -#ifndef SIMGRID_MC_MALLOC_HPP -#define SIMGRID_MC_MALLOC_HPP - -#include - -#include -#include - -#include "src/mc/mc_forward.hpp" -#include "src/mc/Process.hpp" - -namespace simgrid { -namespace mc { - -XBT_PRIVATE int mmalloc_compare_heap(Snapshot* snapshot1, Snapshot* snapshot2); -XBT_PRIVATE int mmalloc_linear_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2); -XBT_PRIVATE int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2, - std::vector* i1, - std::vector* i2); -XBT_PRIVATE int compare_heap_area( - int process_index, const void *area1, const void* area2, - Snapshot* snapshot1, Snapshot* snapshot2, - xbt_dynar_t previous, Type* type, int pointer_level); -XBT_PRIVATE void reset_heap_information(void); - -} -} - -#endif diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 352470f0de..73202b4c49 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -576,7 +576,6 @@ set(MC_SRC src/mc/mc_mmalloc.h src/mc/LivenessChecker.hpp src/mc/LocationList.hpp - src/mc/malloc.hpp src/mc/LocationList.cpp src/mc/LivenessChecker.cpp src/mc/mc_record.cpp