X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3811869b798996bc777e7262a42b531d044716c9..51d4edd27c6eb85f2db6df6d531d1538739cfbb3:/src/smpi/private.hpp diff --git a/src/smpi/private.hpp b/src/smpi/private.hpp index 6d3e172357..a5c1aed3b9 100644 --- a/src/smpi/private.hpp +++ b/src/smpi/private.hpp @@ -7,17 +7,30 @@ #define SMPI_PRIVATE_HPP #include "src/instr/instr_smpi.h" +#include +#include -#ifdef HAVE_PAPI +/** + * Get the address of the beginning of the memory page where addr is located. + * Note that we use an integer division here, so (a/b)*b is not a, unless a%b == 0 + * + * This is used when privatizing. + */ +#define TOPAGE(addr) (void *)(((unsigned long)(addr) / xbt_pagesize) * xbt_pagesize) + +#if HAVE_PAPI typedef std::vector> papi_counter_t; -XBT_PRIVATE papi_counter_t& smpi_process_counter_data(void); -XBT_PRIVATE int smpi_process_event_set(void); +XBT_PRIVATE papi_counter_t& smpi_process_papi_counters(); +XBT_PRIVATE int smpi_process_papi_event_set(); #endif -extern std::map location2speedup; +extern std::unordered_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); +extern "C" { +XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location(); XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location(); +} #endif +