fix(profiling): Fix I/O profiling gotchas - #4156
realFlowControl wants to merge 11 commits into
Conversation
|
Benchmarks [ profiler ]Benchmark execution time: 2026-09-14 14:29:53 Comparing candidate commit 6a871d9 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 26 metrics, 10 unstable metrics.
|
05ff2e5 to
8297f6b
Compare
8297f6b to
02433cf
Compare
…d cache base address
… function pointers
02433cf to
8d724d8
Compare
|
Closed in favor of #4159 which fixes IO and allocation at the same time |
@morrisonlevi this PR initially had the sampling fixes, but I moved them to #4159, so the fixes in here are not related to sampling/upscaling any more, but other gotchas and correctness issues |
1e04c4b to
cd92e60
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd92e60908
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Benchmarks [ tracer ]Benchmark execution time: 2026-09-14 15:23:25 Comparing candidate commit 6a871d9 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 191 metrics, 1 unstable metrics.
|
Description
This PR addresses several correctness bugs, security improvements, and hot-path performance bottlenecks in the I/O profiler (
profiling/src/io):observed_poll: Correctly distinguishes returned and requested events, evaluates both read and write readiness across all descriptors, skips disabled descriptors, handles output-only events such asPOLLHUP, and avoids reading the descriptor array whennfds == 0orpoll()fails.freadandfwrite: Records total bytes (items * size) rather than item count (nobj).PROT_READmemory protection on Linux after patching GOT entries in RELRO segments.INDIRECT_SYMBOL_LOCAL/ABSflags, bounds ELF dynamic section loops, and skips theld-musllinker.closehook still invalidates the process-wide file descriptor cache.static mut ORIG_*: All hooks now calllibc::*directly becauseddtrace.soexplicitly excludes itself from GOT hooking, eliminating data races and redundantdlsym(RTLD_NEXT)lookups.Reviewer checklist
https://datadoghq.atlassian.net/browse/PROF-15825