src/share/vm/precompiled.hpp

Thu, 07 Apr 2011 09:53:20 -0700

author
johnc
date
Thu, 07 Apr 2011 09:53:20 -0700
changeset 2781
e1162778c1c8
parent 2497
3582bf76420e
child 2708
1d1603768966
permissions
-rw-r--r--

7009266: G1: assert(obj->is_oop_or_null(true )) failed: Error
Summary: A referent object that is only weakly reachable at the start of concurrent marking but is re-attached to the strongly reachable object graph during marking may not be marked as live. This can cause the reference object to be processed prematurely and leave dangling pointers to the referent object. Implement a read barrier for the java.lang.ref.Reference::referent field by intrinsifying the Reference.get() method, and intercepting accesses though JNI, reflection, and Unsafe, so that when a non-null referent object is read it is also logged in an SATB buffer.
Reviewed-by: kvn, iveresov, never, tonyp, dholmes

stefank@2314 1 /*
stefank@2314 2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
stefank@2314 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
stefank@2314 4 *
stefank@2314 5 * This code is free software; you can redistribute it and/or modify it
stefank@2314 6 * under the terms of the GNU General Public License version 2 only, as
stefank@2314 7 * published by the Free Software Foundation.
stefank@2314 8 *
stefank@2314 9 * This code is distributed in the hope that it will be useful, but WITHOUT
stefank@2314 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
stefank@2314 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
stefank@2314 12 * version 2 for more details (a copy is included in the LICENSE file that
stefank@2314 13 * accompanied this code).
stefank@2314 14 *
stefank@2314 15 * You should have received a copy of the GNU General Public License version
stefank@2314 16 * 2 along with this work; if not, write to the Free Software Foundation,
stefank@2314 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
stefank@2314 18 *
stefank@2314 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
stefank@2314 20 * or visit www.oracle.com if you need additional information or have any
stefank@2314 21 * questions.
stefank@2314 22 *
stefank@2314 23 */
stefank@2314 24
stefank@2325 25 // Precompiled headers are turned off for Sun Studion,
stefank@2325 26 // or if the user passes USE_PRECOMPILED_HEADER=0 to the makefiles.
stefank@2325 27 #ifndef DONT_USE_PRECOMPILED_HEADER
stefank@2325 28
stefank@2314 29 # include "asm/assembler.hpp"
stefank@2314 30 # include "asm/assembler.inline.hpp"
stefank@2314 31 # include "asm/codeBuffer.hpp"
stefank@2314 32 # include "asm/register.hpp"
stefank@2314 33 # include "ci/ciArray.hpp"
stefank@2314 34 # include "ci/ciArrayKlass.hpp"
stefank@2314 35 # include "ci/ciClassList.hpp"
stefank@2314 36 # include "ci/ciConstant.hpp"
stefank@2314 37 # include "ci/ciConstantPoolCache.hpp"
stefank@2314 38 # include "ci/ciEnv.hpp"
stefank@2314 39 # include "ci/ciExceptionHandler.hpp"
stefank@2314 40 # include "ci/ciField.hpp"
stefank@2314 41 # include "ci/ciFlags.hpp"
stefank@2314 42 # include "ci/ciInstance.hpp"
stefank@2314 43 # include "ci/ciInstanceKlass.hpp"
stefank@2314 44 # include "ci/ciInstanceKlassKlass.hpp"
stefank@2314 45 # include "ci/ciKlass.hpp"
stefank@2314 46 # include "ci/ciKlassKlass.hpp"
stefank@2314 47 # include "ci/ciMethod.hpp"
stefank@2314 48 # include "ci/ciNullObject.hpp"
stefank@2314 49 # include "ci/ciObjArrayKlass.hpp"
stefank@2314 50 # include "ci/ciObject.hpp"
stefank@2314 51 # include "ci/ciObjectFactory.hpp"
stefank@2314 52 # include "ci/ciSignature.hpp"
stefank@2314 53 # include "ci/ciStreams.hpp"
stefank@2314 54 # include "ci/ciSymbol.hpp"
stefank@2314 55 # include "ci/ciType.hpp"
stefank@2314 56 # include "ci/ciTypeArrayKlass.hpp"
stefank@2314 57 # include "ci/ciUtilities.hpp"
stefank@2314 58 # include "ci/compilerInterface.hpp"
stefank@2314 59 # include "classfile/classFileParser.hpp"
stefank@2314 60 # include "classfile/classFileStream.hpp"
stefank@2314 61 # include "classfile/classLoader.hpp"
stefank@2314 62 # include "classfile/javaClasses.hpp"
stefank@2314 63 # include "classfile/symbolTable.hpp"
stefank@2314 64 # include "classfile/systemDictionary.hpp"
stefank@2314 65 # include "classfile/vmSymbols.hpp"
stefank@2314 66 # include "code/codeBlob.hpp"
stefank@2314 67 # include "code/codeCache.hpp"
stefank@2314 68 # include "code/compressedStream.hpp"
stefank@2314 69 # include "code/debugInfo.hpp"
stefank@2314 70 # include "code/debugInfoRec.hpp"
stefank@2314 71 # include "code/dependencies.hpp"
stefank@2314 72 # include "code/exceptionHandlerTable.hpp"
stefank@2314 73 # include "code/jvmticmlr.h"
stefank@2314 74 # include "code/location.hpp"
stefank@2314 75 # include "code/nmethod.hpp"
stefank@2314 76 # include "code/oopRecorder.hpp"
stefank@2314 77 # include "code/pcDesc.hpp"
stefank@2314 78 # include "code/relocInfo.hpp"
stefank@2314 79 # include "code/stubs.hpp"
stefank@2314 80 # include "code/vmreg.hpp"
stefank@2314 81 # include "compiler/disassembler.hpp"
stefank@2314 82 # include "compiler/methodLiveness.hpp"
stefank@2314 83 # include "compiler/oopMap.hpp"
stefank@2314 84 # include "gc_implementation/shared/adaptiveSizePolicy.hpp"
stefank@2314 85 # include "gc_implementation/shared/ageTable.hpp"
stefank@2314 86 # include "gc_implementation/shared/allocationStats.hpp"
stefank@2314 87 # include "gc_implementation/shared/cSpaceCounters.hpp"
stefank@2314 88 # include "gc_implementation/shared/collectorCounters.hpp"
stefank@2314 89 # include "gc_implementation/shared/gSpaceCounters.hpp"
stefank@2314 90 # include "gc_implementation/shared/gcStats.hpp"
stefank@2314 91 # include "gc_implementation/shared/gcUtil.hpp"
stefank@2314 92 # include "gc_implementation/shared/generationCounters.hpp"
stefank@2314 93 # include "gc_implementation/shared/immutableSpace.hpp"
stefank@2314 94 # include "gc_implementation/shared/markSweep.hpp"
stefank@2314 95 # include "gc_implementation/shared/markSweep.inline.hpp"
stefank@2314 96 # include "gc_implementation/shared/mutableSpace.hpp"
stefank@2314 97 # include "gc_implementation/shared/spaceCounters.hpp"
stefank@2314 98 # include "gc_implementation/shared/spaceDecorator.hpp"
stefank@2314 99 # include "gc_interface/collectedHeap.hpp"
stefank@2314 100 # include "gc_interface/collectedHeap.inline.hpp"
stefank@2314 101 # include "gc_interface/gcCause.hpp"
stefank@2314 102 # include "interpreter/abstractInterpreter.hpp"
stefank@2314 103 # include "interpreter/bytecode.hpp"
stefank@2314 104 # include "interpreter/bytecodeHistogram.hpp"
stefank@2314 105 # include "interpreter/bytecodeInterpreter.hpp"
stefank@2314 106 # include "interpreter/bytecodeInterpreter.inline.hpp"
stefank@2314 107 # include "interpreter/bytecodeTracer.hpp"
stefank@2314 108 # include "interpreter/bytecodes.hpp"
stefank@2314 109 # include "interpreter/cppInterpreter.hpp"
stefank@2314 110 # include "interpreter/interpreter.hpp"
stefank@2314 111 # include "interpreter/invocationCounter.hpp"
stefank@2314 112 # include "interpreter/linkResolver.hpp"
stefank@2314 113 # include "interpreter/templateInterpreter.hpp"
stefank@2314 114 # include "interpreter/templateTable.hpp"
stefank@2314 115 # include "jvmtifiles/jvmti.h"
stefank@2314 116 # include "memory/allocation.hpp"
stefank@2314 117 # include "memory/allocation.inline.hpp"
stefank@2314 118 # include "memory/barrierSet.hpp"
stefank@2314 119 # include "memory/barrierSet.inline.hpp"
stefank@2314 120 # include "memory/blockOffsetTable.hpp"
stefank@2314 121 # include "memory/blockOffsetTable.inline.hpp"
stefank@2314 122 # include "memory/cardTableModRefBS.hpp"
stefank@2314 123 # include "memory/collectorPolicy.hpp"
stefank@2314 124 # include "memory/compactingPermGenGen.hpp"
stefank@2314 125 # include "memory/defNewGeneration.hpp"
stefank@2314 126 # include "memory/gcLocker.hpp"
stefank@2314 127 # include "memory/genCollectedHeap.hpp"
stefank@2314 128 # include "memory/genOopClosures.hpp"
stefank@2314 129 # include "memory/genRemSet.hpp"
stefank@2314 130 # include "memory/generation.hpp"
stefank@2314 131 # include "memory/generation.inline.hpp"
stefank@2314 132 # include "memory/heap.hpp"
stefank@2314 133 # include "memory/iterator.hpp"
stefank@2314 134 # include "memory/memRegion.hpp"
stefank@2314 135 # include "memory/modRefBarrierSet.hpp"
stefank@2314 136 # include "memory/oopFactory.hpp"
stefank@2314 137 # include "memory/permGen.hpp"
stefank@2314 138 # include "memory/referencePolicy.hpp"
stefank@2314 139 # include "memory/referenceProcessor.hpp"
stefank@2314 140 # include "memory/resourceArea.hpp"
stefank@2314 141 # include "memory/sharedHeap.hpp"
stefank@2314 142 # include "memory/space.hpp"
stefank@2314 143 # include "memory/space.inline.hpp"
stefank@2314 144 # include "memory/specialized_oop_closures.hpp"
stefank@2314 145 # include "memory/threadLocalAllocBuffer.hpp"
stefank@2314 146 # include "memory/threadLocalAllocBuffer.inline.hpp"
stefank@2314 147 # include "memory/universe.hpp"
stefank@2314 148 # include "memory/universe.inline.hpp"
stefank@2314 149 # include "memory/watermark.hpp"
stefank@2314 150 # include "oops/arrayKlass.hpp"
stefank@2314 151 # include "oops/arrayOop.hpp"
stefank@2314 152 # include "oops/constMethodOop.hpp"
stefank@2314 153 # include "oops/constantPoolOop.hpp"
stefank@2314 154 # include "oops/cpCacheOop.hpp"
stefank@2314 155 # include "oops/instanceKlass.hpp"
stefank@2314 156 # include "oops/instanceOop.hpp"
stefank@2314 157 # include "oops/instanceRefKlass.hpp"
stefank@2314 158 # include "oops/klass.hpp"
stefank@2314 159 # include "oops/klassOop.hpp"
stefank@2314 160 # include "oops/klassPS.hpp"
stefank@2314 161 # include "oops/klassVtable.hpp"
stefank@2314 162 # include "oops/markOop.hpp"
stefank@2314 163 # include "oops/markOop.inline.hpp"
stefank@2314 164 # include "oops/methodDataOop.hpp"
stefank@2314 165 # include "oops/methodOop.hpp"
stefank@2314 166 # include "oops/objArrayKlass.hpp"
stefank@2314 167 # include "oops/objArrayOop.hpp"
stefank@2314 168 # include "oops/oop.hpp"
stefank@2314 169 # include "oops/oop.inline.hpp"
stefank@2314 170 # include "oops/oop.inline2.hpp"
stefank@2314 171 # include "oops/oopsHierarchy.hpp"
coleenp@2497 172 # include "oops/symbol.hpp"
stefank@2314 173 # include "oops/typeArrayKlass.hpp"
stefank@2314 174 # include "oops/typeArrayOop.hpp"
stefank@2314 175 # include "prims/jni.h"
stefank@2314 176 # include "prims/jvm.h"
stefank@2314 177 # include "prims/jvmtiExport.hpp"
stefank@2314 178 # include "prims/methodHandles.hpp"
stefank@2314 179 # include "runtime/arguments.hpp"
stefank@2314 180 # include "runtime/atomic.hpp"
stefank@2314 181 # include "runtime/deoptimization.hpp"
stefank@2314 182 # include "runtime/extendedPC.hpp"
stefank@2314 183 # include "runtime/fieldDescriptor.hpp"
stefank@2314 184 # include "runtime/fieldType.hpp"
stefank@2314 185 # include "runtime/frame.hpp"
stefank@2314 186 # include "runtime/frame.inline.hpp"
stefank@2314 187 # include "runtime/globals.hpp"
stefank@2314 188 # include "runtime/globals_extension.hpp"
stefank@2314 189 # include "runtime/handles.hpp"
stefank@2314 190 # include "runtime/handles.inline.hpp"
stefank@2314 191 # include "runtime/icache.hpp"
stefank@2314 192 # include "runtime/init.hpp"
stefank@2314 193 # include "runtime/interfaceSupport.hpp"
stefank@2314 194 # include "runtime/java.hpp"
stefank@2314 195 # include "runtime/javaCalls.hpp"
stefank@2314 196 # include "runtime/javaFrameAnchor.hpp"
stefank@2314 197 # include "runtime/jniHandles.hpp"
stefank@2314 198 # include "runtime/monitorChunk.hpp"
stefank@2314 199 # include "runtime/mutex.hpp"
stefank@2314 200 # include "runtime/mutexLocker.hpp"
stefank@2314 201 # include "runtime/objectMonitor.hpp"
stefank@2314 202 # include "runtime/orderAccess.hpp"
stefank@2314 203 # include "runtime/os.hpp"
stefank@2314 204 # include "runtime/osThread.hpp"
stefank@2314 205 # include "runtime/perfData.hpp"
stefank@2314 206 # include "runtime/perfMemory.hpp"
stefank@2314 207 # include "runtime/prefetch.hpp"
stefank@2314 208 # include "runtime/reflection.hpp"
stefank@2314 209 # include "runtime/reflectionCompat.hpp"
stefank@2314 210 # include "runtime/reflectionUtils.hpp"
stefank@2314 211 # include "runtime/registerMap.hpp"
stefank@2314 212 # include "runtime/safepoint.hpp"
stefank@2314 213 # include "runtime/sharedRuntime.hpp"
stefank@2314 214 # include "runtime/signature.hpp"
stefank@2314 215 # include "runtime/stackValue.hpp"
stefank@2314 216 # include "runtime/stackValueCollection.hpp"
stefank@2314 217 # include "runtime/stubCodeGenerator.hpp"
stefank@2314 218 # include "runtime/stubRoutines.hpp"
stefank@2314 219 # include "runtime/synchronizer.hpp"
stefank@2314 220 # include "runtime/thread.hpp"
stefank@2314 221 # include "runtime/threadLocalStorage.hpp"
stefank@2314 222 # include "runtime/timer.hpp"
stefank@2314 223 # include "runtime/unhandledOops.hpp"
stefank@2314 224 # include "runtime/vframe.hpp"
stefank@2314 225 # include "runtime/virtualspace.hpp"
stefank@2314 226 # include "runtime/vmThread.hpp"
stefank@2314 227 # include "runtime/vm_operations.hpp"
stefank@2314 228 # include "runtime/vm_version.hpp"
stefank@2314 229 # include "services/lowMemoryDetector.hpp"
stefank@2314 230 # include "services/memoryPool.hpp"
stefank@2314 231 # include "services/memoryService.hpp"
stefank@2314 232 # include "services/memoryUsage.hpp"
stefank@2314 233 # include "utilities/accessFlags.hpp"
stefank@2314 234 # include "utilities/array.hpp"
stefank@2314 235 # include "utilities/bitMap.hpp"
stefank@2314 236 # include "utilities/bitMap.inline.hpp"
stefank@2314 237 # include "utilities/constantTag.hpp"
stefank@2314 238 # include "utilities/copy.hpp"
stefank@2314 239 # include "utilities/debug.hpp"
stefank@2314 240 # include "utilities/exceptions.hpp"
stefank@2314 241 # include "utilities/globalDefinitions.hpp"
stefank@2314 242 # include "utilities/growableArray.hpp"
stefank@2314 243 # include "utilities/hashtable.hpp"
stefank@2314 244 # include "utilities/histogram.hpp"
stefank@2314 245 # include "utilities/macros.hpp"
stefank@2314 246 # include "utilities/numberSeq.hpp"
stefank@2314 247 # include "utilities/ostream.hpp"
stefank@2314 248 # include "utilities/preserveException.hpp"
stefank@2314 249 # include "utilities/sizes.hpp"
stefank@2314 250 # include "utilities/taskqueue.hpp"
stefank@2314 251 # include "utilities/top.hpp"
stefank@2314 252 # include "utilities/utf8.hpp"
stefank@2314 253 # include "utilities/workgroup.hpp"
stefank@2314 254 # include "utilities/yieldingWorkgroup.hpp"
stefank@2314 255 #ifdef COMPILER2
stefank@2314 256 # include "libadt/dict.hpp"
stefank@2314 257 # include "libadt/port.hpp"
stefank@2314 258 # include "libadt/set.hpp"
stefank@2314 259 # include "libadt/vectset.hpp"
stefank@2314 260 # include "opto/addnode.hpp"
stefank@2314 261 # include "opto/adlcVMDeps.hpp"
stefank@2314 262 # include "opto/block.hpp"
stefank@2314 263 # include "opto/c2_globals.hpp"
stefank@2314 264 # include "opto/callnode.hpp"
stefank@2314 265 # include "opto/cfgnode.hpp"
stefank@2314 266 # include "opto/compile.hpp"
stefank@2314 267 # include "opto/connode.hpp"
stefank@2314 268 # include "opto/idealGraphPrinter.hpp"
stefank@2314 269 # include "opto/loopnode.hpp"
stefank@2314 270 # include "opto/machnode.hpp"
stefank@2314 271 # include "opto/matcher.hpp"
stefank@2314 272 # include "opto/memnode.hpp"
stefank@2314 273 # include "opto/mulnode.hpp"
stefank@2314 274 # include "opto/multnode.hpp"
stefank@2314 275 # include "opto/node.hpp"
stefank@2314 276 # include "opto/opcodes.hpp"
stefank@2314 277 # include "opto/optoreg.hpp"
stefank@2314 278 # include "opto/phase.hpp"
stefank@2314 279 # include "opto/phaseX.hpp"
stefank@2314 280 # include "opto/regalloc.hpp"
stefank@2314 281 # include "opto/regmask.hpp"
stefank@2314 282 # include "opto/runtime.hpp"
stefank@2314 283 # include "opto/subnode.hpp"
stefank@2314 284 # include "opto/type.hpp"
stefank@2314 285 # include "opto/vectornode.hpp"
stefank@2314 286 #endif // COMPILER2
stefank@2314 287 #ifdef COMPILER1
stefank@2314 288 # include "c1/c1_Compilation.hpp"
stefank@2314 289 # include "c1/c1_Defs.hpp"
stefank@2314 290 # include "c1/c1_FrameMap.hpp"
stefank@2314 291 # include "c1/c1_LIR.hpp"
stefank@2314 292 # include "c1/c1_MacroAssembler.hpp"
stefank@2314 293 # include "c1/c1_ValueType.hpp"
stefank@2314 294 # include "c1/c1_globals.hpp"
stefank@2314 295 #endif // COMPILER1
stefank@2314 296 #ifndef SERIALGC
stefank@2314 297 # include "gc_implementation/concurrentMarkSweep/binaryTreeDictionary.hpp"
stefank@2314 298 # include "gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp"
stefank@2314 299 # include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
stefank@2314 300 # include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
stefank@2314 301 # include "gc_implementation/concurrentMarkSweep/freeBlockDictionary.hpp"
stefank@2314 302 # include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
stefank@2314 303 # include "gc_implementation/concurrentMarkSweep/freeList.hpp"
stefank@2314 304 # include "gc_implementation/concurrentMarkSweep/promotionInfo.hpp"
stefank@2314 305 # include "gc_implementation/g1/dirtyCardQueue.hpp"
stefank@2314 306 # include "gc_implementation/g1/g1BlockOffsetTable.hpp"
stefank@2314 307 # include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp"
stefank@2314 308 # include "gc_implementation/g1/g1OopClosures.hpp"
stefank@2314 309 # include "gc_implementation/g1/g1_globals.hpp"
stefank@2314 310 # include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
stefank@2314 311 # include "gc_implementation/g1/ptrQueue.hpp"
stefank@2314 312 # include "gc_implementation/g1/satbQueue.hpp"
stefank@2314 313 # include "gc_implementation/parNew/parGCAllocBuffer.hpp"
stefank@2314 314 # include "gc_implementation/parNew/parOopClosures.hpp"
stefank@2314 315 # include "gc_implementation/parallelScavenge/objectStartArray.hpp"
stefank@2314 316 # include "gc_implementation/parallelScavenge/parMarkBitMap.hpp"
stefank@2314 317 # include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
stefank@2314 318 # include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp"
stefank@2314 319 # include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
stefank@2314 320 # include "gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp"
stefank@2314 321 # include "gc_implementation/parallelScavenge/psGenerationCounters.hpp"
stefank@2314 322 # include "gc_implementation/parallelScavenge/psOldGen.hpp"
stefank@2314 323 # include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
stefank@2314 324 # include "gc_implementation/parallelScavenge/psPermGen.hpp"
stefank@2314 325 # include "gc_implementation/parallelScavenge/psVirtualspace.hpp"
stefank@2314 326 # include "gc_implementation/parallelScavenge/psYoungGen.hpp"
stefank@2314 327 # include "gc_implementation/shared/gcAdaptivePolicyCounters.hpp"
stefank@2314 328 # include "gc_implementation/shared/gcPolicyCounters.hpp"
stefank@2314 329 #endif // SERIALGC
stefank@2325 330
stefank@2325 331 #endif // !DONT_USE_PRECOMPILED_HEADER

mercurial