-
Notifications
You must be signed in to change notification settings - Fork 11
Instrument native threads #308
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
base: main
Are you sure you want to change the base?
Conversation
jbachorik
left a comment
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.
Having the libraries patching tied to ctimer (CPU profiling) does not sound right.
We have a bunch of other engines that can be used either for CPU or wallclock profiling and their functionality would be very inconsistent.
I think the library patching should go to a more generic place - and also be called from a more generic place, like eg. profiler.cpp
Agree. But I want to limit the changes in this PR and address this issue in separate PR. |
Ok. But create a followup ticket for that, plz. And let's move to the proper placement asap - we really don't want to get this partial task accidentally released. |
|
How will this work with dynamically loaded libraries? Am I reading the code right that we will not patch those? |
jbachorik
left a comment
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.
Approved with the two followup tickets
Benchmarks [x86_64 wall]Parameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 14 metrics, 22 unstable metrics.
|
Benchmarks [x86_64 cpu]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 12 metrics, 23 unstable metrics.
|
Benchmarks [x86_64 memleak]Parameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 14 metrics, 23 unstable metrics.
|
Benchmarks [x86_64 cpu,wall]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 12 metrics, 23 unstable metrics.
|
Benchmarks [x86_64 alloc]Parameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 13 metrics, 23 unstable metrics.
|
Benchmarks [aarch64 wall]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 15 metrics, 20 unstable metrics.
|
Benchmarks [aarch64 cpu]Parameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 15 metrics, 22 unstable metrics.
|
Benchmarks [x86_64 cpu,wall,alloc,memleak]Parameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 13 metrics, 21 unstable metrics.
|
Benchmarks [x86_64 memleak,alloc]Parameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 13 metrics, 23 unstable metrics.
|
Benchmarks [aarch64 memleak,alloc]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 13 metrics, 22 unstable metrics.
|
Benchmarks [aarch64 alloc]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 13 metrics, 22 unstable metrics.
|
Benchmarks [aarch64 cpu,wall]Parameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 20 unstable metrics.
|
Benchmarks [aarch64 memleak]Parameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 13 metrics, 22 unstable metrics.
|
Benchmarks [aarch64 cpu,wall,alloc,memleak]Parameters
See matching parameters
SummaryFound 0 performance improvements and 4 performance regressions! Performance is the same for 12 metrics, 22 unstable metrics.
|
What does this PR do?:
Instrument/profile native threads, the threads that are created/started outside of JVM, on hotspot/non-musl based JVM.
Motivation:
Enhance Java profiler to profiler native threads.
Additional Notes:
The feature is now only enabled for hotspot based JVM running on non-musl Linux platform. The reasons:
.no_java_framewhile debug build shows correct stack.
How to test the change?:
There are failures that are expected:
HeapMonitoruses agent, which conflicts with profiler agentFor Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!