Re: RFR [XS]: 8237374: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-21 Thread Erik Joelsson

That looks good.

/Erik


On 2020-01-21 06:45, Baesken, Matthias wrote:

Hi Erik, new webrev :

http://cr.openjdk.java.net/~mbaesken/webrevs/8237374.1/

Best regards, Matthias

-Original Message-
From: Erik Joelsson 
Sent: Freitag, 17. Januar 2020 15:18
To: Baesken, Matthias ; 'build-dev@openjdk.java.net' 
; 'hotspot-...@openjdk.java.net' 

Subject: Re: RFR [XS]: 8237374: configuring with 
--with-jvm-variants=minimal,server makes cds disappear in server

Hello Matthias,

Using BUILDING_MULTIPLE_JVM_VARIANTS as condition is clever and happens
to coincide with the set of variants that also support CDS, but I would
say this correlation is incidental. I would still prefer an explicit
test for if any of the variants that do support CDS is in the set of
variants being built. This will make it much easier to read and
understand the logic. Simply:

if ! HOTSPOT_CHECK_JVM_VARIANT(server) && !
HOTSPOT_CHECK_JVM_VARIANT(client); then
    ENABLE_CDS="false"
    ...

/Erik




RE: RFR [XS]: 8237374: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-21 Thread Baesken, Matthias
Hi Erik, new webrev :

http://cr.openjdk.java.net/~mbaesken/webrevs/8237374.1/

Best regards, Matthias

-Original Message-
From: Erik Joelsson  
Sent: Freitag, 17. Januar 2020 15:18
To: Baesken, Matthias ; 'build-dev@openjdk.java.net' 
; 'hotspot-...@openjdk.java.net' 

Subject: Re: RFR [XS]: 8237374: configuring with 
--with-jvm-variants=minimal,server makes cds disappear in server

Hello Matthias,

Using BUILDING_MULTIPLE_JVM_VARIANTS as condition is clever and happens 
to coincide with the set of variants that also support CDS, but I would 
say this correlation is incidental. I would still prefer an explicit 
test for if any of the variants that do support CDS is in the set of 
variants being built. This will make it much easier to read and 
understand the logic. Simply:

if ! HOTSPOT_CHECK_JVM_VARIANT(server) && ! 
HOTSPOT_CHECK_JVM_VARIANT(client); then
   ENABLE_CDS="false"
   ...

/Erik




Re: RFR [XS]: 8237374: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-17 Thread Erik Joelsson

Hello Matthias,

Using BUILDING_MULTIPLE_JVM_VARIANTS as condition is clever and happens 
to coincide with the set of variants that also support CDS, but I would 
say this correlation is incidental. I would still prefer an explicit 
test for if any of the variants that do support CDS is in the set of 
variants being built. This will make it much easier to read and 
understand the logic. Simply:


if ! HOTSPOT_CHECK_JVM_VARIANT(server) && ! 
HOTSPOT_CHECK_JVM_VARIANT(client); then

  ENABLE_CDS="false"
  ...

/Erik

On 2020-01-17 00:07, Baesken, Matthias wrote:

Hello, please review  this small patch .

When building 2 VM variants   minimal and server  in one build and using

   --with-jvm-variants=minimal,server

to configure this setup  , the build works nicely. But I notice that in the 
server VM, cds is removed.
Instead of

checking if cds should be enabled... yes

I get (with some tracing added ) :

configure: WARNING: ENABLE_CDS set to false because we found a minimal, core or 
zero JVM.
checking if cds should be enabled... no

The checks in hotspot.m4 disables cds by error for the server v,  because it matches to 
minimal  in the string  "minimal,server"  .

The configure option  --with-jvm-variants=minimal,server   enables  a  
multi-JVM variants build  (variable BUILDING_MULTIPLE_JVM_VARIANTS in 
hotspot.m4) .
This   special build is only  supported  for   VALID_MULTIPLE_JVM_VARIANTS="server 
client minimal" .
So  we  better do not  disable  cds  in  a  BUILDING_MULTIPLE_JVM_VARIANTS - 
build   (means minimal + server/client ) ;   minimal has cds disabled by 
default anyway.


Bug/webrev :

https://bugs.openjdk.java.net/browse/JDK-8237374


http://cr.openjdk.java.net/~mbaesken/webrevs/8237374.0/


Thanks, Matthias


RFR [XS]: 8237374: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-17 Thread Baesken, Matthias
Hello, please review  this small patch .

When building 2 VM variants   minimal and server  in one build and using

  --with-jvm-variants=minimal,server

to configure this setup  , the build works nicely. But I notice that in the 
server VM, cds is removed.
Instead of

checking if cds should be enabled... yes

I get (with some tracing added ) :

configure: WARNING: ENABLE_CDS set to false because we found a minimal, core or 
zero JVM.
checking if cds should be enabled... no

The checks in hotspot.m4 disables cds by error for the server v,  because it 
matches to minimal  in the string  "minimal,server"  .

The configure option  --with-jvm-variants=minimal,server   enables  a  
multi-JVM variants build  (variable BUILDING_MULTIPLE_JVM_VARIANTS in 
hotspot.m4) .
This   special build is only  supported  for   
VALID_MULTIPLE_JVM_VARIANTS="server client minimal" .
So  we  better do not  disable  cds  in  a  BUILDING_MULTIPLE_JVM_VARIANTS - 
build   (means minimal + server/client ) ;   minimal has cds disabled by 
default anyway.


Bug/webrev :

https://bugs.openjdk.java.net/browse/JDK-8237374


http://cr.openjdk.java.net/~mbaesken/webrevs/8237374.0/


Thanks, Matthias


Re: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-16 Thread Erik Joelsson

On 2020-01-16 10:48, Ioi Lam wrote:



On 1/16/20 9:09 AM, Erik Joelsson wrote:
I would lean towards changing the check from "if any of the variants 
do not support CDS, disable it" to "if any of the variants support 
CDS, enable it". The cds jvm feature is only added to the variants 
that support it anyway.


If you do this, you probably need to figure out how to explicitly 
only generate the archive for the supported jvm variants in 
Images.gmk too. Not sure if the archive is jvm variant dependent or 
if the layout even supports multiple variants. It will likely get messy.


The CDS archive is dependent on the exact libjvm.so, so each JDK image 
should creates its own CDS archive during the build.


I think this can be handled emitting a different value for 
"BUILD_CDS_ARCHIVE" in the spec.gmk of each variant.


Building with multiple JVM variants does not create separate JDK images, 
the libjvm.so files simply end up in:


lib/server/libjvm.so
lib/minimal/libjvm.so

I don't think the default archive takes that into account.

/Erik


Thanks
- Ioi



/Erik

On 2020-01-16 08:22, Baesken, Matthias wrote:

Hello, thanks for looking into it .
Should I do a check just looking into single JVM configs, something 
like


AC_DEFUN([HOTSPOT_IS_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " == " $1 " ]] ] ])

if HOTSPOT_IS_JVM_VARIANT(zero) || HOTSPOT_IS_JVM_VARIANT(minimal) 
|| HOTSPOT_IS_JVM_VARIANT(core); then


instead of

AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])

if HOTSPOT_CHECK_JVM_VARIANT(zero) || 
HOTSPOT_CHECK_JVM_VARIANT(minimal) || 
HOTSPOT_CHECK_JVM_VARIANT(core); then



This should  remove the error in case of multi-JVM configs .
Or maybe  the whole check ( if HOTSPOT_CHECK_JVM_VARIANT(zero) ||  
HOTSPOT_CHECK_JVM_VARIANT(minimal) || 
HOTSPOT_CHECK_JVM_VARIANT(core); then  fi )
  might be removed , I see not so much value in it  because in case 
one sets --enable-jvm-features   directly the check isn’t done .


I opened  bug :

https://bugs.openjdk.java.net/browse/JDK-8237374

JDK-8237374 :  configuring with --with-jvm-variants=minimal,server 
makes cds disappear in server



Best regards, Matthias




This does indeed look like a bug to me. At least at Oracle, we no 
longer
build any multi JVM configs regularly, so things like this falls 
through

the cracks.

/Erik

On 2020-01-16 02:18, Baesken, Matthias wrote:

Hello, I noticed the following strange "feature" (or is it a bug?) .
When  building 2 VM variants in one build  and  using

    --with-jvm-variants=minimal,server

For this, the build works nicely. But I notice that  in the server 
VM, cds  is

removed.

Instead of

checking if cds should be enabled... yes

I get ( with the following patch that adds tracing)  :

configure: WARNING: ENABLE_CDS set to false because we found a

minimal, core or zero JVM.

checking if cds should be enabled... no
    ...

* JVM features:   minimal: 'compiler1 minimal serialgc'   
server: 'compiler1

compiler2 epsilongc g1gc jfr jni-check jvmti management nmt parallelgc
serialgc services vm-structs'

(patch is

--- a/make/autoconf/hotspot.m4  Wed Jan 15 21:20:40 2020 -0800
+++ b/make/autoconf/hotspot.m4  Thu Jan 16 10:24:43 2020 +0100
@@ -528,6 +528,7 @@
    if HOTSPOT_CHECK_JVM_VARIANT(zero) ||

HOTSPOT_CHECK_JVM_VARIANT(minimal) ||
HOTSPOT_CHECK_JVM_VARIANT(core); then
   # ..except when the user explicitely requested it with 
--enable-jvm-

features

   if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
 ENABLE_CDS="false"
+  AC_MSG_WARN([ENABLE_CDS set to false because we found a

minimal, core or zero JVM.])

 if test "x$enable_cds" = "xyes"; then
   AC_MSG_ERROR([CDS not implemented for variants zero, 
minimal,

core. Remove --enable-cds.])

 Fi


Is it expected that  cds goes away in "server"   when configuring  
"--with-
jvm-variants=minimal,server"   ?   Looks like a bug to me, should 
it be fixed

(so that cds stays in the server   jvm-feature list) ?


Thanks, Matthias





Re: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-16 Thread Ioi Lam




On 1/16/20 9:09 AM, Erik Joelsson wrote:
I would lean towards changing the check from "if any of the variants 
do not support CDS, disable it" to "if any of the variants support 
CDS, enable it". The cds jvm feature is only added to the variants 
that support it anyway.


If you do this, you probably need to figure out how to explicitly only 
generate the archive for the supported jvm variants in Images.gmk too. 
Not sure if the archive is jvm variant dependent or if the layout even 
supports multiple variants. It will likely get messy.


The CDS archive is dependent on the exact libjvm.so, so each JDK image 
should creates its own CDS archive during the build.


I think this can be handled emitting a different value for 
"BUILD_CDS_ARCHIVE" in the spec.gmk of each variant.


Thanks
- Ioi



/Erik

On 2020-01-16 08:22, Baesken, Matthias wrote:

Hello, thanks for looking into it .
Should I do a check just looking into single JVM configs, something like

AC_DEFUN([HOTSPOT_IS_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " == " $1 " ]] ] ])

if HOTSPOT_IS_JVM_VARIANT(zero) || HOTSPOT_IS_JVM_VARIANT(minimal) || 
HOTSPOT_IS_JVM_VARIANT(core); then


instead of

AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])

if HOTSPOT_CHECK_JVM_VARIANT(zero) || 
HOTSPOT_CHECK_JVM_VARIANT(minimal) || 
HOTSPOT_CHECK_JVM_VARIANT(core); then



This should  remove the error in case of multi-JVM configs .
Or maybe  the whole check ( if HOTSPOT_CHECK_JVM_VARIANT(zero) ||  
HOTSPOT_CHECK_JVM_VARIANT(minimal) || 
HOTSPOT_CHECK_JVM_VARIANT(core); then  fi )
  might be removed , I see not so much value in it  because  in case 
one sets --enable-jvm-features   directly the check isn’t done .


I opened  bug :

https://bugs.openjdk.java.net/browse/JDK-8237374

JDK-8237374 :  configuring with --with-jvm-variants=minimal,server 
makes cds disappear in server



Best regards, Matthias




This does indeed look like a bug to me. At least at Oracle, we no 
longer
build any multi JVM configs regularly, so things like this falls 
through

the cracks.

/Erik

On 2020-01-16 02:18, Baesken, Matthias wrote:

Hello, I noticed the following strange "feature" (or is it a bug?) .
When  building 2 VM variants in one build  and  using

    --with-jvm-variants=minimal,server

For this, the build works nicely. But I notice that  in the server 
VM, cds  is

removed.

Instead of

checking if cds should be enabled... yes

I get ( with the following patch that adds tracing)  :

configure: WARNING: ENABLE_CDS set to false because we found a

minimal, core or zero JVM.

checking if cds should be enabled... no
    ...

* JVM features:   minimal: 'compiler1 minimal serialgc'   
server: 'compiler1

compiler2 epsilongc g1gc jfr jni-check jvmti management nmt parallelgc
serialgc services vm-structs'

(patch is

--- a/make/autoconf/hotspot.m4  Wed Jan 15 21:20:40 2020 -0800
+++ b/make/autoconf/hotspot.m4  Thu Jan 16 10:24:43 2020 +0100
@@ -528,6 +528,7 @@
    if HOTSPOT_CHECK_JVM_VARIANT(zero) ||

HOTSPOT_CHECK_JVM_VARIANT(minimal) ||
HOTSPOT_CHECK_JVM_VARIANT(core); then
   # ..except when the user explicitely requested it with 
--enable-jvm-

features

   if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
 ENABLE_CDS="false"
+  AC_MSG_WARN([ENABLE_CDS set to false because we found a

minimal, core or zero JVM.])

 if test "x$enable_cds" = "xyes"; then
   AC_MSG_ERROR([CDS not implemented for variants zero, 
minimal,

core. Remove --enable-cds.])

 Fi


Is it expected that  cds goes away in "server"   when configuring  
"--with-
jvm-variants=minimal,server"   ?   Looks like a bug to me, should it 
be fixed

(so that cds stays in the server   jvm-feature list) ?


Thanks, Matthias





Re: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-16 Thread Erik Joelsson
I would lean towards changing the check from "if any of the variants do 
not support CDS, disable it" to "if any of the variants support CDS, 
enable it". The cds jvm feature is only added to the variants that 
support it anyway.


If you do this, you probably need to figure out how to explicitly only 
generate the archive for the supported jvm variants in Images.gmk too. 
Not sure if the archive is jvm variant dependent or if the layout even 
supports multiple variants. It will likely get messy.


/Erik

On 2020-01-16 08:22, Baesken, Matthias wrote:

Hello, thanks for looking into it .
Should I do a check just looking into single JVM configs,   something like

AC_DEFUN([HOTSPOT_IS_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " == " $1 " ]] ] ])

if HOTSPOT_IS_JVM_VARIANT(zero) ||  HOTSPOT_IS_JVM_VARIANT(minimal) ||  
HOTSPOT_IS_JVM_VARIANT(core); then

instead of

AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])

if HOTSPOT_CHECK_JVM_VARIANT(zero) ||  HOTSPOT_CHECK_JVM_VARIANT(minimal) ||  
HOTSPOT_CHECK_JVM_VARIANT(core); then


This should  remove the error in case of multi-JVM configs .
Or maybe  the whole check ( if HOTSPOT_CHECK_JVM_VARIANT(zero) ||  
HOTSPOT_CHECK_JVM_VARIANT(minimal) ||  HOTSPOT_CHECK_JVM_VARIANT(core); then 
 fi )
  might be removed , I see not so much value in it  because  in case one sets 
--enable-jvm-features   directly the check isn’t done .

I opened  bug :

https://bugs.openjdk.java.net/browse/JDK-8237374

JDK-8237374 :  configuring with --with-jvm-variants=minimal,server makes cds 
disappear in server


Best regards, Matthias





This does indeed look like a bug to me. At least at Oracle, we no longer
build any multi JVM configs regularly, so things like this falls through
the cracks.

/Erik

On 2020-01-16 02:18, Baesken, Matthias wrote:

Hello, I noticed the following  strange "feature" (or is it a bug?) .
When  building 2 VM variants in one build  and  using

--with-jvm-variants=minimal,server

For this, the build works nicely. But I notice that  in the server VM, cds  is

removed.

Instead of

checking if cds should be enabled... yes

I get ( with the following patch that adds tracing)  :

configure: WARNING: ENABLE_CDS set to false because we found a

minimal, core or zero JVM.

checking if cds should be enabled... no
...

* JVM features:   minimal: 'compiler1 minimal serialgc'   server: 'compiler1

compiler2 epsilongc g1gc jfr jni-check jvmti management nmt parallelgc
serialgc services vm-structs'

(patch is

--- a/make/autoconf/hotspot.m4  Wed Jan 15 21:20:40 2020 -0800
+++ b/make/autoconf/hotspot.m4  Thu Jan 16 10:24:43 2020 +0100
@@ -528,6 +528,7 @@
if HOTSPOT_CHECK_JVM_VARIANT(zero) ||

HOTSPOT_CHECK_JVM_VARIANT(minimal) ||
HOTSPOT_CHECK_JVM_VARIANT(core); then

   # ..except when the user explicitely requested it with --enable-jvm-

features

   if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
 ENABLE_CDS="false"
+  AC_MSG_WARN([ENABLE_CDS set to false because we found a

minimal, core or zero JVM.])

 if test "x$enable_cds" = "xyes"; then
   AC_MSG_ERROR([CDS not implemented for variants zero, minimal,

core. Remove --enable-cds.])

 Fi


Is it expected that  cds goes away in "server"   when  configuring  "--with-

jvm-variants=minimal,server"   ?   Looks like a bug to me,  should it be fixed
(so that cds stays in the server   jvm-feature list) ?


Thanks, Matthias



RE: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-16 Thread Baesken, Matthias
Hello, thanks for looking into it .
Should I do a check just looking into single JVM configs,   something like

AC_DEFUN([HOTSPOT_IS_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " == " $1 " ]] ] ])

if HOTSPOT_IS_JVM_VARIANT(zero) ||  HOTSPOT_IS_JVM_VARIANT(minimal) ||  
HOTSPOT_IS_JVM_VARIANT(core); then

instead of

AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])

if HOTSPOT_CHECK_JVM_VARIANT(zero) ||  HOTSPOT_CHECK_JVM_VARIANT(minimal) ||  
HOTSPOT_CHECK_JVM_VARIANT(core); then


This should  remove the error in case of multi-JVM configs .
Or maybe  the whole check ( if HOTSPOT_CHECK_JVM_VARIANT(zero) ||  
HOTSPOT_CHECK_JVM_VARIANT(minimal) ||  HOTSPOT_CHECK_JVM_VARIANT(core); then 
 fi )
 might be removed , I see not so much value in it  because  in case one sets 
--enable-jvm-features   directly the check isn’t done .

I opened  bug :

https://bugs.openjdk.java.net/browse/JDK-8237374

JDK-8237374 :  configuring with --with-jvm-variants=minimal,server makes cds 
disappear in server


Best regards, Matthias




> 
> This does indeed look like a bug to me. At least at Oracle, we no longer
> build any multi JVM configs regularly, so things like this falls through
> the cracks.
> 
> /Erik
> 
> On 2020-01-16 02:18, Baesken, Matthias wrote:
> > Hello, I noticed the following  strange "feature" (or is it a bug?) .
> > When  building 2 VM variants in one build  and  using
> >
> >--with-jvm-variants=minimal,server
> >
> > For this, the build works nicely. But I notice that  in the server VM, cds  
> > is
> removed.
> > Instead of
> >
> > checking if cds should be enabled... yes
> >
> > I get ( with the following patch that adds tracing)  :
> >
> > configure: WARNING: ENABLE_CDS set to false because we found a
> minimal, core or zero JVM.
> > checking if cds should be enabled... no
> >...
> >
> > * JVM features:   minimal: 'compiler1 minimal serialgc'   server: 
> > 'compiler1
> compiler2 epsilongc g1gc jfr jni-check jvmti management nmt parallelgc
> serialgc services vm-structs'
> >
> > (patch is
> >
> > --- a/make/autoconf/hotspot.m4  Wed Jan 15 21:20:40 2020 -0800
> > +++ b/make/autoconf/hotspot.m4  Thu Jan 16 10:24:43 2020 +0100
> > @@ -528,6 +528,7 @@
> >if HOTSPOT_CHECK_JVM_VARIANT(zero) ||
> HOTSPOT_CHECK_JVM_VARIANT(minimal) ||
> HOTSPOT_CHECK_JVM_VARIANT(core); then
> >   # ..except when the user explicitely requested it with --enable-jvm-
> features
> >   if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
> > ENABLE_CDS="false"
> > +  AC_MSG_WARN([ENABLE_CDS set to false because we found a
> minimal, core or zero JVM.])
> > if test "x$enable_cds" = "xyes"; then
> >   AC_MSG_ERROR([CDS not implemented for variants zero, minimal,
> core. Remove --enable-cds.])
> > Fi
> >
> >
> > Is it expected that  cds goes away in "server"   when  configuring  "--with-
> jvm-variants=minimal,server"   ?   Looks like a bug to me,  should it be fixed
> (so that cds stays in the server   jvm-feature list) ?
> >
> >
> > Thanks, Matthias
> >


Re: configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-16 Thread Erik Joelsson
This does indeed look like a bug to me. At least at Oracle, we no longer 
build any multi JVM configs regularly, so things like this falls through 
the cracks.


/Erik

On 2020-01-16 02:18, Baesken, Matthias wrote:

Hello, I noticed the following  strange "feature" (or is it a bug?) .
When  building 2 VM variants in one build  and  using

   --with-jvm-variants=minimal,server

For this, the build works nicely. But I notice that  in the server VM, cds  is 
removed.
Instead of

checking if cds should be enabled... yes

I get ( with the following patch that adds tracing)  :

configure: WARNING: ENABLE_CDS set to false because we found a minimal, core or 
zero JVM.
checking if cds should be enabled... no
   ...

* JVM features:   minimal: 'compiler1 minimal serialgc'   server: 
'compiler1 compiler2 epsilongc g1gc jfr jni-check jvmti management nmt 
parallelgc serialgc services vm-structs'

(patch is

--- a/make/autoconf/hotspot.m4  Wed Jan 15 21:20:40 2020 -0800
+++ b/make/autoconf/hotspot.m4  Thu Jan 16 10:24:43 2020 +0100
@@ -528,6 +528,7 @@
   if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(minimal) || 
HOTSPOT_CHECK_JVM_VARIANT(core); then
  # ..except when the user explicitely requested it with 
--enable-jvm-features
  if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
ENABLE_CDS="false"
+  AC_MSG_WARN([ENABLE_CDS set to false because we found a minimal, core or 
zero JVM.])
if test "x$enable_cds" = "xyes"; then
  AC_MSG_ERROR([CDS not implemented for variants zero, minimal, core. 
Remove --enable-cds.])
Fi


Is it expected that  cds goes away in "server"   when  configuring  
"--with-jvm-variants=minimal,server"   ?   Looks like a bug to me,  should it be fixed   
(so that cds stays in the server   jvm-feature list) ?


Thanks, Matthias



configuring with --with-jvm-variants=minimal,server makes cds disappear in server

2020-01-16 Thread Baesken, Matthias
Hello, I noticed the following  strange "feature" (or is it a bug?) .
When  building 2 VM variants in one build  and  using

  --with-jvm-variants=minimal,server

For this, the build works nicely. But I notice that  in the server VM, cds  is 
removed.
Instead of

checking if cds should be enabled... yes

I get ( with the following patch that adds tracing)  :

configure: WARNING: ENABLE_CDS set to false because we found a minimal, core or 
zero JVM.
checking if cds should be enabled... no
  ...

* JVM features:   minimal: 'compiler1 minimal serialgc'   server: 
'compiler1 compiler2 epsilongc g1gc jfr jni-check jvmti management nmt 
parallelgc serialgc services vm-structs'

(patch is

--- a/make/autoconf/hotspot.m4  Wed Jan 15 21:20:40 2020 -0800
+++ b/make/autoconf/hotspot.m4  Thu Jan 16 10:24:43 2020 +0100
@@ -528,6 +528,7 @@
  if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(minimal) || 
HOTSPOT_CHECK_JVM_VARIANT(core); then
 # ..except when the user explicitely requested it with 
--enable-jvm-features
 if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
   ENABLE_CDS="false"
+  AC_MSG_WARN([ENABLE_CDS set to false because we found a minimal, core or 
zero JVM.])
   if test "x$enable_cds" = "xyes"; then
 AC_MSG_ERROR([CDS not implemented for variants zero, minimal, core. 
Remove --enable-cds.])
   Fi


Is it expected that  cds goes away in "server"   when  configuring  
"--with-jvm-variants=minimal,server"   ?   Looks like a bug to me,  should it 
be fixed   (so that cds stays in the server   jvm-feature list) ?


Thanks, Matthias