Execution — bi-12-debugging-tracing
Steps extracted from CONCEPTS.md. Read the concepts first; this file is the doing.
Record results in observation.md; tick checkpoints in verification.md.
3. Practice
Concrete procedures live in bi-00-roadmap/docs/chromium-build-debug-trace.md §4–§5: lldb
setup and the in-tree pretty-printers, attaching to a paused renderer, conditional breakpoints,
thread backtrace all, and the tracing categories worth recording.
Do thread backtrace all once, early. It converts bi-02's thread diagram from a claim
into something you have seen.
6. Lab
- Thread census. Attach to a renderer,
thread backtrace all, and write down every thread name. Map each tobi-02's diagram. Note any you did not expect. - Pipeline breakpoints. Set breakpoints at DOM creation, style recalc, layout, and paint. Load a trivial page. Record the order and the call stacks connecting them. This is the rendering pipeline, observed rather than read.
- Conditional breakpoint. Break in
setAttributeonly when the attribute isclass. - Trace-to-source. Record a trace, pick three unfamiliar event names, and find each in the source. Write down what each one measures.
- Source-to-trace. Add your own
TRACE_EVENTto a Blink function you studied inbi-03orbi-07. Rebuild that target only. Confirm it appears. - Break an invariant. Deliberately violate a
DCHECK(for example by removing a guard), rebuild, and observe the assertion fire. Restore.
Deliverable: the thread census, the pipeline call-stack chain from (2), and the diff from (5).
7. Failure Lab
- Build with
symbol_level = 0and try to debug. Experience it once; it explains the flag. - Set a Blink breakpoint on the browser process and observe it never hit. Diagnose from first principles.
- Break in a function that gets inlined. Find the workaround.
- Attach to a renderer without
--disable-hang-monitorand wait 30 seconds. Explain the kill.