United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7022200 G1: optimized build broken
JDK-7022200 : G1: optimized build broken

Details
Type:
Bug
Submit Date:
2011-02-24
Status:
Closed
Updated Date:
2011-04-24
Project Name:
JDK
Resolved Date:
2011-04-24
Component:
hotspot
OS:
solaris_10
Sub-Component:
gc
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs21 (b04)

Related Reports
Backport:

Sub Tasks

Description
I don't know how long this has been the case but g1CollectedHeap.hpp breaks the optimized build because the declaration of is_in_closed_subset is NOT_PRODUCT but the definition is DEBUG only and is_in_closed_subset is a virtual.  Is this a known issue?  By the way, it seems broken for a product virtual method to have non-product overrides.  Shouldn't it be defined in product too?

gmake[4]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized'
gmake[4]: Entering directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized'
echo Linking launcher...
Linking launcher...
gcc -m64 -Xlinker -O1 -Wl,--hash-style=both  -m64 -export-dynamic  -L `pwd` -o gamma launcher/java_md.o launcher/java.o launcher/jli_util.o launcher/wildcard.o -ljvm -lm -ldl -lpthread
/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized/libjvm.so: undefined reference to `G1CollectedHeap::is_in_closed_subset(void const*) const'
collect2: ld returned 1 exit status
gmake[4]: *** [gamma] Error 1
gmake[4]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized'
gmake[3]: *** [the_vm] Error 2
gmake[3]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized'
gmake[2]: *** [optimized] Error 2
gmake[2]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux'
gmake[1]: *** [generic_build2] Error 2
gmake[1]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/make'
gmake: *** [optimized] Error 2

                                    

Comments
SUGGESTED FIX

Make the G1 specific version of is_in_closed_subset() available in _all_ builds.
                                     
2011-02-28
EVALUATION

Some change inadvertently placed the override definition of G1CollectedHeap::is_in_closed_subset() inside #ifdef ASSERT....#endif making it unavailable in optimized builds (in which ASSERT is _not_ defined).
                                     
2011-02-28
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/4e0069ff33df
                                     
2011-03-01
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/4e0069ff33df
                                     
2011-03-04



Hardware and Software, Engineered to Work Together