Suppress error warning in HotSpot backports
Volker Simonis
volker.simonis at gmail.com
Tue Mar 18 15:00:59 UTC 2014
The warning is OK, just the wording is misleading.
The '-XX:MaxPermSize' option is a VM (i.e. HotSpot option) so it only
depends on the actual HS version and not on the JDK version.
After Oracle decided to not follow the express model any more (i.e.
downport new HS versions to old Java releases) for them "8.0" is
equivalent to "HS 25".
So you could change the wording to say something like "..was removed
in this version of HotSpot". But if you run a HS 25 in Java 7 the
warning is definitely reasonable and useful because the
'-XX:MaxPermSize' option will be simply ignored (because the PermGen
is gone).
So do you plan do release a version of OpenJDK 7 with HS25? I think we
want to do the same for our commercial SAP JVM, although I'm pretty
sure this will require some considerable tweaking. And Oracle will be
probably reluctant to integrate such changes into HS25, because they
don't want to downport it to Java 7 as far as I know. Not to speak
about the fact that you'll have to maintain your own 7u-forest because
the official one will probably never contain a HS25.
Regards,
Volker
On Tue, Mar 18, 2014 at 3:05 PM, Andrew Haley <aph at redhat.com> wrote:
> When we run a new VM (post permegen removal) and an old JDK, we
> sometimes get a very odd result:
>
> [aph@ ~]$ java -version
> java version "1.7.0-internal"
> [aph ~]$ java -XX:MaxPermSize=64m Hello
> OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=64m; support was removed in 8.0
> Hello, World!
>
> Should a warning for an obsolete runtime argument be suppressed if it is
> not actually obsolete in that JDK version?
>
> It's easy to suppress this warning; patch attached. Should we do this?
>
> Andrew.
>
>
> diff -r 8bca72b725af src/share/vm/runtime/arguments.cpp
> --- a/src/share/vm/runtime/arguments.cpp Wed Mar 05 16:51:41 2014 +0000
> +++ b/src/share/vm/runtime/arguments.cpp Tue Mar 18 13:55:36 2014 +0000
> @@ -861,9 +861,11 @@
> bool has_plus_minus = (*arg == '+' || *arg == '-');
> const char* const argname = has_plus_minus ? arg + 1 : arg;
> if (is_newly_obsolete(arg, &since)) {
> - char version[256];
> - since.to_string(version, sizeof(version));
> - warning("ignoring option %s; support was removed in %s", argname, version);
> + if (JDK_Version::current().compare(since) >= 0) {
> + char version[256];
> + since.to_string(version, sizeof(version));
> + warning("ignoring option %s; support was removed in %s", argname, version);
> + }
> return true;
> }
>
More information about the hotspot-dev
mailing list