ddprof_julia: relax assertion to JIT-symbol presence - #124
Draft
r1viollet wants to merge 1 commit into
Draft
Conversation
The previous assertion anchored on `true_main → julia_{a,b}_` in the
same stack. In practice the stacks captured for Julia look like:
julia;[incomplete];[unknown mapping];jl_toplevel_eval_flex;...;julia_a_73
The `[incomplete]` / `[unknown mapping]` cluster comes from Julia's
interpreter and dispatch trampolines (anon-exec pages without DWARF
unwind info), not from JITDump symbolization. The assertion therefore
failed for an unwinding reason, masking the actual signal it was meant
to check: that JIT symbols are resolved via the JITDump file.
Drop the `true_main` prefix so the assertion fails if and only if JIT
symbols are missing, regardless of stack-walk quality above them. This
makes the test a clean regression check for the JITDump startup race
(DataDog/ddprof#551).
Collaborator
Author
|
mostly relevant on arm64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Julia scenario asserts on stacks matching:
In practice the actual captured stacks look like:
The
[incomplete]/[unknown mapping]cluster between the JIT frame and the outer C++ frames comes from Julia's interpreter and dispatch trampolines (anon-exec pages without DWARF unwind info). That is a stack-walking issue, not a symbolization issue. The current regex couples the two, so the test fails for unwinding reasons and masks the actual signal it was meant to check.Change
Drop the
true_mainprefix from both regexes. The assertion now fails iff JIT symbols (which require the JITDump file to be picked up) are missing — regardless of stack-walk quality above them.Effect
Locally (5 runs each, including under sustained CPU load):
Measured JIT percentages stay tight to the expected 31% / 63% (julia_a ≈ 32%, julia_b ≈ 62%). The CI flake (~1/10 runs) where JITDump is silently dropped will now show as julia_a/b dropping toward 0% — clearly attributable to symbolization rather than to unrelated unwind gaps.
Related
Companion to DataDog/ddprof#551 (JITDump startup-race fix).