bi-12 step 03 — Add your own instrumentation
Goal
Close the loop in the other direction: from source to trace, and from assumption to assertion.
Tasks
- Add a
TRACE_EVENTto a Blink function you studied inbi-03orbi-07. Rebuild that target only. Confirm it appears in a trace. - Deliberately violate a
DCHECK(remove a guard), rebuild withdcheck_always_on = true, and observe the assertion fire. Restore. Note how much better the message is than the misrender. - Use
--vmoduleto scope verbose logging to two files. Compare with global--v=2and note why scoping is essential. - Handoff exercise. Take any unresolved question from an earlier module and write the handoff note: what you observed, what you ruled out, the next step, and how to reproduce.
Done when
- Your own trace event observed in a timeline
-
A
DCHECKfired deliberately and restored - A handoff note a stranger could act on