feat(profiling): add USDT semaphores to skip slow path around heap profile sampler#2266
Draft
scottgerring wants to merge 2 commits into
Draft
feat(profiling): add USDT semaphores to skip slow path around heap profile sampler#2266scottgerring wants to merge 2 commits into
scottgerring wants to merge 2 commits into
Conversation
scottgerring
force-pushed
the
sgg/usdt-semaphore
branch
from
July 23, 2026 08:14
6f5c645 to
e746345
Compare
Contributor
📚 Documentation Check Results📦
|
Contributor
🔒 Cargo Deny Results📦
|
Contributor
|
BenchmarksComparisonCandidateCandidate benchmark detailsBaselineBaseline benchmark details |
Contributor
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
scottgerring
force-pushed
the
sgg/usdt-semaphore
branch
from
July 23, 2026 12:03
de1b18e to
e8420ed
Compare
scottgerring
force-pushed
the
sgg/usdt-semaphore
branch
from
July 23, 2026 14:29
e8420ed to
5e9cf0b
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.
When no profiler is attached, we should use USDT semaphores to skip the slow path. This was a helpful suggestion from the profiling SIG. Some DOE numbers without profiler attached:
1 KiB allocations against 512 KiB sample size
At on avg. 1/512 requests sampled, its all in the noise floor:
0x0(none)sgg/usdt-semaphore)0x782ac864 KiB allocations with 64 KiB mean sample size
When we dial up the sample rate, we do see some cost emerge, but not heaps. The majority is really the allocations themselves:
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.