diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2018-03-06 12:43:10 +0000 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2018-04-19 09:47:28 +0100 |
commit | 55e10738ae808a7e9dd9beb5bbedeeddc80ce46a (patch) | |
tree | 4f6b1012a3690cfaa2b54fe7718e7e98a05c4dc3 /scripts | |
parent | 54471aec52d70c3d8ba5229fa0e77a90bb3d2921 (diff) |
trace.pl: Move sortQueue near its user
Just to clear up some space for incoming code refactoring.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: John Harrison <John.C.Harrison@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/trace.pl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/scripts/trace.pl b/scripts/trace.pl index 509df6c0..d49d25d6 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -545,17 +545,6 @@ sub sortStart { return $val; } -sub sortQueue { - my $as = $db{$a}->{'queue'}; - my $bs = $db{$b}->{'queue'}; - my $val; - - $val = $as <=> $bs; - $val = $a cmp $b if $val == 0; - - return $val; -} - my @sorted_keys = sort sortStart keys %db; my $re_sort = 0; @@ -859,6 +848,17 @@ print <<ENDHTML; var items = new vis.DataSet([ ENDHTML +sub sortQueue { + my $as = $db{$a}->{'queue'}; + my $bs = $db{$b}->{'queue'}; + my $val; + + $val = $as <=> $bs; + $val = $a cmp $b if $val == 0; + + return $val; +} + my $i = 0; foreach my $key (sort sortQueue keys %db) { my ($name, $ctx, $seqno) = ($db{$key}->{'name'}, $db{$key}->{'ctx'}, $db{$key}->{'seqno'}); |