diff options
author | Charles Baylis <charles.baylis@linaro.org> | 2017-12-14 10:29:57 +0000 |
---|---|---|
committer | Charles Baylis <charles.baylis@linaro.org> | 2017-12-14 10:29:57 +0000 |
commit | d7986cbc3f0327aa18323b4c3a1310d32a083b1b (patch) | |
tree | 0ed16f11c93844fdedd5cb8a60a89c6815e32ee6 | |
parent | bf9251abf9594533909d34dc93be7d6961ef3255 (diff) |
Fix upside-down CPU column headings on Chrome
Change-Id: I877e0183f80b0ba21b47af1224bbb5da15ddfdd8
-rw-r--r-- | perf-utilization.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/perf-utilization.pl b/perf-utilization.pl index 8bd825f..9ddeb71 100644 --- a/perf-utilization.pl +++ b/perf-utilization.pl @@ -58,6 +58,13 @@ while (<INPUT>) $pid_count{$pid}++; } +close INPUT; + +if (!defined $max_cpu) +{ + die "No data found, perhaps you need to use --all-cpus with perf record"; +} + print $fh <<EOF; <html> <head> @@ -95,7 +102,7 @@ span.hoverprofile { background: rgba(255,255,255,0.4); } -th.rotate { +.rotate { writing-mode: vertical-lr; transform:rotate(190deg); } @@ -200,7 +207,7 @@ print $fh qq(</div>); print $fh qq(<table id="matrix"><tr>); for (my $c=0; $c<=$max_cpu; $c++) { - print $fh "<th class=rotate>CPU$c</th>"; + print $fh qq(<th><span class="rotate">CPU$c</span></th>); } print $fh "</tr>\n"; @@ -209,6 +216,7 @@ my $start_time=$first_time; my %counts; my %locs; my %pids; + for (my $i=0;$i<$#cpu;$i++) { if ($time[$i] > ($start_time + $REPORT_INTERVAL)) |