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

  1. Add a TRACE_EVENT to a Blink function you studied in bi-03 or bi-07. Rebuild that target only. Confirm it appears in a trace.
  2. Deliberately violate a DCHECK (remove a guard), rebuild with dcheck_always_on = true, and observe the assertion fire. Restore. Note how much better the message is than the misrender.
  3. Use --vmodule to scope verbose logging to two files. Compare with global --v=2 and note why scoping is essential.
  4. 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 DCHECK fired deliberately and restored
  • A handoff note a stranger could act on