From: Julian Seward Date: Mon, 30 Apr 2007 08:36:52 +0000 (+0000) Subject: Merge r6601 (Callgrind: Fix threads display of "callgrind_control -s") X-Git-Tag: svn/VALGRIND_3_2_3~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=659e5792f1141b11d96f274d12e11f9780993370;p=thirdparty%2Fvalgrind.git Merge r6601 (Callgrind: Fix threads display of "callgrind_control -s") git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH@6712 --- diff --git a/callgrind/callgrind_control.in b/callgrind/callgrind_control.in index af0ea71356..d2e1ff57f6 100644 --- a/callgrind/callgrind_control.in +++ b/callgrind/callgrind_control.in @@ -370,6 +370,7 @@ foreach $pid (@pids) { %calls = (); %events = (); @events = (); + @threads = (); %totals = (); $exec_bbs = 0; @@ -378,7 +379,7 @@ foreach $pid (@pids) { $dist_calls = 0; $dist_ctxs = 0; $dist_funcs = 0; - $threads = 0; + $threads = ""; $events = ""; while() { @@ -410,7 +411,7 @@ foreach $pid (@pids) { elsif (/distinct-functions: (\d+)/) { $dist_funcs = $1; } elsif (/distinct-contexts: (\d+)/) { $dist_ctxs = $1; } elsif (/events: (.+)$/) { $events = $1; prepareEvents; } - elsif (/threads: (\d+)$/) { $threads = $1; } + elsif (/threads: (.+)$/) { $threads = $1; @threads = split " ", $threads; } elsif (/instrumentation: (\w+)$/) { $instrumentation = $1; } } @@ -423,7 +424,7 @@ foreach $pid (@pids) { if ($printStatus) { if ($requestEvents <1) { - print " Number of threads: $threads\n"; + print " Number of running threads: " .($#threads+1). ", thread IDs: $threads\n"; print " Events collected: $events\n"; }