From 196de8bc409e54c21ff6fe693326487f6293e95f Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Wed, 20 Apr 2011 21:39:13 +0000 Subject: [PATCH] sprofalyze.pl: fix for forked-nonexeced processes --- commands/profile/sprofalyze.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/profile/sprofalyze.pl b/commands/profile/sprofalyze.pl index bea237055..d631c2bff 100755 --- a/commands/profile/sprofalyze.pl +++ b/commands/profile/sprofalyze.pl @@ -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: "; -- 2.44.0