Experimental patches for unsafe cleanup <was> Re: The s.m.Unsafe representation in hotspot and method registration

Staffan Larsen staffan.larsen at oracle.com
Tue Mar 25 13:37:55 UTC 2014


(Adding hotspot-runtime-dev since some changes are in hotspot code).


On 25 mar 2014, at 14:20, Paul Sandoz <paul.sandoz at oracle.com> wrote:

> 
> On Mar 25, 2014, at 9:34 AM, Paul Sandoz <Paul.Sandoz at oracle.com> wrote:
> 
>> 
>> On Mar 24, 2014, at 7:49 PM, Staffan Larsen <staffan.larsen at oracle.com> wrote:
>> 
>>> We have abandoned the HSX model. From JDK 8 one version of Hotspot will be tied to one version of the JDK. This looks like old code that has not been cleaned up.
>>> 
>> 
>> Thanks, yes, looks like we can clean this up and also remove the deprecated methods at the same time.
>> 
> 
> Here are some preliminary webrevs to clean up unsafe and also remove all old, deprecated and monitor-related methods:
> 
>  http://cr.openjdk.java.net/~psandoz/jdk9/jdk-unsafe-cleanup/webrev/jdk.patch
> 
>  http://cr.openjdk.java.net/~psandoz/jdk9/hotspot-unsafe-cleanup/webrev/
> 
> Passes all tests i have thrown at it locally.
> 
> There is some additional clean up that could be done to remove prefetch read/write intrinsics hooked up to older versions of Unsafe:
> 
>  do_intrinsic(_prefetchRead,             sun_misc_Unsafe,        prefetchRead_name, prefetch_signature,         F_RN)  \
>   do_name(     prefetchRead_name,                               "prefetchRead")                                        \
>  do_intrinsic(_prefetchWrite,            sun_misc_Unsafe,        prefetchWrite_name, prefetch_signature,        F_RN)  \
>   do_name(     prefetchWrite_name,                              "prefetchWrite")                                       \
>  do_intrinsic(_prefetchReadStatic,       sun_misc_Unsafe,        prefetchReadStatic_name, prefetch_signature,   F_SN)  \
>   do_name(     prefetchReadStatic_name,                         "prefetchReadStatic")                                  \
>  do_intrinsic(_prefetchWriteStatic,      sun_misc_Unsafe,        prefetchWriteStatic_name, prefetch_signature,  F_SN)  \
>   do_name(     prefetchWriteStatic_name,                        "prefetchWriteStatic")                                 \
> 
> That will also require updates in various other files. I presume these prefetch methods are never used throughout the runtime?
> 
> Paul.




More information about the core-libs-dev mailing list