Show call sources in call stacks - #390
Open
parthrohit22 wants to merge 1 commit into
Open
Conversation
Resolves the caller's return address through the existing debug-info table (Elf.Addr_table) and attaches it as call_site_line/col/symbol/file args on the duration_begin event, alongside the callee's own location info already resolved there. Best-effort: call sites into From_perf_map (JIT'd/dlopen'd) code won't have debug info, so no call_site_* args are emitted in that case. Tested via a new expect-test in test/test.ml since this repo's C stubs are Linux-only and can't be built/verified on macOS. Fixes janestreet#212 Signed-off-by: PARTH J ROHIT <parthrohit60@gmail.com>
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.
Resolves the caller's return address through the existing debug-info table (
Elf.Addr_table) and attaches it ascall_site_line/call_site_col/call_site_symbol/call_site_fileargs on theduration_beginevent, alongside the callee's own location info that's already resolved there.Best-effort: call sites into
From_perf_map(JIT'd/dlopen'd) code won't have ELF debug info, so nocall_site_*args are emitted in that case — same as how the callee side already handles it.Testing: added a new expect-test in
test/test.mlcovering both the "no call site known" and "call site resolved" cases. I wasn't able to build/run the full test suite locally since this repo's C stubs (ptrace_stubs.c,boot_time_stubs.c, etc.) are Linux-only and I'm on macOS — happy to address anything CI turns up.Fixes #212