How to deal with a missing VM? (was Re: RFR 8010280: jvm.cfg needs updating for non-server builds)

David Holmes david.holmes at oracle.com
Fri Apr 19 04:06:39 UTC 2013


Okay no opinions. CCC request will go with aliasing for historical 
compatibility.

David

On 17/04/2013 12:27 PM, David Holmes wrote:
> This change to the jvm.cfg file needs to be put through our internal CCC
> process for approval. Given that, and that this is mostly about policy
> (not mechanism) and there is no absolute right answer just a
> not-unreasonable default, I thought I would solicit opinions on this.
>
> what should be the behaviour if you ask for a VM that could be, but
> isn't present? Options:
>
> a) Missing from jvm.cfg so VM error:
>
> Unrecognized option: -client
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
>
> b) ERROR in jvm.cfg
>
> Error: client VM not supported
>
> c) WARN in jvm.cfg
>
> Warning: client VM not supported; <default> VM will be used
>
> d) ALIAS to default (which is in effect a silent warning but with
> control over which VM to use)
>
> e) IGNORE (which seems to be a degenerate case of ALIAS as it just uses
> the default)
>
> Note that this has no affect on the Oracle JDK (SE or Embedded) as the
> committed jvm.cfg (possibly with '-minimal KNOWN' added) will be used.
> This is primarily about developer builds.
>
> Thanks,
> David
>
>
> On 16/04/2013 8:42 AM, David Holmes wrote:
>> FYI updated webrev at same location, removing the dead code Erik spotted.
>>
>> http://cr.openjdk.java.net/~dholmes/8010280/webrev/
>>
>> On 16/04/2013 2:25 AM, Mike Duigou wrote:
>>> Hi David;
>>>
>>> I remember reviewing the jvm.cfg config patch for JDK 7. I had hoped
>>> to see the "classic" and "green" flags go away and some of the other
>>> legacy flags like "-hotspot" reduced to WARN. What's the difference
>>> between removing an entry completely and retaining it with "ERROR"?
>>
>> Just the nature of the error message:
>>
>>  > java -green
>> Error: green VM not supported
>>  > java -blue
>> Unrecognized option: -blue
>> Error: Could not create the Java Virtual Machine.
>> Error: A fatal exception has occurred. Program will exit.
>>
>> I wasn't touching any of the legacy stuff - though if this needs to go
>> to CCC I would suggest removing all the legacy entries.
>>
>>> Additionally I don't like that aliases have differing definitions and
>>> some confusing ones like "-server ALIASED_TO -client". Is this
>>> necessary or just historically convenient?
>>
>> I don't like aliases period! Historically (and this is very recent
>> history) it was necessary to deal with the test suites being applied to
>> a JDK with, eg, only client VM. Every test that specified -server would
>> fail if the alias didn't exist (and as I stated we're moving away from
>> that ie the tests don't set -client or -server but the complete test
>> suite run does, and it knows what VM is under test.
>>
>> Personally I'd probably choose WARN for any VM not present.
>>
>> The problem is that the "right" thing depends on who is building what,
>> and how they plan to use it. All I can do is define a not-unreasonable
>> default policy. I also have a time constraint as I need to get this in
>> before the 23rd to meet an internal deadline.
>>
>> I've attached all the generated versions below.
>>
>> Thanks,
>> David
>>
>> ::::::::::::::
>> linux-i586-client/jdk/lib/i386/jvm.cfg
>> ::::::::::::::
>> -client KNOWN
>> -server ALIASED_TO -client
>> -hotspot ALIASED_TO -client
>> -classic WARN
>> -native ERROR
>> -green ERROR
>> ::::::::::::::
>> linux-i586-client-server/jdk/lib/i386/jvm.cfg
>> ::::::::::::::
>> # Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights
>> reserved.
>> # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>> #
>> # This code is free software; you can redistribute it and/or modify it
>> # under the terms of the GNU General Public License version 2 only, as
>> # published by the Free Software Foundation.  Oracle designates this
>> # particular file as subject to the "Classpath" exception as provided
>> # by Oracle in the LICENSE file that accompanied this code.
>> #
>> # This code is distributed in the hope that it will be useful, but
>> WITHOUT
>> # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>> # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
>> # version 2 for more details (a copy is included in the LICENSE file that
>> # accompanied this code).
>> #
>> # You should have received a copy of the GNU General Public License
>> version
>> # 2 along with this work; if not, write to the Free Software Foundation,
>> # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
>> #
>> # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
>> # or visit www.oracle.com if you need additional information or have any
>> # questions.
>> #
>> # List of JVMs that can be used as an option to java, javac, etc.
>> # Order is important -- first in this list is the default JVM.
>> # NOTE that this both this file and its format are UNSUPPORTED and
>> # WILL GO AWAY in a future release.
>> #
>> # You may also select a JVM in an arbitrary location with the
>> # "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
>> # and may not be available in a future release.
>> #
>> -client IF_SERVER_CLASS -server
>> -server KNOWN
>> -hotspot ALIASED_TO -client
>> -classic WARN
>> -native ERROR
>> -green ERROR
>> ::::::::::::::
>> linux-i586-client-server-minimal1/jdk/lib/i386/jvm.cfg
>> ::::::::::::::
>> # Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights
>> reserved.
>> # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>> #
>> # This code is free software; you can redistribute it and/or modify it
>> # under the terms of the GNU General Public License version 2 only, as
>> # published by the Free Software Foundation.  Oracle designates this
>> # particular file as subject to the "Classpath" exception as provided
>> # by Oracle in the LICENSE file that accompanied this code.
>> #
>> # This code is distributed in the hope that it will be useful, but
>> WITHOUT
>> # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>> # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
>> # version 2 for more details (a copy is included in the LICENSE file that
>> # accompanied this code).
>> #
>> # You should have received a copy of the GNU General Public License
>> version
>> # 2 along with this work; if not, write to the Free Software Foundation,
>> # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
>> #
>> # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
>> # or visit www.oracle.com if you need additional information or have any
>> # questions.
>> #
>> # List of JVMs that can be used as an option to java, javac, etc.
>> # Order is important -- first in this list is the default JVM.
>> # NOTE that this both this file and its format are UNSUPPORTED and
>> # WILL GO AWAY in a future release.
>> #
>> # You may also select a JVM in an arbitrary location with the
>> # "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
>> # and may not be available in a future release.
>> #
>> -client IF_SERVER_CLASS -server
>> -server KNOWN
>> -hotspot ALIASED_TO -client
>> -classic WARN
>> -native ERROR
>> -green ERROR
>> -minimal KNOWN
>> ::::::::::::::
>> linux-i586-minimal1-client/jdk/lib/i386/jvm.cfg
>> ::::::::::::::
>> -client KNOWN
>> -server ALIASED_TO -client
>> -hotspot ALIASED_TO -client
>> -minimal KNOWN
>> -classic WARN
>> -native ERROR
>> -green ERROR
>> ::::::::::::::
>> linux-i586-minimal1/jdk/lib/i386/jvm.cfg
>> ::::::::::::::
>> -minimal KNOWN
>> -server ALIASED_TO -minimal
>> -client ALIASED_TO -minimal
>> -hotspot ALIASED_TO -minimal
>> -classic WARN
>> -native ERROR
>> -green ERROR
>> ::::::::::::::
>> linux-i586-minimal1-server/jdk/lib/i386/jvm.cfg
>> ::::::::::::::
>> -server KNOWN
>> -client ALIASED_TO -server
>> -hotspot ALIASED_TO -server
>> -minimal KNOWN
>> -classic WARN
>> -native ERROR
>> -green ERROR
>> ::::::::::::::
>> linux-i586-server-client-minimal1/jdk/lib/i386/jvm.cfg
>> ::::::::::::::
>> # Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights
>> reserved.
>> # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>> #
>> # This code is free software; you can redistribute it and/or modify it
>> # under the terms of the GNU General Public License version 2 only, as
>> # published by the Free Software Foundation.  Oracle designates this
>> # particular file as subject to the "Classpath" exception as provided
>> # by Oracle in the LICENSE file that accompanied this code.
>> #
>> # This code is distributed in the hope that it will be useful, but
>> WITHOUT
>> # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>> # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
>> # version 2 for more details (a copy is included in the LICENSE file that
>> # accompanied this code).
>> #
>> # You should have received a copy of the GNU General Public License
>> version
>> # 2 along with this work; if not, write to the Free Software Foundation,
>> # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
>> #
>> # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
>> # or visit www.oracle.com if you need additional information or have any
>> # questions.
>> #
>> # List of JVMs that can be used as an option to java, javac, etc.
>> # Order is important -- first in this list is the default JVM.
>> # NOTE that this both this file and its format are UNSUPPORTED and
>> # WILL GO AWAY in a future release.
>> #
>> # You may also select a JVM in an arbitrary location with the
>> # "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
>> # and may not be available in a future release.
>> #
>> -client IF_SERVER_CLASS -server
>> -server KNOWN
>> -hotspot ALIASED_TO -client
>> -classic WARN
>> -native ERROR
>> -green ERROR
>> -minimal KNOWN
>> ::::::::::::::
>> linux-i586-server/jdk/lib/i386/jvm.cfg
>> ::::::::::::::
>> -server KNOWN
>> -client ALIASED_TO -server
>> -hotspot ALIASED_TO -server
>> -classic WARN
>> -native ERROR
>> -green ERROR
>>



More information about the build-dev mailing list