aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Baylis <charles.baylis@linaro.org>2017-12-14 15:31:33 +0000
committerCharles Baylis <charles.baylis@linaro.org>2017-12-14 15:31:33 +0000
commit341f4812a048562a4c5fcb85954451952ca1d8ac (patch)
tree9f6bd23094ff430c70a955b7f469ababfecf5fd0
parent744f03d26fbfeeae5e4a754f1af7b528e35c82f6 (diff)
Highlight lines in profile for selected task.
Change-Id: I7198d4b8aeabeca1279ca630547ec06153af5d40
-rw-r--r--perf-utilization.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/perf-utilization.pl b/perf-utilization.pl
index 43faa74..c9fcd77 100644
--- a/perf-utilization.pl
+++ b/perf-utilization.pl
@@ -144,7 +144,7 @@ span.hoverprofile {
border-color: rgba(0,0,0,0);
border-style: solid;
border-width: 1px;
- background-color: #eeeeee;
+ background-color: #cccccc;
text-align: center;
margin: 3px;
float: left;
@@ -280,6 +280,7 @@ my $start_time=$first_time;
my %counts;
my %locs;
my %pids;
+my %loc_to_pid;
for (my $i=0;$i<$#cpu;$i++)
{
@@ -311,11 +312,12 @@ for (my $i=0;$i<$#cpu;$i++)
foreach my $loc (@loc_list)
{
my $prof_pct = sprintf("%5.1f%%", 100 * $lochash->{$loc} / $n);
+ my $pid=$loc_to_pid{$loc};
my $line = qq($prof_pct - $loc\n);
if ($count++ > $DEFAULT_PROFILE_LIMIT) {
- $remainder .= $line
+ $remainder .= qq(<span class="pid$pid">$line</span>);
} else {
- $top_part .= $line
+ $top_part .= qq(<span class="pid$pid">$line</span>);
}
}
if ($remainder) {
@@ -346,6 +348,7 @@ for (my $i=0;$i<$#cpu;$i++)
}
$counts{$cpu[$i]}++;
$locs{$cpu[$i]}->{$where[$i]}++;
+ $loc_to_pid{$where[$i]}=$pid[$i];
$pids{$cpu[$i]}->{$pid[$i]}++;
}