+
+ # the format of the info in this file is:
+ # OTHER(intrs,reads,writes,read-misses,write-misses)
+ # where read-misses and write-misses will both be zero if we're
+ # just counting instructions.
+ while (<STATS>) {
+ /OTHER\(\s*([0-9]+),\s*([0-9]+),\s*([0-9]+),\s*([0-9]+),\s*([0-9]+)\)/ && do {
+ $TotInstrs = $1;
+ $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