otel-profiling-agent icon indicating copy to clipboard operation
otel-profiling-agent copied to clipboard

Add support for JDK23

Open athre0z opened this issue 1 year ago • 3 comments

JDK23 is currently in release-candidate status and expected to reach GA on 17th Sep. Attempting to profile it currently results in the following error:

ERRO[1084] Failed to handle new anonymous mapping for PID 2338658: JVM symbol 'CompiledMethod.Sizeof' not found

athre0z avatar Sep 10 '24 14:09 athre0z

Probably related:

  • https://github.com/openjdk/jdk/commit/83eba863fec5ee7e30c4f9b11122ad1deed3d2ec merges CompiledMethod into nmethod
  • https://github.com/openjdk/jdk/commit/bdcc2400db63e604d76f9b5bd3c876271743f69f removes nmethod._dependencies_offset
  • https://github.com/openjdk/jdk/commit/b704e91241b0
    • CodeBlob::frame_comp changed int -> int16_t
    • Nmethod::_metadata_offset changed int -> uint16_t

athre0z avatar Sep 10 '24 14:09 athre0z

I didn't complete this before my last day at Elastic, but my patches for the progress so far live here: https://github.com/athre0z/opentelemetry-ebpf-profiler/commit/e25c90dbe4b58bec31c6ba062c167a68d7c21163

It seemed to be generally working, though it still needs more testing and probably also some debugging. I had noticed a small percentage of unsymbolized frames.

athre0z avatar Sep 20 '24 16:09 athre0z

Working on this now, wip tree at https://github.com/fabled/opentelemetry-ebpf-profiler/tree/tt-jdk23

I believe the metadata and immutable data fixup should resolve majority of issue. But will still follow up with further additional comments and documentation.

fabled avatar Oct 12 '24 10:10 fabled