Skip to content

Commit 7dd90ef

Browse files
tonycozLeont
authored andcommitted
Porting/bench.pl: handle changes to cachegrind
The spacing of some of the output fields changed: https://sourceware.org/git/?p=valgrind.git;a=commit;h=2cccba7cae9f77aa6c2a498bc30a42bdb1ed8829 --cache-sim=no is now the default: https://sourceware.org/git/?p=valgrind.git;a=commit;h=57dbcacfdbff0d4c12dcd52ff56f159631499dc6 Fixes #21105
1 parent fbcc226 commit 7dd90ef

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Porting/bench.pl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -902,22 +902,22 @@ sub parse_cachegrind {
902902
die "Error: while executing $id:\n"
903903
. "unexpected code or cachegrind output:\n$_\n";
904904
}
905-
if (/I refs:\s+([\d,]+)/) {
905+
if (/I\s+refs:\s+([\d,]+)/) {
906906
$res{Ir} = $1;
907907
}
908-
elsif (/I1 misses:\s+([\d,]+)/) {
908+
elsif (/I1\s+misses:\s+([\d,]+)/) {
909909
$res{Ir_m1} = $1;
910910
}
911-
elsif (/LLi misses:\s+([\d,]+)/) {
911+
elsif (/LLi\s+misses:\s+([\d,]+)/) {
912912
$res{Ir_mm} = $1;
913913
}
914-
elsif (/D refs:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
914+
elsif (/D\s+refs:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
915915
@res{qw(Dr Dw)} = ($1,$2);
916916
}
917-
elsif (/D1 misses:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
917+
elsif (/D1\s+misses:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
918918
@res{qw(Dr_m1 Dw_m1)} = ($1,$2);
919919
}
920-
elsif (/LLd misses:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
920+
elsif (/LLd\s+misses:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
921921
@res{qw(Dr_mm Dw_mm)} = ($1,$2);
922922
}
923923
elsif (/Branches:\s+.*?([\d,]+) cond .*?([\d,]+) ind/) {
@@ -1185,7 +1185,7 @@ sub grind_run {
11851185
$envstr .= "$_=$env->{$_} " for sort keys %$env;
11861186
}
11871187
my $cmd = "PERL_HASH_SEED=0 $envstr"
1188-
. "valgrind --tool=cachegrind --branch-sim=yes "
1188+
. "valgrind --tool=cachegrind --branch-sim=yes --cache-sim=yes "
11891189
. "--cachegrind-out-file=/dev/null "
11901190
. "$OPTS{grindargs} "
11911191
. "$perl $OPTS{perlargs} $args - $counts->[$j] 2>&1";

0 commit comments

Comments
 (0)