Review request 8008310 - Some adjustments needed to minimal VM warnings and errors for unsupported command line options
David Holmes
david.holmes at oracle.com
Sun Feb 17 15:49:59 PST 2013
Hi Joe,
On 18/02/2013 6:19 AM, JOSEPH PROVINO wrote:
> Webrev is here: http://cr.openjdk.java.net/~jprovino/8008310/webrev.00
>
> Only change is to arguments.cpp.
I'm sorry I didn't pick up on this with earlier changes (eg
-Dcom.sun.management usage) but it seems to me that the argument parsing
code is not supposed to call vm_exit_during_initialization, but should
instead print an error message and return JNI_ERR. This will ultimately
lead to CreateJavaVM returning JNI_ERR.
There is some existing use of vm_exit_during_initialization in
arguments.cpp (CDS related and compilation policy related) but I would
say those show bad examples of how to handle argument errors. There is
an open RFE for the VM to never terminate during initialization but only
return JNI_ERR. We're a long way from that, but I don't think we should
be moving in the other direction.
So I would say that these changes from warnings to failures have to be
redone. In addition the other uses of vm_exit_during_initialization
related to the minimal VM, here:
2475 if (match_option(option, "-Dcom.sun.management", &tail)) {
2476 #if INCLUDE_MANAGEMENT
2477 FLAG_SET_CMDLINE(bool, ManagementServer, true);
2478 #else
2479 vm_exit_during_initialization(
2480 "-Dcom.sun.management is not supported in this VM.", NULL);
2481 #endif
here:
2826 #if !INCLUDE_MANAGEMENT
2827 } else if (match_option(option, "-XX:+ManagementServer", &tail)) {
2828 vm_exit_during_initialization(
2829 "ManagementServer is not supported in this VM.", NULL);
2830 #endif // INCLUDE_MANAGEMENT
and here
3132 #if INCLUDE_NMT
3133 MemTracker::init_tracking_options(tail);
3134 #else
3135 vm_exit_during_initialization(
3136 "Native Memory Tracking is not supported in this VM", NULL);
3137 #endif
should also be changed.
David
-----
> thanks.
>
> joe
More information about the hotspot-dev
mailing list