Skip to content

Commit

Permalink
Bias --dump-spec towards earlier edges over later
Browse files Browse the repository at this point in the history
This is an attempted fix aimed at a perceived flaw in --dump-spec, in
that it generates specs that are "technically correct", by only matching
one trace due to containing IIDs that are unique to that trace, but
"miss the point" in what characterises the trace.

This change does sometimes result in larger specs, but hopefully closer
to what a human would write.
  • Loading branch information
margnus1 committed Nov 9, 2017
1 parent db4afa3 commit 259b4d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/TraceDumper.cpp
Expand Up @@ -316,15 +316,15 @@ namespace TraceDumper {
*/
static void delete_implied(trace_set_spec &set, const DPORDriver::Result &res) {
for (trace_spec &spec : set) {
for (auto it = spec.begin(); it != spec.end();) {
for (auto it = spec.end();;) {
if (it == spec.begin()) break;
--it;
auto traces = get_traces(res);
for (auto it2 = spec.begin(); it2 != spec.end(); ++it2) {
if (it2 != it) filter_traces(traces, *it2);
}
if (traces.size() == 1) {
it = spec.erase(it);
} else {
++it;
}
}
}
Expand Down

0 comments on commit 259b4d2

Please sign in to comment.