[PATCH] D113030: Add a new tool for parallel safe bisection, "llvm-bisectd".

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 10:17:19 PDT 2021


aemerson created this revision.
aemerson added reviewers: paquette, arsenm, foad, qcolombet, dsanders, lattner.
aemerson added a project: LLVM.
Herald added subscribers: dexonsmith, hiraditya, fedor.sergeev, mgorny.
aemerson requested review of this revision.
Herald added a subscriber: wdng.

Excerpt from Bisection.md document:

Introduction
------------

The `llvm-bisectd` tool allows LLVM developers to rapidly bisect miscompiles in
clang or other tools running in parallel.

Bisection as a general debugging technique can be done in multiple ways. We can
bisect across the *time* dimension, which usually means that we're bisecting
commits made to LLVM. We could instead bisect across the dimension of the LLVM
codebase itself, disabling some optimizations and leaving others enabled, to
narrow down the configuration that reproduces the issue. We can also bisect in
the dimension of the target program being compiled, e.g. compiling some parts
with a known good configuration to narrow down the problematic location in the
program. The `llvm-bisectd` tool is intended to help with this last approach to
debugging: finding the place where a bug is introduced. It does so with the aim
of being minimally intrusive to the build system of the target program.

High level design
-----------------

The bisection process with `llvm-bisectd` uses a client/server model, where all
the state about the bisection is maintained by the `llvm-bisectd` daemon. The
compilation tools (e.g. clang) send requests and get responses back telling
them what to do. As a developer, debugging using this methodology is intended
to be simple, with the daemon taking care of most of the complexity.

[End excerpt]


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113030

Files:
  llvm/docs/Bisection.md
  llvm/include/llvm/Support/Bisector.h
  llvm/include/llvm/Support/RemoteBisectorClient.h
  llvm/lib/Support/Bisector.cpp
  llvm/lib/Support/CMakeLists.txt
  llvm/lib/Support/RemoteBisectorClient.cpp
  llvm/test/CMakeLists.txt
  llvm/tools/llvm-bisectd/CMakeLists.txt
  llvm/tools/llvm-bisectd/llvm-bisectd.cpp
  llvm/unittests/Support/BisectTest.cpp
  llvm/unittests/Support/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113030.384150.patch
Type: text/x-patch
Size: 37184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211102/de294b7a/attachment-0001.bin>


More information about the llvm-commits mailing list