pixie
pixie copied to clipboard
Enable JAVA Profiling
Hi,
I would like to do a feature request for java profiling. I think this would be a great addition to Pixie.
Kind regards,
(Yaxiong from Pixie team) Sorry for late reply.
I think you are already played with the existing Pixie profiler: https://docs.pixielabs.ai/tutorials/profiler/ (it does not support Java application profiling, but only the JVM process).
Do you have example of Java profiling you have experienced from the other products available on the market?
Specific features/functionalities you like or dislike from those products would be very helpful as well.
IMHO async profiler is a very complete tool and it could be a good example: https://github.com/jvm-profiling-tools/async-profiler
Also Mission Control is very good: https://github.com/openjdk/jmc
A quick update for those waiting for Java profiling. The feature is currently in alpha, and we plan to release it after some more testing!
Java support for Pixie's continuous profiler is now in beta. 🎉
A couple of notes about this beta feature:
- Available for Pixie vizier version 0.10.22+. Learn how to identify and update your vizier version here.
- Java support is a beta feature and must be manually enabled.
- For best results, run Java applications with
-XX:+PreserveFramePointer
Ways to get started:
- Read the tutorial to see a demo of using Pixie’s continuous profiler to investigate a spike in CPU utilization caused by inefficient application code. Note: this tutorial features Golang application code.
- Run the
px/perf_flamegraph
script in the Live UI to see a simple flamegraph that can be filtered by node, namespace, or pod. - Run the
px/node
script in the Live UI to see a flamegraph for a specific node alongside high-level application metrics (LET) and resource usage. Note: the flamegraph is at the bottom of the page. - Run the
px/pod
script in the Live UI to see a flamegraph for a specific pod alongside high-level application metrics (LET) and resource usage. Note: the flamegraph is at the bottom of the page.
Even after enabling the -XX:+PreserveFramePointer
I'm getting hexadecimal values, and not the method names.
Do I need to enable anything while compiling? We are using gradle to build the project
@etep are there any known limitations with the Pixie profiler Java symbolization?
Quick update for this thread: Support for Java profiling is now included by default in Pixie (no need to manually enable). 🎉
Thanks @htroisi. I have been trying to test Pixie on Java application and for some reason I'm unable to get Java symbolization working?


@htroisi Confused, did I miss any steps?
@c3-pranjaysagar thanks for reporting this! It looks like @etep responded with some debugging steps on https://github.com/pixie-io/pixie/issues/592, so let's continue the conversation there.
@htroisi I would like to ask a question, what technology is pixie using to capture Java flame maps? async-profiler? or JFR?
I have no more questions, and by looking at https://blog.px.dev/cpu-profiling-java/#title and https://blog.px.dev/cpu-profiling/ I have roughly understood how the implementation works.