On Thu, 27 Feb 2025 13:36:26 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:

>> when I list the modules of the  minimal JVM I see a number of modules that 
>> will most likely not work because the related JVM features are not present 
>> 
>> 
>> images/jdk/bin/java --list-modules
>>  ...
>> jdk.jdi@25.0.0.1-internal
>> jdk.jdwp.agent@25.0.0.1-internal
>>  ...
>> jdk.jfr@25.0.0.1-internal
>> jdk.management@25.0.0.1-internal
>> jdk.management.agent@25.0.0.1-internal
>> jdk.management.jfr@25.0.0.1-internal
>> 
>> 
>> The minimal JVM does not  contain e.g. JFR, JVMTI or management  JVM 
>> features. So most likely those modules miss basic functionality and will not 
>> or not fully work.
>> But fixing this is most likely out of scope of this PR .
>> Is there some JVM feature to module  mapping and tool support already, I am 
>> not aware of it ? 
>> Would be nice to have this, because removing unneeded (and not working) 
>> modules from the image is probably a good idea.
>
>> when I list the modules of the minimal JVM I see a number of modules that 
>> will most likely not work because the related JVM features are not present
>> 
>> ```
>> images/jdk/bin/java --list-modules
>>  ...
>> jdk.jdi@25.0.0.1-internal
>> jdk.jdwp.agent@25.0.0.1-internal
>>  ...
>> jdk.jfr@25.0.0.1-internal
>> jdk.management@25.0.0.1-internal
>> jdk.management.agent@25.0.0.1-internal
>> jdk.management.jfr@25.0.0.1-internal
>> ```
>> 
>> The minimal JVM does not contain e.g. JFR, JVMTI or management JVM features. 
>> So most likely those modules miss basic functionality and will not or not 
>> fully work. But fixing this is most likely out of scope of this PR . Is 
>> there some JVM feature to module mapping and tool support already, I am not 
>> aware of it ? Would be nice to have this, because removing unneeded (and not 
>> working) modules from the image is probably a good idea.
> 
> @magicus , @erikj79  is there already something in the build system that can 
> be used for this task ?
> E.g. we still have the module  'jdk.jfr'  in the minimal JVM - but the module 
> does not work because the related Hotspot feature is missing.
> Same for JDWP/JDI - feature JVMTI is missing.

No, there is nothing for that. There is a conceptual leap between determining 
how to compile hotspot and how to decide which modules to include in the image, 
and is not at all clear how you would want to integrate these two. Like, should 
you exclude models by saying a hotspot feature is not needed? Or, should you 
modify how hotspot is compiled by saying that you want to exclude a model?

I think it is better left to whoever configures the build to figure such things 
out.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23805#discussion_r1973793851

Reply via email to