From e3531fcad45575830870605f5fd3a80b6b6f0ec7 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Tue, 4 Feb 2014 10:18:59 +0100 Subject: [PATCH] [mc] Remove code for finding an array byte size This was useless as it was already handled by libdw dwarf_aggregate_size. --- src/mc/mc_checkpoint.c | 5 +++++ src/mc/mc_global.c | 22 ---------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index 5aeff819d3..d2efa6ef70 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -239,12 +239,17 @@ void MC_init_memory_map_info(){ } +static void MC_post_process_types(mc_object_info_t info) { + // Nothing here +} + /** \brief Finds informations about a given shared object/executable */ mc_object_info_t MC_find_object_info(memory_map_t maps, char* name) { mc_object_info_t result = MC_new_object_info(); result->file_name = xbt_strdup(name); MC_find_object_address(maps, result); MC_dwarf_get_variables(result); + MC_post_process_types(result); return result; } diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 7bf5c97157..b3cc8baac2 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -19,8 +19,6 @@ #include "xbt/automaton.h" #include "xbt/dict.h" -static void MC_post_process_types(mc_object_info_t info); - XBT_LOG_NEW_CATEGORY(mc, "All MC categories"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)"); @@ -435,26 +433,6 @@ void MC_dwarf_register_variable(mc_object_info_t info, dw_frame_t frame, dw_vari MC_dwarf_register_non_global_variable(info, frame, variable); } -static void MC_post_process_array_size(mc_object_info_t info, dw_type_t type) { - xbt_assert(type->dw_type_id, "No base type for array <%p>%s", type->id, type->name); - dw_type_t subtype = xbt_dict_get_or_null(info->types, type->dw_type_id); - xbt_assert(subtype, "Unkown base type <%s> for array <%p>%s", type->dw_type_id, type->id, type->name); - if(subtype->type==DW_TAG_array_type && type->byte_size==0) { - MC_post_process_array_size(info, subtype); - } - type->byte_size = type->element_count*subtype->byte_size; -} - -static void MC_post_process_types(mc_object_info_t info) { - xbt_dict_cursor_t cursor; - char *origin; - dw_type_t type; - xbt_dict_foreach(info->types, cursor, origin, type){ - if(type->type==DW_TAG_array_type && type->byte_size==0) - MC_post_process_array_size(info, type); - } -} - /******************************* Ignore mechanism *******************************/ /*********************************************************************************/ -- 2.20.1