1 /* Copyright (c) 2016. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SMPI_PRIVATE_HPP
7 #define SMPI_PRIVATE_HPP
9 #include "src/instr/instr_smpi.h"
10 #include <unordered_map>
14 * Get the address of the beginning of the memory page where addr is located.
15 * Note that we use an integer division here, so (a/b)*b is not a, unless a%b == 0
17 * This is used when privatizing.
19 #define TOPAGE(addr) (void *)(((unsigned long)(addr) / xbt_pagesize) * xbt_pagesize)
23 std::vector<std::pair</* counter name */std::string, /* counter value */long long>> papi_counter_t;
24 XBT_PRIVATE papi_counter_t& smpi_process_papi_counters();
25 XBT_PRIVATE int smpi_process_papi_event_set();
28 extern std::unordered_map<std::string, double> location2speedup;
30 /** @brief Returns the last call location (filename, linenumber). Process-specific. */
32 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_process_get_call_location();
33 XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location();