- $TotReads = $2;
- $TotWrites = $3;
- }
- }
- close(STATS);
-}
-
-sub process_heimdall_file {
-
- open(STATS, "< $HeimdallStats") || die("Can't open $HeimdallStats\n");
-
- # instruction counts from Julian Seward's HEIMDALL:
- #
- # === HEIMDALL: instruction counts: 815000 instrs, 230040 reads, 138692 writes
- while (<STATS>) {
- /^=== HEIMDALL: instruction counts: ([0-9]+) instrs, ([0-9]+) reads, ([0-9]+) writes/
- && do {
- $TotInstrs = $1;
- $TotReads = $2;
- $TotWrites = $3;
- }
- }
- close(STATS);
+ $TotInstrs =~ s/,//g;
+ };
+
+ /^==\d+==\s+D\s+refs:\s+[0-9,]+\s+\(([0-9,]+)\s+rd\s+\+\s+([0-9,]+)\s+wr/ && do {
+ $TotReads = $1;
+ $TotWrites = $2;
+ $TotReads =~ s/,//g;
+ $TotWrites =~ s/,//g;
+ };
+
+ /^==\d+==\s+L2d\s+misses:\s+([0-9,]+)/ && do {
+ $TotMisses = $1;
+ $TotMisses =~ s/,//g;
+ };
+ }
+ close(STATS);