On Mon, 2 Dec 2024 18:53:12 GMT, Henry Jen <henry...@openjdk.org> wrote:

>> src/hotspot/share/runtime/threads.cpp line 654:
>> 
>>> 652:   initialize_java_lang_classes(main_thread, CHECK_JNI_ERR);
>>> 653:   // Update the java.vm.vendor property with 
>>> java.lang.VersionProps.VM_VENDOR
>>> 654:   Arguments::update_vm_vendor(VM_Version::vm_vendor());
>> 
>> It seems very ad hoc to update this after initPhase1 has run, need to think 
>> through if there is a better way to do this.
>
> I agree. This is to minimize change on behavior. 
> 
> Not sure what kind of requirement is there for java.vm.vendor, would it be OK 
> for VM not the set this value and wait until loading of VersionProps class?
> 
> The update is needed for the assertion in statSampler, I don't see other 
> reference to the property in the repo. So the question is when we need the 
> property to be available and exposure scope.

I'm a little lost in the sequence of events here as well. Why do we call 
`override_vm_vendor` in `initialize_java_lang_classes` and then 
`update_vm_vendor` here?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21964#discussion_r1866534288

Reply via email to