RFR 8189208: Cleanup ancient argument processing code

David Holmes david.holmes at oracle.com
Wed May 1 22:27:39 UTC 2019


Hi Gerard,

Mostly looks good - a couple of comments below.

On 2/05/2019 1:45 am, gerard ziemski wrote:
> Hi all,
> 
> Please review this fix, which:
> 
> #1 removes overriding of “UseLinuxPosixThreadCPUClocks” to different 
> default values in older JDKs
> #2 removes checks for “supports_thread_park_blocker” and all of the 
> supporting code

src/hotspot/share/include/jvm.h

-     unsigned int reserved2;
+     unsigned int reserved2 : 2;

This change seems wrong to me. reserved2 is a full size int (I don't 
know why this struct has been laid out this way but it has). To handle 
the deleted _thread_park_blocker field you can either:

a) don't delete it but rename it to unused_slot; or
b) change the following "unsigned int : 29;" to "unsigned int : 30;" to 
take up the extra bit.

Also note that the entire comment block from line 1284 can be deleted.

As a follow up we should also remove all the post_vm_init_hook_enabled 
code and pending_list_uses_discovered_field code. Or more generally 
cleanup all the legacy code in JDK_Version that was there to allow 
different JDKs to run on different versions of hotspot (eg dll_lookup of 
JDK_GetVersionInfo0).

Minor nit in threadService.cpp

     // Support for JSR-166 locks
!   if (_thread_status == java_lang_Thread::PARKED ||
!          _thread_status == java_lang_Thread::PARKED_TIMED) {

Please fix the indent so _thread_status line up. (The original code 
wasn't correctly indented.)

Thanks,
David
-----

> Bug: https://bugs.openjdk.java.net/browse/JDK-8189208
> Web rev: http://cr.openjdk.java.net/~gziemski/8189208_rev1
> Tested with Mach5 tier1,2,3, another Mach5 tier1,2,3,4,5 in progress…
> 
> 
> Cheers


More information about the hotspot-runtime-dev mailing list