RFR 4947890 : Minimize JNI upcalls in system-properties initialization

Roger Riggs Roger.Riggs at oracle.com
Tue Nov 13 19:32:17 UTC 2018


Hi Andrew,

For the sake of brevity in the source, the PUTPROP and 
PUTPROP_PlatformString
macros prefix those "_xxx" arguments with 
"jdk_internal_util_SystemProps_Raw_"
so they refer to the indexes defined by @native in SystemProps.java.
Possibly more readable (but still shortish) would be to include the 
"Raw_" in source file.

The full symbol names are in the generated source file:
build/xxx/support/headers/java.base/jdk_internal_util_SystemProps_Raw.h

Thanks for reviewing,   Roger


On 11/13/2018 02:25 PM, Andrew Luo wrote:
> I'm not a reviewer, but aren't names that begin with _ in the global namespace (_awt_headless_NDX for example) reserved for the C/C++ library?
>
> Thanks,
>
> Andrew
>
> -----Original Message-----
> From: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> On Behalf Of Roger Riggs
> Sent: Tuesday, November 13, 2018 8:00 AM
> To: Core-Libs-Dev <core-libs-dev at openjdk.java.net>; hotspot-runtime-dev at openjdk.java.net
> Subject: RFR 4947890 : Minimize JNI upcalls in system-properties initialization
>
> Please review a re-implementation of the initialization of System properties moving some functions from native to Java.
>
> The upcalls from native to java for each property are replaced by a mechanism to gather the platform, VM and command line properties and return them from a single JNI call.  The creation of the Properties instance and applying command line overrides is handled in Java instead of native.
>
> The JVM_initProperties interface in Hotspot is replaced by JVM_getProperties.
>
> Webrev:
>     http://cr.openjdk.java.net/~rriggs/webrev-props-only-raw/
>
> Issue:
>     https://bugs.openjdk.java.net/browse/JDK-4947890
>
> Thanks, Roger
>



More information about the core-libs-dev mailing list