Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Noric Couderc
JBrainy
Commits
3c763575
Commit
3c763575
authored
Nov 15, 2021
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/src/main/kotlin/se/lth/cs/papicounters/PapiTracerRunner.kt
View file @
3c763575
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment