]> Zhao Yanbai Git Server - minix.git/commitdiff
sprofalyze.pl: fix for forked-nonexeced processes
authorDavid van Moolenbroek <david@minix3.org>
Wed, 20 Apr 2011 21:39:13 +0000 (21:39 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Wed, 20 Apr 2011 21:39:13 +0000 (21:39 +0000)
commands/profile/sprofalyze.pl

index bea2370559d20a2ad9e05f154a25146dec4fc5bc..d631c2bff1002e4c2377153493ca058499134767 100755 (executable)
@@ -230,6 +230,10 @@ sub process_datafile
        read(FILE, $buf, $SAMPLE_SIZE) == $SAMPLE_SIZE  or die ("Short read.");
        ($exe, $pc) = unpack("Z8i", $buf);
 
+       # The kernel mangles process names for debugging purposes.
+       # We compensate for that here.
+       $exe =~ s/\*F$//;
+
        # We can access the hash by pc because they are all in there.
                if (!defined(${$exe."_hash"}{$pc})) {
                print "ERROR: Undefined in symbol table indexes: ";