On Fri, 15 May 2026 12:52:56 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> It is important that this jcmd on cores feature is independent of the SA, 
>> because it is something that could replace the SA in time.  With a few more 
>> jcmds we can offer most SA features.  Can discuss the parity somewhere else, 
>> but it would be wrong to tie this to the SA.
>> 
>> I have not expanded jdk.hotspot.agent/.../salibelf.c to cover everything 
>> needed here, but it may duplicate some concepts.  Being in a different 
>> module it's not exactly easy or good for this to depend on salibelf as we 
>> want to keep them independent.
>
> I understand about SA, but can we share the code between jcmd and HotSpot? 
> HotSpot has ELF parser and some utilities for it. Ideally it is better to use 
> libelf by elfutils.

Yes there is src/hotspot/share/utilities/elf* which get built into libjvm.so.  
These hotspot elf utilities looked hard to use outside of a hotspot build, i.e. 
to compile this hotspot code into the tiny revivalhelper tool, which inspects 
the ELF core file and binary to do the prepration work, before we load libjvm.

Much as common shared code would be good, I thought sharing would be harder 
work.  Adding a new external dependency to the project adds non-technical 
complications I think.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31011#discussion_r3248450202

Reply via email to