diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-06-16 19:18:25 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-07-07 12:44:53 +0000 |
| commit | 668cb1fa42960ece96b7da8d9204e486ba6dcdf6 (patch) | |
| tree | 467082604e69b77c3cfb66f748f5834c345eab56 /pkg/vcs | |
| parent | 67bc735728c6eccc908ac1819a2482d6872ef123 (diff) | |
pkg/kconfig: rewrite Minimize()
1) Use the generic bisection implementation in pkg/bisect. It adds the
support of identifying several necessary config diffs at once.
2) For now, limit the number of minimization iterations to 6. It's a
lengthy process and we don't want to spend too much time doing this.
3) Bisect over leaf configuration options -- that is, those no other
config depends upon. This should make diff split during bisection
more reliable.
4) Save all intermediate configs to the debug files folder.
Diffstat (limited to 'pkg/vcs')
| -rw-r--r-- | pkg/vcs/linux.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go index c6effd58a..341e488f4 100644 --- a/pkg/vcs/linux.go +++ b/pkg/vcs/linux.go @@ -379,7 +379,13 @@ type minimizeLinuxCtx struct { func (ctx *minimizeLinuxCtx) minimizeAgainst(base *kconfig.ConfigFile) error { base = base.Clone() ctx.transform(base) - minConfig, err := ctx.kconf.Minimize(base, ctx.config, ctx.pred, ctx) + // Don't do too many minimization runs, it will make bug bisections too long. + // The purpose is only to reduce the number of build/boot/test errors due to bugs + // in unrelated parts of the kernel. + // Bisection is not getting much faster with smaller configs, only more reliable, + // so there's a trade-off. Try to do best in 5 iterations, that's about 1.5 hours. + const minimizeRuns = 5 + minConfig, err := ctx.kconf.Minimize(base, ctx.config, ctx.pred, minimizeRuns, ctx) if err != nil { return err } |
