Commit 3c763575 authored by Noric Couderc's avatar Noric Couderc
Browse files

Avoid too much cleaning of eventSets

We don't need to clean the eventSets if we used the same set at the
previous Spec
parent 1631673c
......@@ -93,17 +93,23 @@ open class PapiTracerRunner() : PapiRunner() {
return g
}
private var lastCountersUsed : List<PAPICounter>? = null
fun runIterations(spec : PapiBenchmarkAnalyzer.RunSpec) : List<List<TraceRecord>> {
val counters = spec.counters()
.filter { ! it.isSpecial() } // These are active by default.
.map { it.toPAPIConstant()!! }
Tracer.clearCounters();
Tracer.reset()
Tracer.isTracing = true
for (c in counters) {
Tracer.addCounter(c)
if (spec.counters() != lastCountersUsed) {
System.err.println("Counters changed: (${spec.counters()} /vs/ $lastCountersUsed), cleaning")
val counters = spec.counters()
.filter { ! it.isSpecial() } // These are active by default.
.map { it.toPAPIConstant()!! }
Tracer.clearCounters();
for (c in counters) {
Tracer.addCounter(c)
}
lastCountersUsed = spec.counters()
}
val rangeIterations = 0 until spec.numberRuns
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment