-
Notifications
You must be signed in to change notification settings - Fork 645
feat: add support for reading symbols from perf map files #4111
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
|
Thanks for the contribution! Note: We're in the process of migration from our own profiler implementation to otel profiler implementation. See here grafana/alloy#2920 . The otel profiler has proper support for java and likely don't even need the perf map support. Please consider give new otel profiler implementation a try and help us testing / dogfooding new profiler in your dev environments. I will let this PR open for a while, then merge if you still think (given above) we need to merge this. It will not be released and will be removed some time soon. |
Got it, thanks for the explanation. |
Yeah we see memory increase too. One thing that is slightly different in our otel fork though is that it will be possible to select what's profiled and what's not. So you will get a bit more control over memory. Internally we had to disable profiling for clickhouse and oracledb because they are so huge. |
Is there any way you could share examples of flamegraphs that a bad quality or broken/missing from the otel profiler? Or maybe a small reproducer if possible? What exactly is bad quality there? It works OK on my machine profiling jetbrains IDEs. I don't have much workloads to dogfood other than kafaka. |
I tested it on the otel-demo on Kubernetes. Since the profiler isn’t integrated with our UI yet, I just hacked the source to print the stack traces to the console. |
https://flamegraph.com/share/a9757406-1b57-11f0-86bc-aa320ab09ef2 just did a quick test from oteldemo and the linked alloy PR, some services are looking OK from the first glance. What was the broken service from oteldemo? |
I’m going to rerun my tests and will share more once I have it. |
Not sure about "better", but some alternatives could be: |
This PR adds support for
perf-<pid>.map
files to improve symbolization for Java and Node.js applications.For Node.js, perf map files can be enabled using the following args:
For Java, the JVM should be started with
-XX:+PreserveFramePointer
. The perf map file can be dumped manually using:On the agent side, periodic dumping can be triggered from the TargetFinder component.
Fixes #2766.