Wed, 28 Sep 2011 08:21:30 +0200
7005808: G1: re-enable ReduceInitialCardMarks for G1
Summary: Remove the extra guard to allow G1 to use ReduceInitialCardMarks
Reviewed-by: jmasa, tonyp, johnc, ysr
1 #
2 # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation.
8 #
9 # This code is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # version 2 for more details (a copy is included in the LICENSE file that
13 # accompanied this code).
14 #
15 # You should have received a copy of the GNU General Public License version
16 # 2 along with this work; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
23 #
25 #
26 # Makefile to run various jdk tests
27 #
29 # Get OS/ARCH specifics
30 OSNAME = $(shell uname -s)
31 ifeq ($(OSNAME), SunOS)
32 PLATFORM = solaris
33 SLASH_JAVA = /java
34 ARCH = $(shell uname -p)
35 ifeq ($(ARCH), i386)
36 ARCH=i586
37 endif
38 endif
39 ifeq ($(OSNAME), Linux)
40 PLATFORM = linux
41 SLASH_JAVA = /java
42 ARCH = $(shell uname -m)
43 ifeq ($(ARCH), i386)
44 ARCH = i586
45 endif
46 endif
47 ifeq ($(OSNAME), Darwin)
48 PLATFORM = bsd
49 SLASH_JAVA = /java
50 ARCH = $(shell uname -m)
51 ifeq ($(ARCH), i386)
52 ARCH = i586
53 endif
54 endif
55 ifeq ($(findstring BSD,$(OSNAME)), BSD)
56 PLATFORM = bsd
57 SLASH_JAVA = /java
58 ARCH = $(shell uname -m)
59 ifeq ($(ARCH), i386)
60 ARCH = i586
61 endif
62 endif
63 ifeq ($(OSNAME), Windows_NT)
64 PLATFORM = windows
65 SLASH_JAVA = J:
66 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
67 ARCH = ia64
68 else
69 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
70 ARCH = x64
71 else
72 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
73 ARCH = x64
74 else
75 ARCH = i586
76 endif
77 endif
78 endif
79 EXESUFFIX = .exe
80 endif
82 ifdef ALT_SLASH_JAVA
83 SLASH_JAVA = $(ALT_SLASH_JAVA)
84 endif
86 # Utilities used
87 CD = cd
88 CP = cp
89 ECHO = echo
90 MKDIR = mkdir
91 ZIP = zip
93 # Root of this test area (important to use full paths in some places)
94 TEST_ROOT := $(shell pwd)
96 # Root of all test results
97 ifdef ALT_OUTPUTDIR
98 ABS_BUILD_ROOT = $(ALT_OUTPUTDIR)/$(PLATFORM)-$(ARCH)
99 else
100 ABS_BUILD_ROOT = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)
101 endif
102 ABS_TEST_OUTPUT_DIR = $(ABS_BUILD_ROOT)/testoutput
104 # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
105 ifndef PRODUCT_HOME
106 # Try to use j2sdk-image if it exists
107 ABS_JDK_IMAGE = $(ABS_BUILD_ROOT)/j2sdk-image
108 PRODUCT_HOME := \
109 $(shell \
110 if [ -d $(ABS_JDK_IMAGE) ] ; then \
111 $(ECHO) "$(ABS_JDK_IMAGE)"; \
112 else \
113 $(ECHO) "$(ABS_BUILD_ROOT)" ; \
114 fi)
115 endif
117 # Expect JPRT to set JAVA_ARGS (e.g. -server etc.)
118 JAVA_OPTIONS =
119 ifdef JAVA_ARGS
120 JAVA_OPTIONS = $(JAVA_ARGS)
121 endif
123 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
124 ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
125 ifdef JPRT_ARCHIVE_BUNDLE
126 ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
127 endif
129 # How to create the test bundle (pass or fail, we want to create this)
130 BUNDLE_UP = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)` \
131 && $(CD) $(ABS_TEST_OUTPUT_DIR) \
132 && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
133 BUNDLE_UP_FAILED = ( exitCode=$$? && $(BUNDLE_UP) && exit $${exitCode} )
135 ################################################################
137 # Default make rule (runs jtreg_tests)
138 all: jtreg_tests
139 @$(ECHO) "Testing completed successfully"
141 # Prep for output
142 prep: clean
143 @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
144 @$(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`
146 # Cleanup
147 clean:
148 $(RM) -r $(ABS_TEST_OUTPUT_DIR)
149 $(RM) $(ARCHIVE_BUNDLE)
151 ################################################################
153 # jtreg tests
155 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
156 JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
157 ifdef JPRT_JTREG_HOME
158 JT_HOME = $(JPRT_JTREG_HOME)
159 endif
161 # Expect JPRT to set TESTDIRS to the jtreg test dirs
162 JTREG_TESTDIRS = demo/jvmti/gctest demo/jvmti/hprof
163 ifdef TESTDIRS
164 JTREG_TESTDIRS = $(TESTDIRS)
165 endif
167 # Default JTREG to run (win32 script works for everybody)
168 JTREG = $(JT_HOME)/win32/bin/jtreg
170 # Option to tell jtreg to not run tests marked with "ignore"
171 ifeq ($(PLATFORM), windows)
172 JTREG_KEY_OPTION = -k:!ignore
173 else
174 JTREG_KEY_OPTION = -k:\!ignore
175 endif
177 #EXTRA_JTREG_OPTIONS =
179 jtreg_tests: prep $(JT_HOME) $(PRODUCT_HOME) $(JTREG)
180 $(JTREG) -a -v:fail,error \
181 $(JTREG_KEY_OPTION) \
182 $(EXTRA_JTREG_OPTIONS) \
183 -r:$(ABS_TEST_OUTPUT_DIR)/JTreport \
184 -w:$(ABS_TEST_OUTPUT_DIR)/JTwork \
185 -jdk:$(PRODUCT_HOME) \
186 $(JAVA_OPTIONS:%=-vmoption:%) \
187 $(JTREG_TESTDIRS) \
188 || $(BUNDLE_UP_FAILED)
189 $(BUNDLE_UP)
191 PHONY_LIST += jtreg_tests
193 ################################################################
195 # clienttest (make sure various basic java client options work)
197 clienttest: prep $(PRODUCT_HOME)
198 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
199 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
200 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
201 $(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes.jsa
202 $(RM) $(PRODUCT_HOME)/jre/lib/*/client/classes_g.jsa
203 $(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa
204 $(RM) $(PRODUCT_HOME)/jre/bin/client/classes_g.jsa
205 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dump
207 PHONY_LIST += clienttest
209 ################################################################
211 # servertest (make sure various basic java server options work)
213 servertest: prep $(PRODUCT_HOME)
214 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
215 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
216 $(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
218 PHONY_LIST += servertest
220 ################################################################
222 # packtest
224 # Expect JPRT to set JPRT_PACKTEST_HOME.
225 PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
226 ifdef JPRT_PACKTEST_HOME
227 PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
228 endif
230 #EXTRA_PACKTEST_OPTIONS =
232 packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
233 ( $(CD) $(PACKTEST_HOME) && \
234 $(PACKTEST_HOME)/ptest \
235 -t "$(PRODUCT_HOME)" \
236 $(PACKTEST_STRESS_OPTION) \
237 $(EXTRA_PACKTEST_OPTIONS) \
238 -W $(ABS_TEST_OUTPUT_DIR) \
239 $(JAVA_OPTIONS:%=-J %) \
240 ) || $(BUNDLE_UP_FAILED)
241 $(BUNDLE_UP)
243 packtest_stress: PACKTEST_STRESS_OPTION=-s
244 packtest_stress: packtest
246 PHONY_LIST += packtest packtest_stress
248 ################################################################
250 # Phony targets (e.g. these are not filenames)
251 .PHONY: all clean prep $(PHONY_LIST)
253 ################################################################