test/Makefile

Mon, 02 Aug 2010 12:51:43 -0700

author
johnc
date
Mon, 02 Aug 2010 12:51:43 -0700
changeset 2060
2d160770d2e5
parent 1907
c18cbe5936b8
child 2256
7aff5786cc02
permissions
-rw-r--r--

6814437: G1: remove the _new_refs array
Summary: The per-worker _new_refs array is used to hold references that point into the collection set. It is populated during RSet updating and subsequently processed. In the event of an evacuation failure it processed again to recreate the RSets of regions in the collection set. Remove the per-worker _new_refs array by processing the references directly. Use a DirtyCardQueue to hold the cards containing the references so that the RSets of regions in the collection set can be recreated when handling an evacuation failure.
Reviewed-by: iveresov, jmasa, tonyp

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

mercurial