Skip to content

Commit

Permalink
#642 fix trace guard
Browse files Browse the repository at this point in the history
- Was incorrectly guarding 'event type' == 0, which CAN be true..
  ..even if it probably should be the case. Now guards against
  the 'entry id' itself.
  • Loading branch information
pnstickne committed Feb 8, 2020
1 parent e06e58a commit a8a0c92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/vt/trace/trace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ TraceProcessingTag Trace::beginProcessing(
}

void Trace::endProcessing(
TraceProcessingTag const processing_tag,
TraceProcessingTag const& processing_tag,
double const time
) {
if (not checkDynamicRuntimeEnabled()) {
Expand All @@ -447,7 +447,7 @@ void Trace::endProcessing(
TraceEventIDType event = processing_tag.event_;

// Allow no-op cases (ie. beginProcessing disabled)
if (event == trace::no_trace_event) {
if (ep == trace::no_trace_entry_id) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/vt/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct Trace {
/// Finalize a paired event.
/// The processing_tag value comes from beginProcessing.
void endProcessing(
TraceProcessingTag processing_tag,
TraceProcessingTag const& processing_tag,
double const time = getCurrentTime()
);

Expand Down

0 comments on commit a8a0c92

Please sign in to comment.