]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge r6601 (Callgrind: Fix threads display of "callgrind_control -s")
authorJulian Seward <jseward@acm.org>
Mon, 30 Apr 2007 08:36:52 +0000 (08:36 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 30 Apr 2007 08:36:52 +0000 (08:36 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH@6712

callgrind/callgrind_control.in

index af0ea71356ecb06af294ca94cfb752cdaed567e8..d2e1ff57f6ae8c69d6004042b5ed6aa58186d4b1 100644 (file)
@@ -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(<RESULT>) {
@@ -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";
     }