Skip to content

Commit

Permalink
Add flow events for tasks on the same thread when fed by the taskStub…
Browse files Browse the repository at this point in the history
…s API
  • Loading branch information
khuck committed Oct 7, 2024
1 parent bf89683 commit 8aa0bf9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/apex/apex_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,9 @@ inline unsigned int sc_nprocessors_onln(void)
macro (APEX_TAU, use_tau, bool, false, "Enable TAU profiling (if application is executed with tau_exec).") \
macro (APEX_OTF2, use_otf2, bool, false, "Enable OTF2 trace output.") \
macro (APEX_OTF2_COLLECTIVE_SIZE, otf2_collective_size, int, 1, "") \
macro (APEX_TRACE_EVENT, use_trace_event, bool, false, "Enable Google Trace Event output. (deprecated, please use APEX_PERFETTO)") \
macro (APEX_PERFETTO, use_perfetto, bool, false, "Enable Perfetto Trace output.") \
macro (APEX_TRACE_EVENT, use_trace_event, bool, false, "Enable Google Trace Event output.") \
macro (APEX_TRACE_THREAD_FLOW, use_thread_flow, bool, false, "Enable flow events between tasks on same thread.") \
macro (APEX_PERFETTO, use_perfetto, bool, false, "Enable Perfetto Trace output (not recommended, use Google Trace Event instead).") \
macro (APEX_POLICY, use_policy, bool, true, "Enable APEX policy listener and execute registered policies.") \
macro (APEX_MEASURE_CONCURRENCY, use_concurrency, int, 0, "Periodically sample thread activity and output report at exit.") \
macro (APEX_MEASURE_CONCURRENCY_MAX_TIMERS, concurrency_max_timers, int, 5, "Maximum number of timers in the concurrency report.") \
Expand Down
1 change: 1 addition & 0 deletions src/apex/taskstubs_implementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ extern "C" {
// library function declarations
void tasktimer_initialize_impl(void) {
apex::init("PerfStubs API", 0, 1);
apex::apex_options::use_thread_flow(true);
}
void tasktimer_finalize_impl(void) {
/* Debatable whether we want to do this finalize */
Expand Down
2 changes: 1 addition & 1 deletion src/apex/trace_event_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ inline void trace_event_listener::_common_stop(std::shared_ptr<profiler> &p) {
for (auto& parent : p->tt_ptr->parents) {
if (parent != nullptr && parent != main_wrapper
#ifndef APEX_HAVE_HPX // ...except for HPX - make the flow event regardless
&& (parent->thread_id != _tid)
&& (parent->thread_id != _tid || apex_options::use_thread_flow())
#endif
) {
//std::cout << "FLOWING!" << std::endl;
Expand Down

0 comments on commit 8aa0bf9

Please sign in to comment.