diff --git a/src/TSOTraceBuilder.cpp b/src/TSOTraceBuilder.cpp index a1cf962c8..cc1b1d061 100644 --- a/src/TSOTraceBuilder.cpp +++ b/src/TSOTraceBuilder.cpp @@ -32,6 +32,7 @@ TSOTraceBuilder::TSOTraceBuilder(const Configuration &conf) : TSOPSOTraceBuilder replay = false; last_full_memory_conflict = -1; last_md = 0; + replay_point = 0; } TSOTraceBuilder::~TSOTraceBuilder(){ @@ -161,7 +162,7 @@ void TSOTraceBuilder::mark_unavailable(int proc, int aux){ } bool TSOTraceBuilder::is_replaying() const { - return replay; + return prefix_idx < replay_point; } void TSOTraceBuilder::cancel_replay(){ @@ -232,6 +233,7 @@ bool TSOTraceBuilder::reset(){ /* No more branching is possible. */ return false; } + replay_point = i; /* Setup the new Event at prefix[i] */ { diff --git a/src/TSOTraceBuilder.h b/src/TSOTraceBuilder.h index 0409f0d6d..1e82c4fe5 100644 --- a/src/TSOTraceBuilder.h +++ b/src/TSOTraceBuilder.h @@ -358,6 +358,11 @@ class TSOTraceBuilder : public TSOPSOTraceBuilder{ */ bool replay; + /* The number of events that were or are going to be replayed in the + * current computation. + */ + int replay_point; + /* The latest value passed to this->metadata(). */ const llvm::MDNode *last_md;