RFR: 8067235: embedded/minvm/checknmt fails on compact1 and compact2 with minimal VM
Lois Foltan
lois.foltan at oracle.com
Tue Apr 7 10:50:47 UTC 2015
Looks good!
Lois
On 4/6/2015 11:40 PM, David Holmes wrote:
> The bug report for this is not public but the problem is pretty
> straight-forward. When the NMT2 changes were pushed:
>
> https://bugs.openjdk.java.net/browse/JDK-8046598
>
> there was an error in the conditional processing of the
> -XX:NativeMemoryTracking argument in relation to the INCLUDE_NMT build
> variable. All of the processing logic was inside the ifdef and there
> was no #else to report that NMT was disabled.
>
> webrev: http://cr.openjdk.java.net/~dholmes/8067235/webrev/
>
> Inline patch below.
>
> Testing: JPRT and use of minimal VM:
>
> Before:
>
> java -minimal -XX:NativeMemoryTracking=detail -version
> java version "1.9.0-ea"
> Java(TM) SE Embedded Runtime Environment (build 1.9.0-ea-b58)
> Java HotSpot(TM) Embedded Minimal VM (build 1.9.0-ea-b58, mixed mode)
>
> After:
>
> java -minimal -XX:NativeMemoryTracking=detail -version
> Native Memory Tracking is not supported in this VM
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
>
> This mirrors the output as it previously given in JDK 8.
>
> Thanks,
> David
> -----
>
> --- old/src/share/vm/runtime/arguments.cpp 2015-04-06
> 23:13:21.405601011 -0400
> +++ new/src/share/vm/runtime/arguments.cpp 2015-04-06
> 23:13:20.029521710 -0400
> @@ -3714,8 +3714,8 @@
> CommandLineFlags::printFlags(tty, false);
> vm_exit(0);
> }
> -#if INCLUDE_NMT
> if (match_option(option, "-XX:NativeMemoryTracking", &tail)) {
> +#if INCLUDE_NMT
> // The launcher did not setup nmt environment variable properly.
> if (!MemTracker::check_launcher_nmt_support(tail)) {
> warning("Native Memory Tracking did not setup properly, using
> wrong launcher?");
> @@ -3731,9 +3731,12 @@
> vm_exit_during_initialization("Syntax error, expecting
> -XX:NativeMemoryTracking=[off|summary|detail]", NULL);
> }
> continue;
> - }
> +#else
> + jio_fprintf(defaultStream::error_stream(),
> + "Native Memory Tracking is not supported in this VM\n");
> + return JNI_ERR;
> #endif
> -
> + }
>
More information about the hotspot-runtime-dev
mailing list