Repository navigation
Conversation
This was referenced Jul 24, 2026
Add the off_cpu_time dynamic probe on top of the omnibus ProbeContext foundation. Correlate every switch-out through a migration-safe global LRU map, apply min-duration and sampling after elapsed time is known, and report exact nanosecond values with per-path metrics. Capture the validated sched_switch prev_state as thread.state so blocking and CPU saturation can be filtered independently. Use a minimal generic probe_user_data trace field for the optional per-origin TraceLabeler; this branch does not depend on the Hack Days async I/O or process-observer ABIs. Clarify that upstream built-in off_cpu is already duration-valued and document the actual differences. Assisted-By: devx/2d48a84f-4aab-48eb-9009-5dd68fa593f3
dalehamel
force-pushed
the
dale/offcpu-omnibus-probe-api
branch
from
July 24, 2026 20:33
3a279c8 to
30b61c7
Compare
dalehamel
force-pushed
the
dale/offcpu-omnibus
branch
from
July 24, 2026 20:33
f4a4895 to
67caea4
Compare
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
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.
Stack
dale/offcpu-omnibus-probe-api— minimal Probe runtime foundationWhat
Add
off_cpu_timeas a dynamic custom probe on the LuaJIT omnibus stack. It retains the upstream built-in profile's duration-valued semantics, while adding:min_durationfiltering before unwind/export;thread.statelabels separating voluntary blocking from runnable/preempted scheduler delay.Important semantic clarification
The built-in upstream
off_cpuprofile already emits one selected wakeup event weighted by exact elapsed nanoseconds. This probe does not change count→duration. Its differences are selection timing, migration correctness, state visibility, and operational accounting. The README documents both paths and the no-inverse-scaling caveat.Minimal ABI adaptation
The Hack Days implementation carried thread state through the async I/O ABI. This clean stack instead adds one generic
probe_user_datafield and an optional per-originTraceLabeler. It has no dependency on async I/O, process observers, lock-wait, memory profiling, or other Hack Days probes. Probe-private ELF resources follow the<configured name>_*prefix contract and are removed from the main collection by the caller-supplied dynamic resource prefix.Configuration
Validation
thread.state=interruptiblepath in 0.92s; 10-minute threshold emits no short waits.process.context.label.thread.state.Upstream convergence
This remains a separate profile while we evaluate upstreaming the useful pieces into built-in
off_cpu. Upstream history already requests duration-threshold sampling (open-telemetry#144) and documents the per-CPU migration amplification (open-telemetry#1348). Do not enable both built-inoff_cpuandoff_cpu_timesimultaneously unless deliberately comparing them.