Support new activity_batch parcagpucupti probe#217
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for a new parcagpu:activity_batch USDT probe to reduce BPF overhead by sending kernel timing activities in batches (up to 128), while keeping the legacy kernel_executed probe working.
Changes:
- Extend CUDA USDT probe detection/attachment to prefer
activity_batchwhen available and fall back tokernel_executed. - Add a new eBPF handler (
cuda_activity_batch) that reads batched CUPTI activity records from user memory and emits timing events. - Update verifier/unit tests and program-name constants to include the new program/probe.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
support/ebpf/cupti_activity_bpf.h |
Introduces a minimal CUPTI kernel activity struct definition for BPF-side parsing. |
support/ebpf/cuda.ebpf.c |
Adds per-CPU scratch map, implements activity_batch handler, and routes cookie 'b' in cuda_probe. |
interpreter/gpu/cuda.go |
Prefers activity_batch probe in loader; adds program-name constant and cookie mapping. |
interpreter/gpu/cuda_test.go |
Verifies the new cuda_activity_batch program exists in the compiled collection. |
test/cudaverify/cuda_verifier_test.go |
Updates verifier tests to accept either kernel timing probe and to use explicit cookies/program names. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e879578 to
55722ae
Compare
55722ae to
c129352
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c129352 to
1bcb6d3
Compare
f2c7a51 to
60d213f
Compare
In order to reduce bpf overhead send through up to 128 kernel launch timing activities to the usdt probe. The old single shot kernel_executed probe is still supported. Inline correlation and kernel_exec into cuda_probe, tail-call only activity_batch The unwinder is sensitive to tail calls, so minimize them: inline cuda_correlation and cuda_kernel_exec directly into cuda_probe's switch statement using bpf_usdt_arg() for USDT arg reading.
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.
In order to reduce bpf overhead send through up to 128 kernel launch
timing activities to the usdt probe. The old single shot
kernel_executed probe is still supported.
Shim changes:
parca-dev/parcagpu#14