From 0ffe46c97f312f9af2b6eb0c4068a84d4523fb10 Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Thu, 26 May 2016 15:38:51 +0200 Subject: [PATCH] [SMPI/INSTR] Header cleanup. This removes nasty includes such as src/instr/instr_smpi.h and moves other includes to the right location as well. --- include/smpi/mpi.h | 4 ++-- src/instr/instr_smpi.h | 2 -- src/instr/instr_trace.cpp | 1 + src/smpi/instr_smpi.cpp | 1 - src/smpi/private.hpp | 1 + src/smpi/smpi_bench.cpp | 9 ++++----- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/smpi/mpi.h b/include/smpi/mpi.h index a5474a6fe1..665ac78b88 100644 --- a/include/smpi/mpi.h +++ b/include/smpi/mpi.h @@ -26,8 +26,8 @@ #endif #if TRACE_CALL_LOCATION -#include "src/instr/instr_smpi.h" -#include "smpi_extended_traces.h" +//#include "src/instr/instr_smpi.h" +#include #endif #endif diff --git a/src/instr/instr_smpi.h b/src/instr/instr_smpi.h index d80aed24d9..e371fd6b5e 100644 --- a/src/instr/instr_smpi.h +++ b/src/instr/instr_smpi.h @@ -20,8 +20,6 @@ typedef struct smpi_trace_call_location { } smpi_trace_call_location_t; -smpi_trace_call_location_t* smpi_trace_get_call_location(); - #ifdef __cplusplus } #endif diff --git a/src/instr/instr_trace.cpp b/src/instr/instr_trace.cpp index cfa70ee568..850f75efca 100644 --- a/src/instr/instr_trace.cpp +++ b/src/instr/instr_trace.cpp @@ -6,6 +6,7 @@ #include "src/instr/instr_private.h" #include "src/instr/instr_smpi.h" +#include "src/smpi/private.hpp" #include "xbt/virtu.h" /* sg_cmdline */ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_trace, instr, "tracing event system"); diff --git a/src/smpi/instr_smpi.cpp b/src/smpi/instr_smpi.cpp index 2618f2d8a0..4f0ae285f7 100644 --- a/src/smpi/instr_smpi.cpp +++ b/src/smpi/instr_smpi.cpp @@ -5,7 +5,6 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "private.h" -#include "private.hpp" #include #include #include diff --git a/src/smpi/private.hpp b/src/smpi/private.hpp index b0433fc3a5..cc87c97a1c 100644 --- a/src/smpi/private.hpp +++ b/src/smpi/private.hpp @@ -17,3 +17,4 @@ extern std::map location2speedup; * \brief Returns the last call location (filename, linenumber). Process-specific. */ XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location(void); +XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location(); diff --git a/src/smpi/smpi_bench.cpp b/src/smpi/smpi_bench.cpp index a997df03b7..891b66338f 100644 --- a/src/smpi/smpi_bench.cpp +++ b/src/smpi/smpi_bench.cpp @@ -738,12 +738,11 @@ void smpi_destroy_global_memory_segments(){ #endif } -extern "C" { - - smpi_trace_call_location_t* smpi_trace_get_call_location() { - return smpi_process_get_call_location(); - } +smpi_trace_call_location_t* smpi_trace_get_call_location() { + return smpi_process_get_call_location(); +} +extern "C" { /** These functions will be called from the user code **/ void smpi_trace_set_call_location(const char* file, const int line) { smpi_trace_call_location_t* loc = smpi_process_get_call_location(); -- 2.20.1