Skip to content

Commit daf9994

Browse files
committed
Add region probe infrastructure
The region probes are divided in three levels: - User probes: defined by the user using ttg::user_probe; compile with -DTTG_ENABLE_USER_PROBES=1 to enable. - Task probes: task execution instrumentation using names provided to ttg::Op; compile with -DTTG_ENABLE_TASK_PROBES=1 to enable. - Internal probes: all the gory runtime-internal details; compile with -DTTG_ENABLE_INTERNAL_PROBES=1 to enable. At the moment, the latter two are only available in the PaRSEC backend. User probes can be defined any time and work with any backend that uses PaRSEC. To enable tracing in PaRSEC, users have to export the following two environment variables: - PARSEC_MCA_mca_pins=task_profiler - PARSEC_MCA_profile_filename=<filename> (files must not exist) Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
1 parent cf20fa4 commit daf9994

File tree

4 files changed

+348
-71
lines changed

4 files changed

+348
-71
lines changed

ttg/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ set(ttg-util-headers
1313
${CMAKE_CURRENT_SOURCE_DIR}/ttg/util/macro.h
1414
${CMAKE_CURRENT_SOURCE_DIR}/ttg/util/meta.h
1515
${CMAKE_CURRENT_SOURCE_DIR}/ttg/util/print.h
16+
${CMAKE_CURRENT_SOURCE_DIR}/ttg/util/region_probe.h
1617
${CMAKE_CURRENT_SOURCE_DIR}/ttg/util/span.h
1718
${CMAKE_CURRENT_SOURCE_DIR}/ttg/util/trace.h
1819
${CMAKE_CURRENT_SOURCE_DIR}/ttg/util/tree.h

ttg/ttg/madness/ttg.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "ttg/util/meta.h"
2222
#include "ttg/util/void.h"
2323
#include "ttg/world.h"
24+
#include "ttg/util/region_probe.h"
2425

2526
#include <array>
2627
#include <cassert>
@@ -126,6 +127,11 @@ namespace ttg_madness {
126127
std::shared_ptr<ttg::base::WorldImplBase> world_sptr{static_cast<ttg::base::WorldImplBase *>(world_ptr)};
127128
ttg::World world{std::move(world_sptr)};
128129
ttg::detail::set_default_world(std::move(world));
130+
131+
/* initialize probes */
132+
ttg::detail::region_probe<ttg::detail::TTG_REGION_PROBE_INTERNAL>::register_deferred_probes();
133+
ttg::detail::region_probe<ttg::detail::TTG_REGION_PROBE_TASKS>::register_deferred_probes();
134+
ttg::detail::region_probe<ttg::detail::TTG_REGION_PROBE_USER>::register_deferred_probes();
129135
}
130136
inline void ttg_finalize() {
131137
ttg::detail::set_default_world(ttg::World{}); // reset the default world

0 commit comments

Comments
 (0)