RFR (S): 7130391: Add a framework for vendor-specific validation control of setting command-line switches in Hotspot
Dmitry.Samersoff at oracle.com
Tue Jan 17 04:22:11 PST 2012
I'm second to David,a message "wrong flag value or origin" looks very
Besides it, looks good for me.
On 2012-01-17 06:04, Robert Ottenhag wrote:
> Webrev: http://cr.openjdk.java.net/~rottenha/7130391/webrev.00
> This fix adds optional validation control to the setting of command-line switches in Hotspot, and allows it to have vendor-specific extensions if necessary.
> The design follows the previously added framework for vendor-specific command-line switch extensions in CR7117389.
> The validation control is handled by new boolean methods Flag::is_valid_<type>(value,origin) that are called at the beginning of each call to CommandLineFlags[Ex]::<type>AtPut() to verify that the new value and origin are valid replacements for the current value and origin for this flag.
> When parsing the command line options, a failed validation will typically result in an error message and exit with "Unrecognized VM option '<flag-name>'". When used dynamically using the attach API or management API the resulting operation will fail, leaving it up to the caller to handle it as appropriate.
> A simple use case for validation is a manageable flag whose current value can not be less than the previous value, while a more complex example may base the validation on multiple other flags, etc.
Java Hotspot development team, SPB04
* There will come soft rains ...
More information about the hotspot-dev