Lines Matching +full:half +full:-

1 #!/usr/bin/perl -w
2 # SPDX-License-Identifier: GPL-2.0-only
4 # Copyright 2015 - Steven Rostedt, Red Hat Inc.
5 # Copyright 2017 - Steven Rostedt, VMware, Inc.
9 # config-bisect.pl [options] good-config bad-config [good|bad]
12 # Compares a good config to a bad config, then takes half of the diffs
15 # good config and will try to make half of the differences of between
18 # exactly half of the configs that are different between the two config
24 # $ config-bisect.pl /path/to/good/config /path/to/bad/config
31 # The algorithm will run, merging half of the differences between
43 # $ config-bisect.pl /path/to/good/config /path/to/bad/config good
46 # $ config-bisect.pl /path/to/good/config /path/to/bad/config bad
48 # Do not change the good-config or bad-config, config-bisect.pl will
49 # copy the good-config to a temp file with the same name as good-config
50 # but with a ".tmp" after it. It will do the same with the bad-config.
54 # warn before writing over them (-r will not warn, and just write over them).
74 usage: config-bisect.pl [-l linux-tree][-b build-dir] good-config bad-config [good|bad]
75 -l [optional] define location of linux-tree (default is current directory)
76 -b [optional] define location to build (O=build-dir) (default is linux-tree)
77 good-config the config that is considered good
78 bad-config the config that does not work
88 exit(-1);
190 my $delta = $end_time - $start_time;
359 # -1 if a has something b does not
380 return -1;
460 doprint " $config $good_value -> $bad_value\n";
464 # $phalf: half of the configs names you want to add
467 # $which: The name of which half that is updating (top / bottom)
472 my @half = @{$phalf};
478 doprint "Settings bisect with $which half of $type configs:\n";
479 foreach my $item (@half) {
497 # diff_arr is what is in both good and bad but are different (y->n)
528 doprint " -----------\t\t\t----------\n";
533 my $half = int($#diff_arr / 2);
534 my @tophalf = @diff_arr[0 .. $half];
556 # do the same thing, but this time with bottom half
558 my $half = int($#diff_arr / 2);
559 my @bottomhalf = @diff_arr[$half+1 .. $#diff_arr];
588 doprint "Difference between good (+) and bad (-)\n";
592 print_config "-", $bad_configs{$item};
608 return -1;
636 if ($ARGV[0] !~ m/^-/) {
641 if ($opt eq "-b") {
644 die "-b requires value\n";
649 elsif ($opt eq "-l") {
652 die "-l requires value\n";
657 elsif ($opt eq "-r") {
661 elsif ($opt eq "-h") {
675 if ( ! -d $tree ) {
679 if ( ! -d $build ) {
711 if ( ! -f $good_start ) {
714 if ( ! -f $bad_start ) {
717 if ( -f $good || -f $bad ) {
720 if ( -f $good ) {
724 if ( -f $bad ) {
730 exit (-1);
737 if ( ! -f $good ) {
740 if ( ! -f $bad ) {