diff --git a/src/vt/runnable/invoke.h b/src/vt/runnable/invoke.h index 9ed25f5b88..ccd5a3ee75 100644 --- a/src/vt/runnable/invoke.h +++ b/src/vt/runnable/invoke.h @@ -85,9 +85,7 @@ static std::string CreateEventName() { std::vector arg_types = {TE::getTypeName()...}; auto argsV = DU::join(",", arg_types); - auto valueName = - TE::lastNamedPfType(TE::prettyFunctionForValue(), "T" - ); + auto valueName = TE::getValueName(); auto barename = TE::getBarename(valueName); return DU::removeSpaces(barename + "(" + argsV + ")"); @@ -140,11 +138,19 @@ struct CallableWrapper { template static trace::TraceProcessingTag BeginProcessingInvokeEvent() { const auto trace_id = CallableWrapper::GetTraceID(); - const auto trace_event = theTrace()->localInvoke(trace_id); + const auto trace_event = theTrace()->messageCreation(trace_id, 0); const auto from_node = theContext()->getNode(); return theTrace()->beginProcessing(trace_id, 0, trace_event, from_node); } + +template +static void EndProcessingInvokeEvent(trace::TraceProcessingTag processing_tag) { + theTrace()->endProcessing(processing_tag); + + const auto trace_id = CallableWrapper::GetTraceID(); + theTrace()->messageCreation(trace_id, 0); +} #endif template < @@ -180,7 +186,7 @@ util::Copyable invoke(Args&&... args) { const auto& returnVal = invokeImpl(f, std::forward(args)...); #if vt_check_enabled(trace_enabled) - theTrace()->endProcessing(processing_tag); + EndProcessingInvokeEvent(processing_tag); #endif return returnVal; @@ -196,7 +202,7 @@ util::NotCopyable invoke(Args&&... args) { auto&& returnVal = invokeImpl(f, std::forward(args)...); #if vt_check_enabled(trace_enabled) - theTrace()->endProcessing(processing_tag); + EndProcessingInvokeEvent(processing_tag); #endif return std::move(returnVal); @@ -212,7 +218,7 @@ util::IsVoidReturn invoke(Args&&... args) { invokeImpl(f, std::forward(args)...); #if vt_check_enabled(trace_enabled) - theTrace()->endProcessing(processing_tag); + EndProcessingInvokeEvent(processing_tag); #endif } diff --git a/src/vt/trace/trace.cc b/src/vt/trace/trace.cc index 44495a2d60..af5f390527 100644 --- a/src/vt/trace/trace.cc +++ b/src/vt/trace/trace.cc @@ -635,19 +635,6 @@ void Trace::endIdle(double const time) { emitTraceForTopProcessingEvent(time, TraceConstantsType::BeginProcessing); } -TraceEventIDType -Trace::localInvoke(TraceEntryIDType const ep, double const time) { - if (not checkDynamicRuntimeEnabled()) { - return no_trace_event; - } - - auto const type = TraceConstantsType::Creation; - - NodeType const node = theContext()->getNode(); - - return logEvent(LogType{time, ep, type, node, 0}); -} - TraceEventIDType Trace::messageCreation( TraceEntryIDType const ep, TraceMsgLenType const len, double const time ) { diff --git a/src/vt/trace/trace.h b/src/vt/trace/trace.h index 59084c5852..1c29e2fef4 100644 --- a/src/vt/trace/trace.h +++ b/src/vt/trace/trace.h @@ -384,17 +384,6 @@ struct Trace : runtime::component::Component { double const time = getCurrentTime() ); - /** - * \brief Log a local function invoke - * - * \param[in] ep the registered function's event ID - * \param[in] time the time of the event - * - * \return the trace event ID - */ - TraceEventIDType - localInvoke(TraceEntryIDType const ep, double const time = getCurrentTime()); - /** * \brief Log a message send *