3057N/A * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. 2362N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2607N/A//============================================================================= 0N/A//-----------------------------hash-------------------------------------------- 0N/A return NO_HASH;
// Each locked region has own BoxLock node 0N/A//------------------------------cmp-------------------------------------------- 0N/A return (&n ==
this);
// Always fail except on self 0N/A // Chase down the BoxNode after RA which may spill box nodes. 0N/A // if (box_node->is_SpillCopy()) { 0N/A // Node *m = box_node->in(1); 0N/A // if (m->is_Mach() && m->as_Mach()->ideal_Opcode() == Op_StoreP) { 0N/A // box_node = m->in(m->as_Mach()->operand_index(2)); 2607N/A // Only BoxLock nodes with the same stack slot are merged. 0N/A // So it is enough to trace one path to find the slot value. 0N/A// Is BoxLock node used for one simple lock region (same box and obj)? 0N/A // Check lock's box since box could be referenced by Lock's debug info. 0N/A return false;
// Different objects 0N/A // Verify that FastLock and Safepoint reference only this lock region. 0N/A // Don't check monitor info in safepoints since the referenced object could 0N/A // be different from the locked object. It could be Phi node of different 0N/A // cast nodes which point to this locked object. 2607N/A // We assume that no other objects could be referenced in monitor info 0N/A // associated with this BoxLock node because all associated locks and 0N/A // unlocks are reference only this one object. 0N/A//============================================================================= 2607N/A//-----------------------------hash-------------------------------------------- 0N/A//------------------------------cmp-------------------------------------------- 0N/A return (&n ==
this);
// Always fail except on self 2607N/A//============================================================================= 2607N/A//-----------------------------hash-------------------------------------------- 0N/A//------------------------------cmp-------------------------------------------- 0N/A return (&n ==
this);
// Always fail except on self 0N/A// Create a counter which counts the number of times this lock is acquired 0N/A//============================================================================= 0N/A//------------------------------do_monitor_enter------------------------------- 0N/A // Null check; get casted pointer. 0N/A // Check for locking null object 0N/A // the monitor object is not part of debug info expression stack 3057N/A // Insert a FastLockNode which takes as arguments the current thread pointer, 3057N/A // the obj pointer & the address of the stack slot pair used for the lock. 3057N/A//------------------------------do_monitor_exit-------------------------------- 3057N/A // Because monitors are guaranteed paired (else we bail out), we know 3057N/A // the matching Lock for this Unlock. Hence we know there is no need 3057N/A // for a null check on Unlock.