[igt-dev] [PATCH i-g-t 06/11] trace.pl: Move sortQueue near its user
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Wed Apr 18 16:56:13 UTC 2018
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
On 06/03/18 04:43, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> Just to clear up some space for incoming code refactoring.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: John Harrison <John.C.Harrison at intel.com>
> ---
> scripts/trace.pl | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/scripts/trace.pl b/scripts/trace.pl
> index 509df6c0dd8b..d49d25d6c1ca 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'});
More information about the igt-dev
mailing list