Commit 48527be0 authored by Noric Couderc's avatar Noric Couderc
Browse files

Fix: Handle more than 2 counters

We can actually handle more than 2 counters! So we make sure we do
parent 4b7d9357
......@@ -98,12 +98,12 @@ open class PapiTracerRunner() : PapiRunner() {
.filter { ! it.isSpecial() } // These are active by default.
.map { it.toPAPIConstant()!! }
when (counters.size) {
// Only default counters
0 -> Tracer.isTracing = true
1 -> Tracer.setCounters(counters.first())
2 -> Tracer.setCounters(counters[0], counters[1])
// Shouldn't happen with more elements
Tracer.clearCounters();
Tracer.reset()
Tracer.isTracing = true
for (c in counters) {
Tracer.addCounter(c)
}
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