src/cpu/zero/vm/interpreterGenerator_zero.hpp

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

author
johnc
date
Thu, 07 Apr 2011 09:53:20 -0700
changeset 2781
e1162778c1c8
parent 2314
f95d63e2154a
child 3969
1d7922586cf6
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

never@1445 1 /*
johnc@2781 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
never@1445 3 * Copyright 2007 Red Hat, Inc.
never@1445 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
never@1445 5 *
never@1445 6 * This code is free software; you can redistribute it and/or modify it
never@1445 7 * under the terms of the GNU General Public License version 2 only, as
never@1445 8 * published by the Free Software Foundation.
never@1445 9 *
never@1445 10 * This code is distributed in the hope that it will be useful, but WITHOUT
never@1445 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
never@1445 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
never@1445 13 * version 2 for more details (a copy is included in the LICENSE file that
never@1445 14 * accompanied this code).
never@1445 15 *
never@1445 16 * You should have received a copy of the GNU General Public License version
never@1445 17 * 2 along with this work; if not, write to the Free Software Foundation,
never@1445 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
never@1445 19 *
trims@1907 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 21 * or visit www.oracle.com if you need additional information or have any
trims@1907 22 * questions.
never@1445 23 *
never@1445 24 */
never@1445 25
stefank@2314 26 #ifndef CPU_ZERO_VM_INTERPRETERGENERATOR_ZERO_HPP
stefank@2314 27 #define CPU_ZERO_VM_INTERPRETERGENERATOR_ZERO_HPP
stefank@2314 28
never@1445 29 // Generation of Interpreter
never@1445 30 //
never@1445 31 friend class AbstractInterpreterGenerator;
never@1445 32
never@1445 33 private:
never@1445 34 address generate_normal_entry(bool synchronized);
never@1445 35 address generate_native_entry(bool synchronized);
never@1445 36 address generate_abstract_entry();
never@1445 37 address generate_math_entry(AbstractInterpreter::MethodKind kind);
never@1445 38 address generate_empty_entry();
never@1445 39 address generate_accessor_entry();
johnc@2781 40 address generate_Reference_get_entry();
never@1445 41 address generate_method_handle_entry();
stefank@2314 42
stefank@2314 43 #endif // CPU_ZERO_VM_INTERPRETERGENERATOR_ZERO_HPP

mercurial