7 open (FILE
, $file) or die ("Unable to open $file: $!");
12 read(FILE
, $buf, $SAMPLE_SZ) == $SAMPLE_SZ or die ("Short read.");
13 ($exe, $pc) = unpack("A8i", $buf);
15 # System and clock task are in kernel image.
16 # $exe =~ s/^system/kernel/;
17 # $exe =~ s/^clock/kernel/;
19 # Memory has p_name "mem" in kernel.
20 # $exe =~ s/^mem/memory/;
22 $pcs{$pc}++ if ($exe eq "fs");
25 foreach $pc (sort { $a <=> $b } keys %pcs) {
26 print "$pc $pcs{$pc}\n";