Commit 6a9b1c4b authored by Noric Couderc's avatar Noric Couderc
Browse files

Fixed initialization of Tracer from sm-java

addCounter should do things the smart way, so we use that.
parent b8c18fa1
import com.google.common.graph.*
import com.google.common.graph.GraphBuilder
import com.google.common.graph.MutableGraph
import org.junit.jupiter.api.*
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.ValueSource
import org.openjdk.jmh.infra.Blackhole
import papi.Constants
import papi.EventSet
import papi.Papi
import se.lth.cs.CounterSpecification
import se.lth.cs.CounterSpecification.Companion.fromFile
import se.lth.cs.bcgen.BCBenchmarkPackage
import se.lth.cs.papicounters.PAPICounter
import se.lth.cs.papicounters.PapiBenchmarkAnalyzer
......@@ -30,12 +28,11 @@ class TracingCollectionRunnerTest {
@BeforeAll()
@JvmStatic
fun initPapi() {
fun initTracer() {
System.out.println("Initialize PAPI")
Tracer.JPAPI = true
val counters = listOf<Int>(Constants.PAPI_TOT_CYC, Constants.PAPI_TOT_INS).toIntArray()
Tracer.JPAPI_COUNTERS = counters
Papi.init()
Tracer.addCounter(Constants.PAPI_TOT_CYC)
Tracer.addCounter(Constants.PAPI_TOT_INS)
}
}
......
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