History

scripts: get_abi.pl: make undefined search more deterministic

Sort keys on hashes during undefined search, in order to make the script more deterministic.

Mauro Carvalho Chehab committed 5 years ago

Commit e5c044c1 parent 654e4d51 file · +5 −3Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/get_abi.pl+5−3
@@ -775,6 +775,8 @@ sub check_undefined_symbols { · 774 unmodified lines
775 my $next_i = 0;775 my $next_i = 0;
776 my $start_time = times;776 my $start_time = times;
777 777
778 @files = sort @files;
779
778 my $last_time = $start_time;780 my $last_time = $start_time;
779 781
780 # When either debug or hint is enabled, there's no sense showing782 # When either debug or hint is enabled, there's no sense showing
@@ -909,16 +911,16 @@ sub undefined_symbols { · 128 unmodified lines
909 }911 }
910 }912 }
911 # Compile regexes913 # Compile regexes
912 foreach my $l (keys %leaf) {914 foreach my $l (sort keys %leaf) {
913 my @expr;915 my @expr;
914 foreach my $w(split /\xac/, $leaf{$l}->{what}) {916 foreach my $w(sort split /\xac/, $leaf{$l}->{what}) {
915 push @expr, qr /^$w$/;917 push @expr, qr /^$w$/;
916 }918 }
917 $leaf{$l}->{expr} = \@expr;919 $leaf{$l}->{expr} = \@expr;
918 }920 }
919 921
920 # Take links into account922 # Take links into account
921 foreach my $link (keys %aliases) {923 foreach my $link (sort keys %aliases) {
922 my $abs_file = $aliases{$link};924 my $abs_file = $aliases{$link};
923 graph_add_link($abs_file, $link);925 graph_add_link($abs_file, $link);
924 }926 }