From: Christian Heinrich Date: Wed, 6 Jul 2016 14:51:24 +0000 (+0200) Subject: [SMPI] Make trace_call_location a member X-Git-Tag: v3_14~784^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e64baa30ebcf76e39a3b3994b9364f52e2b93cd5?ds=sidebyside [SMPI] Make trace_call_location a member --- diff --git a/src/smpi/smpi_global.cpp b/src/smpi/smpi_global.cpp index fd2d8f05be..595b87954f 100644 --- a/src/smpi/smpi_global.cpp +++ b/src/smpi/smpi_global.cpp @@ -61,7 +61,7 @@ typedef struct s_smpi_process_data { bool replaying; /* is the process replaying a trace */ xbt_bar_t finalization_barrier; int return_value; - smpi_trace_call_location_t* trace_call_loc; + smpi_trace_call_location_t trace_call_loc; #if HAVE_PAPI /** Contains hardware data as read by PAPI **/ int papi_event_set; @@ -258,7 +258,7 @@ int smpi_process_count() smpi_trace_call_location_t* smpi_process_get_call_location() { smpi_process_data_t process_data = smpi_process_data(); - return process_data->trace_call_loc; + return &process_data->trace_call_loc; } int smpi_process_index() @@ -569,10 +569,6 @@ void smpi_global_init() process_data[i]->finalization_barrier = nullptr; process_data[i]->return_value = 0; - if (xbt_cfg_get_boolean("smpi/trace-call-location")) { - process_data[i]->trace_call_loc = xbt_new(smpi_trace_call_location_t, 1); - } - #if HAVE_PAPI if (xbt_cfg_get_string("smpi/papi-events")[0] != '\0') { // TODO: Implement host/process/thread based counters. This implementation @@ -626,9 +622,6 @@ void smpi_global_destroy() } xbt_os_timer_free(process_data[i]->timer); xbt_mutex_destroy(process_data[i]->mailboxes_mutex); - if (xbt_cfg_get_boolean("smpi/trace-call-location")) { - xbt_free(process_data[i]->trace_call_loc); - } delete process_data[i]; } delete[] process_data;