Skip to content

Commit

Permalink
perf/trace/scripting: workqueue-stats script cleanup
Browse files Browse the repository at this point in the history
Some minor fixes for the workqueue-stats script:

 - Fix nuisance 'use of uninitialized value' warnings

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <1273466820-9330-6-git-send-email-tzanussi@gmail.com>
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Tom Zanussi authored and Arnaldo Carvalho de Melo committed May 10, 2010
1 parent e366728 commit a3412d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/perf/scripts/perl/workqueue-stats.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down

0 comments on commit a3412d9

Please sign in to comment.