mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Zanussi <tzanussi@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, fweisbec@gmail.com, acme@ghostprotocols.net
Subject: [PATCH 5/9] perf/trace/scripting: workqueue-stats script cleanup
Date: Sun,  9 May 2010 23:46:56 -0500	[thread overview]
Message-ID: <1273466820-9330-6-git-send-email-tzanussi@gmail.com> (raw)
In-Reply-To: <1273466820-9330-1-git-send-email-tzanussi@gmail.com>

Some minor fixes for the workqueue-stats script:

- Fix nuisance 'use of uninitialized value' warnings

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
---
 tools/perf/scripts/perl/workqueue-stats.pl |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/scripts/perl/workqueue-stats.pl b/tools/perf/scripts/perl/workqueue-stats.pl
index 511302c..b84b126 100644
--- a/tools/perf/scripts/perl/workqueue-stats.pl
+++ b/tools/perf/scripts/perl/workqueue-stats.pl
@@ -71,9 +71,9 @@ sub trace_end
     printf("%3s %6s %6s\t%-20s\n", "---", "---", "----", "----");
     foreach my $pidhash (@cpus) {
 	while ((my $pid, my $wqhash) = each %$pidhash) {
-	    my $ins = $$wqhash{'inserted'};
-	    my $exe = $$wqhash{'executed'};
-	    my $comm = $$wqhash{'comm'};
+	    my $ins = $$wqhash{'inserted'} || 0;
+	    my $exe = $$wqhash{'executed'} || 0;
+	    my $comm = $$wqhash{'comm'} || "";
 	    if ($ins || $exe) {
 		printf("%3u %6u %6u\t%-20s\n", $cpu, $ins, $exe, $comm);
 	    }
@@ -87,9 +87,9 @@ sub trace_end
     printf("%3s %6s %6s\t%-20s\n", "---", "-------", "---------", "----");
     foreach my $pidhash (@cpus) {
 	while ((my $pid, my $wqhash) = each %$pidhash) {
-	    my $created = $$wqhash{'created'};
-	    my $destroyed = $$wqhash{'destroyed'};
-	    my $comm = $$wqhash{'comm'};
+	    my $created = $$wqhash{'created'} || 0;
+	    my $destroyed = $$wqhash{'destroyed'} || 0;
+	    my $comm = $$wqhash{'comm'} || "";
 	    if ($created || $destroyed) {
 		printf("%3u %6u %6u\t%-20s\n", $cpu, $created, $destroyed,
 		       $comm);
-- 
1.6.4.GIT


  parent reply	other threads:[~2010-05-10  4:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10  4:46 [PATCH 0/9] perf-trace/scripting: script fixes Tom Zanussi
2010-05-10  4:46 ` [PATCH 1/9] perf/trace/scripting: failed-syscalls script cleanup Tom Zanussi
2010-05-10  4:46 ` [PATCH 2/9] perf/trace/scripting: rw-by-pid " Tom Zanussi
2010-05-10  4:46 ` [PATCH 3/9] perf/trace/scripting: rwtop " Tom Zanussi
2010-05-10  4:46 ` [PATCH 4/9] perf/trace/scripting: wakeup-latency " Tom Zanussi
2010-05-10  4:46 ` Tom Zanussi [this message]
2010-05-10  4:46 ` [PATCH 6/9] perf/trace/scripting: don't show script start/stop messages by default Tom Zanussi
2010-05-10  4:46 ` [PATCH 7/9] perf/trace/scripting: failed-syscalls-by-pid script cleanup Tom Zanussi
2010-05-10  4:46 ` [PATCH 8/9] perf/trace/scripting: syscall-counts-by-pid " Tom Zanussi
2010-05-10  4:47 ` [PATCH 9/9] perf/trace/scripting: syscall-counts " Tom Zanussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1273466820-9330-6-git-send-email-tzanussi@gmail.com \
    --to=tzanussi@gmail.com \
    --cc=acme@ghostprotocols.net \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®