Draft
Conversation
Set PROC_EVENT_HANDLE_DELAY to 0 so interpreter and memory profiling events are processed within the next ~100ms event loop cycle instead of waiting 120 seconds. This enables sub-second uprobe attachment for newly started processes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New event type and library_load_event_t struct to support real-time detection of dynamically loaded shared libraries via _dl_open uretprobe. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion Add a uretprobe program (dl_open_uretprobe) that fires when _dl_open() returns after dynamically loading a shared library. The program emits an EVENT_TYPE_LIB_LOAD event with the process PID via the socket_data perf buffer, enabling user-space to detect runtime dlopen() calls and re-scan the process for newly loaded libraries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add library_load_event() handler that calls extended_process_exec() to re-trigger the process initialization pipeline when a dlopen is detected. This allows the profiler to rescan the process memory maps and attach uprobes for newly loaded shared libraries at runtime. Also register EVENT_TYPE_LIB_LOAD dispatch in register_events_handle() alongside the existing process exec/exit event handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Register an eBPF process event callback (exec/exit) through the existing register_event_handle C FFI. Events are forwarded via a lock-free channel to the ProcessListener thread, which drains them every 1-second cycle and incrementally updates per-feature PID filter maps via process_single_pid(). This reduces the latency for new process detection from up to 10 seconds (full /proc scan interval) to approximately 1 second, while retaining the 10-second full scan as a fallback for correctness. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5b577df to
98c8f6d
Compare
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.
This PR is for:
Support real-time profile
Checklist
Backport to branches