[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YVQR/WzopuDTTwDq@kroah.com>
Date: Wed, 29 Sep 2021 09:13:01 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
Jonathan Corbet <corbet@....net>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts: get_abi.pl: make undefined search more
deterministic
On Tue, Sep 28, 2021 at 11:51:32PM +0200, Mauro Carvalho Chehab wrote:
> Sort keys on hashes during undefined search, in order to
> make the script more deterministic.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> ---
> scripts/get_abi.pl | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
> index 841d889747c0..d32dcd7cca5d 100755
> --- a/scripts/get_abi.pl
> +++ b/scripts/get_abi.pl
> @@ -775,6 +775,8 @@ sub check_undefined_symbols {
> my $next_i = 0;
> my $start_time = times;
>
> + @files = sort @files;
> +
> my $last_time = $start_time;
>
> # When either debug or hint is enabled, there's no sense showing
> @@ -909,16 +911,16 @@ sub undefined_symbols {
> }
> }
> # Compile regexes
> - foreach my $l (keys %leaf) {
> + foreach my $l (sort keys %leaf) {
> my @expr;
> - foreach my $w(split /\xac/, $leaf{$l}->{what}) {
> + foreach my $w(sort split /\xac/, $leaf{$l}->{what}) {
> push @expr, qr /^$w$/;
> }
> $leaf{$l}->{expr} = \@expr;
> }
>
> # Take links into account
> - foreach my $link (keys %aliases) {
> + foreach my $link (sort keys %aliases) {
> my $abs_file = $aliases{$link};
> graph_add_link($abs_file, $link);
> }
> --
> 2.31.1
>
Much better, now we are at a reproducable 10 seconds on my large box.
Thanks for all the work on this, now to go and start adding the missing
documentation :)
greg k-h
Powered by blists - more mailing lists