Skip to content

Commit a3412d9

Browse files
zanussiacmel
authored andcommitted
perf/trace/scripting: workqueue-stats script cleanup
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>
1 parent e366728 commit a3412d9

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎tools/perf/scripts/perl/workqueue-stats.pl‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ sub trace_end
7171
printf("%3s %6s %6s\t%-20s\n", "---", "---", "----", "----");
7272
foreach my $pidhash (@cpus) {
7373
while ((my $pid, my $wqhash) = each %$pidhash) {
74-
my $ins = $$wqhash{'inserted'};
75-
my $exe = $$wqhash{'executed'};
76-
my $comm = $$wqhash{'comm'};
74+
my $ins = $$wqhash{'inserted'} || 0;
75+
my $exe = $$wqhash{'executed'} || 0;
76+
my $comm = $$wqhash{'comm'} || "";
7777
if ($ins || $exe) {
7878
printf("%3u %6u %6u\t%-20s\n", $cpu, $ins, $exe, $comm);
7979
}
@@ -87,9 +87,9 @@ sub trace_end
8787
printf("%3s %6s %6s\t%-20s\n", "---", "-------", "---------", "----");
8888
foreach my $pidhash (@cpus) {
8989
while ((my $pid, my $wqhash) = each %$pidhash) {
90-
my $created = $$wqhash{'created'};
91-
my $destroyed = $$wqhash{'destroyed'};
92-
my $comm = $$wqhash{'comm'};
90+
my $created = $$wqhash{'created'} || 0;
91+
my $destroyed = $$wqhash{'destroyed'} || 0;
92+
my $comm = $$wqhash{'comm'} || "";
9393
if ($created || $destroyed) {
9494
printf("%3u %6u %6u\t%-20s\n", $cpu, $created, $destroyed,
9595
$comm);

0 commit comments

Comments
 (0)