aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-06-16 18:17:01 +0200
committerAleksandr Nogikh <nogikh@google.com>2023-07-07 12:44:53 +0000
commitbc4d8b528cc491dc8144eb718871c819b1990029 (patch)
treed1384480e90b6ce97a6597a248db347de88350c4 /pkg/instance
parent432c8d9a7e0a8634b76dd86d8489c729f480f35a (diff)
pkg/bisect: add a generic slice minimization algorithm
Given a set of chunks and a predicate, the algorithm does the following: a) If the chunk is not needed (*), drop it. b) Split the chunk in two and attempt to drop these halves individually. Optimizations are applied to avoid unneeded predicate invokations. Also, the algorithm proceeds from larger to smaller chunks, thus providing on average the best possible result at each step. This represents the generic functionality needed both for program bisection in pkg/repro and kernel config bisection in pkg/kconfig. (*) Needed means that the predicate returns true when the chunk is present and false when it's removed.
Diffstat (limited to 'pkg/instance')
0 files changed, 0 insertions, 0 deletions