fix(profiling): Restore I/O GOT hooks on module shutdown - #4154
Conversation
|
Benchmarks [ profiler ]Benchmark execution time: 2026-09-04 10:01:33 Comparing candidate commit 8a3a559 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 28 metrics, 8 unstable metrics.
|
Benchmarks [ tracer ]Benchmark execution time: 2026-09-02 19:16:55 Comparing candidate commit 1a4bea8 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 193 metrics, 0 unstable metrics.
|
1a4bea8 to
f8fe224
Compare
f8fe224 to
ec8dfe3
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: ec8dfe3369
ℹ️ 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".
bwoebi
left a comment
There was a problem hiding this comment.
The only thing I notice is that the overwrite fetching is O(n^2), with n being the amount of shared objects loaded.
This is likely not an issue for low n.
@bwoebi exactly, |
Description
Store the exact original value for each GOT or Mach-O slot changed by I/O profiling and restore it during MSHUTDOWN. Restoration only touches slots still pointing to our hook and only visits loaded images, so it does not clobber later hooks or dereference unloaded images.
If any loaded hook cannot be safely removed, keep the profiler extension loaded to prevent dangling function pointers.
Reviewer checklist
PROF-15878