@@ -351,7 +351,8 @@ RunnableMaker<U> makeRunnable(
351351}
352352
353353/* *
354- * \brief Make a new runnable without a message (void handler)
354+ * \brief Make a new runnable without a message (void handler) -- untraced
355+ * variant. Call \c makeRunnableVoidTraced if you want it to show up in tracing
355356 *
356357 * \param[in] is_threaded whether it is threaded
357358 * \param[in] handler the handler bits
@@ -364,11 +365,81 @@ inline RunnableMaker<BaseMsgType> makeRunnableVoid(
364365) {
365366 // These are currently only types of registry entries that can be void
366367 auto r = new RunnableNew (is_threaded);
367- // @todo: figure out how to trace this?
368368 r->addContextSetContext (r, from);
369369 return RunnableMaker<BaseMsgType>{r, nullptr , handler, from};
370370}
371371
372+ /* *
373+ * \brief Make a new runnable without a message (void handler) with tracing
374+ *
375+ * \param[in] is_threaded whether it is threaded
376+ * \param[in] handler the handler bits
377+ * \param[in] from the node that caused this runnable to execute
378+ *
379+ * \return the maker for further customization
380+ */
381+ inline RunnableMaker<BaseMsgType> makeRunnableVoidTraced (
382+ bool is_threaded, HandlerType handler, NodeType from,
383+ [[maybe_unused]] trace::TraceEventIDType trace_event,
384+ [[maybe_unused]] std::size_t msg_size
385+ ) {
386+ // These are currently only types of registry entries that can be void
387+ auto r = new RunnableNew (is_threaded);
388+ r->addContextSetContext (r, from);
389+
390+ #if vt_check_enabled(trace_enabled)
391+ auto const han_type = HandlerManager::getHandlerRegistryType (handler);
392+ if (han_type == auto_registry::RegistryTypeEnum::RegVrt or
393+ han_type == auto_registry::RegistryTypeEnum::RegGeneral or
394+ han_type == auto_registry::RegistryTypeEnum::RegObjGroup) {
395+ r->addContextTrace (trace_event, handler, from, msg_size);
396+ }
397+ #endif
398+
399+ return RunnableMaker<BaseMsgType>{r, nullptr , handler, from};
400+ }
401+
402+ /* *
403+ * \brief Make a new runnable without a message (void handler) with tracing for
404+ * collections
405+ *
406+ * \param[in] is_threaded whether it is threaded
407+ * \param[in] handler the handler bits
408+ * \param[in] from the node that caused this runnable to execute
409+ * \param[in] idx1 1-dimension index
410+ * \param[in] idx2 2-dimension index
411+ * \param[in] idx3 3-dimension index
412+ * \param[in] idx4 4-dimension index
413+ *
414+ * \return the maker for further customization
415+ */
416+ inline RunnableMaker<BaseMsgType> makeRunnableVoidTraced (
417+ bool is_threaded, HandlerType handler, NodeType from,
418+ [[maybe_unused]] trace::TraceEventIDType trace_event,
419+ [[maybe_unused]] std::size_t msg_size,
420+ [[maybe_unused]] uint64_t idx1,
421+ [[maybe_unused]] uint64_t idx2,
422+ [[maybe_unused]] uint64_t idx3,
423+ [[maybe_unused]] uint64_t idx4
424+ ) {
425+ // These are currently only types of registry entries that can be void
426+ auto r = new RunnableNew (is_threaded);
427+ r->addContextSetContext (r, from);
428+
429+ #if vt_check_enabled(trace_enabled)
430+ auto const han_type = HandlerManager::getHandlerRegistryType (handler);
431+ if (han_type == auto_registry::RegistryTypeEnum::RegVrtCollection or
432+ han_type == auto_registry::RegistryTypeEnum::RegVrtCollectionMember) {
433+ r->addContextTrace (
434+ trace_event, handler, from, msg_size, idx1, idx2, idx3, idx4
435+ );
436+ }
437+ #endif
438+
439+ return RunnableMaker<BaseMsgType>{r, nullptr , handler, from};
440+ }
441+
442+
372443}} /* end namespace vt::runnable */
373444
374445#include " vt/runnable/make_runnable.impl.h"
0 commit comments