Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
What version of pprof are you using?
"go get -u github.com/google/pprof"
What operating system and processor architecture are you using?
Mac OS El Capitan
What did you do?
I want to profile my Java applications using pprof. I found this project that claims to implement such a thing:
based on code from Twitter:
Testing it out, it produces a profile that looks like that following:
Full file here: https://github.com/robfig/testprofile/blob/master/legacy_profile
Trying to feed that to pprof is unsuccessful
I believe this is the legacy profile format. I was wondering if there's some trick to being able to read it. Alternatively, are you aware of any open source libraries that produce working profiles for Java?
I understand that some random library producing a file that pprof can't read isn't your problem; I was just hoping for some guidance on what would be the most fruitful way forward (even if it's writing a new implementation).
I'd suggest that you file an issue against that tool or debug yourself what happens if you are interested. The legacy format comes from the days of old Perl pprof and there can be some differences in the format that Go pprof doesn't support. These days it's recommended to produce profiles in the profile.proto format (see the proto directory).
You could try (at your own risk) using the Java profiling agent we wrote for Stackdriver Profiler product. It has an experimental mode to collect profiles in the pprof format to a file. See the example below.
@aalexand I saw that profiling API only applies to compute engine, k8s engine, and app engine. I am using Apache Beam running on Cloud Dataflow. I used this class