@@ -361,6 +361,22 @@ struct Trace : runtime::component::Component<Trace>, TraceLite {
361361 */
362362 bool inIdleEvent () const ;
363363
364+ /* *
365+ * \brief Set if we are inside an invoke context
366+ *
367+ * \param[in] set the variable value to set
368+ */
369+ void setInInvokeContext (bool set) {
370+ inside_invoke_context_ = set;
371+ }
372+
373+ /* *
374+ * \brief Return if we are inside an invoke context
375+ *
376+ * \return whether we are inside an invoke context
377+ */
378+ bool inInvokeContext () const { return inside_invoke_context_; }
379+
364380 friend void insertNewUserEvent (UserEventIDType event, std::string const & name);
365381
366382 template <typename SerializerT>
@@ -385,7 +401,8 @@ struct Trace : runtime::component::Component<Trace>, TraceLite {
385401 | trace_enabled_cur_phase_
386402 | flush_event_
387403 | between_sched_event_type_
388- | between_sched_event_;
404+ | between_sched_event_
405+ | inside_invoke_context_;
389406
390407 s.skip (log_file_); // definition unavailable
391408 }
@@ -398,15 +415,12 @@ struct Trace : runtime::component::Component<Trace>, TraceLite {
398415 int incremental_flush_mode = 0 ;
399416
400417private:
401-
402-
403418 ObjGroupProxyType spec_proxy_ = vt::no_obj_group;
404419
405-
406-
407420 // Processing event between top-level loops.
408421 TraceEntryIDType between_sched_event_type_ = no_trace_entry_id;
409422 TraceProcessingTag between_sched_event_;
423+ bool inside_invoke_context_ = false ;
410424};
411425
412426}} // end namespace vt::trace
0 commit comments