Skip to content

Commit

Permalink
Porting/bench.pl: handle changes to cachegrind
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz authored and Leont committed May 24, 2023
1 parent fbcc226 commit 7dd90ef
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Porting/bench.pl
Expand Up @@ -902,22 +902,22 @@ sub parse_cachegrind {
die "Error: while executing $id:\n"
. "unexpected code or cachegrind output:\n$_\n";
}
if (/I refs:\s+([\d,]+)/) {
if (/I\s+refs:\s+([\d,]+)/) {
$res{Ir} = $1;
}
elsif (/I1 misses:\s+([\d,]+)/) {
elsif (/I1\s+misses:\s+([\d,]+)/) {
$res{Ir_m1} = $1;
}
elsif (/LLi misses:\s+([\d,]+)/) {
elsif (/LLi\s+misses:\s+([\d,]+)/) {
$res{Ir_mm} = $1;
}
elsif (/D refs:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
elsif (/D\s+refs:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
@res{qw(Dr Dw)} = ($1,$2);
}
elsif (/D1 misses:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
elsif (/D1\s+misses:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
@res{qw(Dr_m1 Dw_m1)} = ($1,$2);
}
elsif (/LLd misses:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
elsif (/LLd\s+misses:\s+.*?([\d,]+) rd .*?([\d,]+) wr/) {
@res{qw(Dr_mm Dw_mm)} = ($1,$2);
}
elsif (/Branches:\s+.*?([\d,]+) cond .*?([\d,]+) ind/) {
Expand Down Expand Up @@ -1185,7 +1185,7 @@ sub grind_run {
$envstr .= "$_=$env->{$_} " for sort keys %$env;
}
my $cmd = "PERL_HASH_SEED=0 $envstr"
. "valgrind --tool=cachegrind --branch-sim=yes "
. "valgrind --tool=cachegrind --branch-sim=yes --cache-sim=yes "
. "--cachegrind-out-file=/dev/null "
. "$OPTS{grindargs} "
. "$perl $OPTS{perlargs} $args - $counts->[$j] 2>&1";
Expand Down

0 comments on commit 7dd90ef

Please sign in to comment.