On Mon, 2 Nov 2026 15:09:48 GMT, Kevin Walls <[email protected]> wrote:

>> This implements "jcmd on core files" for Linux, and for MiniDumps on Windows 
>> (MacOS is "future work").
>> jcmd "revives" the VM memory and .so/.dll from the core/minidump, and runs 
>> the existing native diagnostic command parser and command implementations.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Kevin Walls has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Update.  Includes reverting removal of DebuggingContext and error handling 
> in HotSpotVirtualMachineCoreDump.java

src/hotspot/share/services/diagnosticCommand.cpp line 573:

> 571:   if (Thread::is_revived() && _locks.value()) {
> 572:     // In VMThread, VM_PrintThreads::doit_prologue is not called.
> 573:     Heap_lock->lock();

Is this still needed now that DebuggingContex is back in?

src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java line 54:

> 52:  */
> 53: @SuppressWarnings("restricted")
> 54: public class VirtualMachineImpl extends HotSpotVirtualMachineLive {

Have you considered renaming this to HotSpotVirtualMachineLiveImpl to be 
consistent with HotSpotVirtualMachineCoreDumpImpl?

src/jdk.attach/share/native/revivalhelper/revival.hpp line 117:

> 115: //
> 116: 
> 117: // One structure to keep in sync with the JVM:

Why not a common header file so only one copy is needed?

src/jdk.attach/share/native/revivalhelper/revival.hpp line 118:

> 116: 
> 117: // One structure to keep in sync with the JVM:
> 118: #define REVIVAL_MAGIC 0x2e6e656b6e617266

What's the origin of this? Seems a version number that gets incremented with 
every edit would be better.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31011#discussion_r4462806999
PR Review Comment: https://git.openjdk.org/jdk/pull/31011#discussion_r4462712058
PR Review Comment: https://git.openjdk.org/jdk/pull/31011#discussion_r4462695778
PR Review Comment: https://git.openjdk.org/jdk/pull/31011#discussion_r4462696316

Reply via email to