On Fri, 30 May 2025 13:58:53 GMT, Kevin Walls <kev...@openjdk.org> wrote:

> Just to be clear, the ifdef JVMTI means Thread.dump_to_file not work in a 
> build configuration using - --enable-jvm-feature-jvmti=no ? Currently, 
> Thread.dump_to_file works in such configs. I don't think this is a problem.. 
> just thought we could spell it out. This all looks good to me.

The dependency on JvmtiVTMSTransitionDisabler is needed but now but maybe in 
the future this could be separated from JVMTI for other cases where transitions 
needs to be disabled.

Minimal VM disables management and jvmti, and is really only practical if you 
run jlink to create a run-time image with a small subset of the modules. So no 
jdk.management and no HotSpotDiagnosticMXBean. It's possible of course that 
someone configures with +management and -jvmti, in which case the 
HotSpotDiagnosticMXBean.dumpThreads will throw NPE. It should throw UOE (the 
method is specified to allow this), which means JVM_CreateThreadSnapshot or 
ThreadSnapshot.of(Thread) should throw.

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

PR Comment: https://git.openjdk.org/jdk/pull/25425#issuecomment-2922530490

Reply via email to