mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
e366728d57
commit
a3412d9b35
1 changed files with 6 additions and 6 deletions
|
@ -71,9 +71,9 @@ sub trace_end
|
||||||
printf("%3s %6s %6s\t%-20s\n", "---", "---", "----", "----");
|
printf("%3s %6s %6s\t%-20s\n", "---", "---", "----", "----");
|
||||||
foreach my $pidhash (@cpus) {
|
foreach my $pidhash (@cpus) {
|
||||||
while ((my $pid, my $wqhash) = each %$pidhash) {
|
while ((my $pid, my $wqhash) = each %$pidhash) {
|
||||||
my $ins = $$wqhash{'inserted'};
|
my $ins = $$wqhash{'inserted'} || 0;
|
||||||
my $exe = $$wqhash{'executed'};
|
my $exe = $$wqhash{'executed'} || 0;
|
||||||
my $comm = $$wqhash{'comm'};
|
my $comm = $$wqhash{'comm'} || "";
|
||||||
if ($ins || $exe) {
|
if ($ins || $exe) {
|
||||||
printf("%3u %6u %6u\t%-20s\n", $cpu, $ins, $exe, $comm);
|
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", "---", "-------", "---------", "----");
|
printf("%3s %6s %6s\t%-20s\n", "---", "-------", "---------", "----");
|
||||||
foreach my $pidhash (@cpus) {
|
foreach my $pidhash (@cpus) {
|
||||||
while ((my $pid, my $wqhash) = each %$pidhash) {
|
while ((my $pid, my $wqhash) = each %$pidhash) {
|
||||||
my $created = $$wqhash{'created'};
|
my $created = $$wqhash{'created'} || 0;
|
||||||
my $destroyed = $$wqhash{'destroyed'};
|
my $destroyed = $$wqhash{'destroyed'} || 0;
|
||||||
my $comm = $$wqhash{'comm'};
|
my $comm = $$wqhash{'comm'} || "";
|
||||||
if ($created || $destroyed) {
|
if ($created || $destroyed) {
|
||||||
printf("%3u %6u %6u\t%-20s\n", $cpu, $created, $destroyed,
|
printf("%3u %6u %6u\t%-20s\n", $cpu, $created, $destroyed,
|
||||||
$comm);
|
$comm);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue