Skip to content

Commit

Permalink
#2187: Fix wrong constant being used in addUserNotePre/Epi
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Sep 4, 2024
1 parent e305ac2 commit b7419f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions src/vt/trace/trace_lite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void TraceLite::addUserNoteBracketedBeginTime(

vt_debug_print(
normal, trace,
"Trace::addUserNoteBracketedBeginTime: begin={}, note={}, event={}\n",
"Trace::addUserNoteBracketedBegin: begin={}, note={}, event={}\n",
begin, note, event
);

Expand Down Expand Up @@ -336,11 +336,10 @@ void TraceLite::addUserNoteBracketedEndTime(TraceEventIDType const event) {

vt_debug_print(
normal, trace,
"Trace::addUserNoteBracketedEndTime: end={}, event={}\n",
"Trace::addUserNoteBracketedEnd: end={}, event={}\n",
end, event
);

// Fixup end time of the note
if (event != no_trace_event) {
updateNoteEndTime(event, end, nullptr);
}
Expand All @@ -356,11 +355,10 @@ void TraceLite::addUserNoteBracketedEndTime(

vt_debug_print(
normal, trace,
"Trace::addUserNoteBracketedEndTime: end={}, new_note={}, event={}\n",
"Trace::addUserNoteBracketedEnd: end={}, new_note={}, event={}\n",
end, new_note, event
);

// Fixup end time of the note
if (event != no_trace_event) {
updateNoteEndTime(event, end, &new_note);
}
Expand Down
10 changes: 5 additions & 5 deletions src/vt/trace/trace_lite.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,23 +167,23 @@ struct TraceLite {
void disableTracing();

/**
* \brief Log a bracketed user event with begin time
* \brief Log the start of the bracketed user event
*
* \param[in] event the ID for the sts file
* \param[in] begin the begin time
*/
void addUserEventBracketedBeginTime(UserEventIDType event, TimeType begin);

/**
* \brief Log a bracketed user event with end time
* \brief Log the end of the bracketed user event
*
* \param[in] event the ID for the sts file
* \param[in] end the end time
*/
void addUserEventBracketedEndTime(UserEventIDType event, TimeType end);

/**
* \brief Log a user bracketed event with a note
* \brief Log the start of the bracketed user event with a note
*
* \note See \c TraceScopedNote for a safer scope-based logging mechanism for
* bracketed user events with a note.
Expand All @@ -196,7 +196,7 @@ struct TraceLite {
);

/**
* \brief Log a user bracketed event with a note
* \brief Log the end of the bracketed user event with a note
*
* \note See \c TraceScopedNote for a safer scope-based logging mechanism for
* bracketed user events with a note.
Expand All @@ -206,7 +206,7 @@ struct TraceLite {
void addUserNoteBracketedEndTime(TraceEventIDType const event);

/**
* \brief Log a user bracketed event with a note
* \brief Log the end of the bracketed user event with a note
*
* \note See \c TraceScopedNote for a safer scope-based logging mechanism for
* bracketed user events with a note.
Expand Down
4 changes: 2 additions & 2 deletions src/vt/trace/trace_user.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void addUserNotePre(
[[maybe_unused]] TraceEventIDType const in_event
) {
#if vt_check_enabled(trace_enabled)
if (in_event != no_user_event_id) {
if (in_event != no_trace_event) {
theTrace()->addUserNoteBracketedBeginTime(in_event, in_note);
}
#endif
Expand All @@ -111,7 +111,7 @@ void addUserNoteEpi(
[[maybe_unused]] TraceEventIDType const in_event
) {
#if vt_check_enabled(trace_enabled)
if (in_event != no_user_event_id) {
if (in_event != no_trace_event) {
theTrace()->addUserNoteBracketedEndTime(in_event, in_note);
}
#endif
Expand Down

0 comments on commit b7419f3

Please sign in to comment.