Commit bcfb4c9
committed
fix(callgrind): drop BBCCs whose top context fn is skip-flagged
When the (cxt == 0) clause in setup_bbcc force-pushes a skipped fn —
e.g. the first BB after CALLGRIND_START_INSTRUMENTATION lives in a
skipped object — the BBCC ends up with cxt->fn[0]->skip == True.
Without filtering, those BBCCs emit a top-level fn= block and the
skipped fn leaks into the dump.
Filter them out at dump time in print_bbccs_of_thread, right before
print_fn_pos would emit the ob=/fl=/fn= header. The call edges from
non-skipped callers into skipped fns (cfn=) are unaffected because
they're emitted from the caller's BBCC, whose context is not skipped.
Also broadens the runtime_obj_skip_c post-check to grep for any
fn=skipme*, since the actual leaked fn in the repro is skipme_run
(the one calling START_INSTRUMENTATION), not skipme_func.1 parent 731dc7d commit bcfb4c9
2 files changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1553 | 1553 | | |
1554 | 1554 | | |
1555 | 1555 | | |
1556 | | - | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
1557 | 1567 | | |
1558 | 1568 | | |
1559 | 1569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
0 commit comments