summaryrefslogtreecommitdiff
path: root/ghc/utils/parallel/get_SN.pl
diff options
context:
space:
mode:
authorpartain <unknown>1996-07-25 21:33:42 +0000
committerpartain <unknown>1996-07-25 21:33:42 +0000
commit5eb1c77c795f92ed0f4c8023847e9d4be1a4fd0d (patch)
treeadb07110e00f00b2b2ef6365e16d5f58b260ce3c /ghc/utils/parallel/get_SN.pl
parentf7ecf7234c224489be8a5e63fced903b655d92ee (diff)
downloadhaskell-5eb1c77c795f92ed0f4c8023847e9d4be1a4fd0d.tar.gz
[project @ 1996-07-25 20:43:49 by partain]
Bulk of final changes for 2.01
Diffstat (limited to 'ghc/utils/parallel/get_SN.pl')
-rw-r--r--ghc/utils/parallel/get_SN.pl40
1 files changed, 40 insertions, 0 deletions
diff --git a/ghc/utils/parallel/get_SN.pl b/ghc/utils/parallel/get_SN.pl
new file mode 100644
index 0000000000..e9426855bf
--- /dev/null
+++ b/ghc/utils/parallel/get_SN.pl
@@ -0,0 +1,40 @@
+#!/usr/local/bin/perl
+#############################################################################
+
+#do get_SN($ARGV[0]);
+
+#exit 1;
+
+# ---------------------------------------------------------------------------
+
+sub get_SN {
+ local ($file) = @_;
+ local ($id,$idx,$sn);
+
+ open (FILE,$file) || die "get_SN: Can't open file $file\n";
+
+ $line_no=0;
+ while (<FILE>) {
+ next unless /END/;
+ # PE 0 [3326775]: END 0, SN 0, ST 0, EXP F, BB 194, HA 1464, RT 983079, BT 1449032 (7), FT 0 (0), LS 0, GS 27, MY T
+
+ if (/^PE\s*(\d+) \[(\d+)\]: END ([0-9a-fx]+), SN (\d+)/) {
+ $line_no++;
+ $idx = $3;
+ $id = hex($idx);
+ $sn = $4;
+ #print STDERR "Id: $id ($idx) --> $sn\n";
+ $id2sn{$id} = $sn;
+ }
+ }
+
+ # print STDERR "get_SN: $line_no lines processed\n";
+ close (FILE);
+
+ # print STDERR "Summary: " . "="x15 . "\n";
+ # foreach $key (keys %id2sn) {
+ # print STDERR "> $key --> $id2sn{$key}\n";
+ #}
+}
+
+1;