parca-agent icon indicating copy to clipboard operation
parca-agent copied to clipboard

JVM support

Open brancz opened this issue 3 years ago • 11 comments

This could be a built-in and pprof-integrated version of perf-map-agent and/or async-profiler.

Plan

  1. In Phase one, use async-profiler to profile JVM processes. https://github.com/parca-dev/parca-agent/issues/1115
  2. In Phase two, use the eBPF profiler to collect the profiles.

brancz avatar Jul 09 '21 09:07 brancz

any progress with JVM support?

cskinfill avatar Nov 12 '21 18:11 cskinfill

If the JVM is started with the above-linked perf-map-agent then soon there will be support. The important one is https://github.com/parca-dev/parca-agent/pull/101, but we still lack support for translating container PID to kernel-wide PID, I'm hoping to get to that this week. That said we want users not to have to do anything, so even when that does work, we will keep this open as we want parca-agent to do it all eventually.

brancz avatar Nov 15 '21 09:11 brancz

Starting with the v0.3.0 release if the perf-map agent is used, then JVM can be profiled with parca-agent today!

brancz avatar Dec 09 '21 09:12 brancz

Looks like there is also some precedence of profilers at the intersection of eBPF and java, that some inspiration could come from: https://github.com/weixingsun/jBProF

brancz avatar Dec 15 '21 07:12 brancz

Hi, is there any update for this ticket? Any ETA when JVM profiling is supported by parca-agent by default?

petr-postulka avatar Nov 02 '22 19:11 petr-postulka

We just started working on this. We plan to land an initial support before this year ends.

kakkoyun avatar Nov 02 '22 20:11 kakkoyun

FYI: Maybe https://github.com/grafana/JPProf helps somehow with implementation for given task.

Hixon10 avatar Nov 12 '22 01:11 Hixon10

FYI: Maybe https://github.com/grafana/JPProf helps somehow with implementation for given task.

Thanks for the suggestion. JPProf is a library you need to add to your application, so it's instrumentation. We are planning to provide an experience where you don't need to change anything in your application :)

kakkoyun avatar Nov 12 '22 08:11 kakkoyun

Hi, is there any updates (after two years)? This project looks quite interesting, and I hope to use it in my environment!

fzyzcjy avatar Jul 08 '23 06:07 fzyzcjy

We’re making progress and a first integrated version should be only a few weeks away.

Just to be clear though, you have always been able to profile Java workloads by enabling these flags: https://github.com/parca-dev/parca-demo/blob/882b4e77496507ec4b0b839df5dd15c6beff8dd2/java/Dockerfile#L19

brancz avatar Jul 08 '23 09:07 brancz