-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Otel allocation profiling POC #422
base: main
Are you sure you want to change the base?
Conversation
Benchmark results for collatzParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
Benchmark results for BadBoggleSolver_runParameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. See unchanged results
|
} | ||
PerfClock::init(static_cast<PerfClockSource>(rb.perf_clock_source)); | ||
} else { | ||
PerfClock::init(PerfClockSource::kClockMonotonic); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because monotonic is what the full host profiler would expect, and tsc logic is not available
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On otel profiler mode, PerfClock
is not used to timestamp samples (since it's done on eBFP side), I had to initialize it because it's also used to determine when periodically check for newly loaded libraries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And indeed TSC calibration is done on ddprof side and is not available here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I do not see any issue with merging this. I assume the size impact is minimal for regular ddprof users.
Minor: we could have some form of test that ensures the probe is available.
|
ccc1c4d
to
95c30f3
Compare
Just saw that, USDT probe seems to have a big impact on stack size in sanitized mode. |
95c30f3
to
3c0d453
Compare
3c0d453
to
3954635
Compare
I'm not sure if the crash is reproducible and a product of the PR (relaunching the CI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I agree on the TODO about a better description 😄 |
@@ -427,12 +453,12 @@ DDRes AllocationTracker::push_alloc_sample(uintptr_t addr, | |||
const auto *stack_base_ptr = reinterpret_cast<const std::byte *>(&p); | |||
auto stack_size = to_address(tl_state.stack_bounds.end()) - stack_base_ptr; | |||
|
|||
// stack will be saved in save_context, add some margin to account for call | |||
// stack will be saved in save_context, add some ` to account for call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor, comment was broken here
@nsavoire do you mind moving this to draft if we do not plan on merging soon ? |
What does this PR do?
Make
libdd_profiling.so
compatible for use with otel profiler by creating a new mode that does not start ddprof and adding a USDT probe inside sampling path.(TODO) better description