placeholders.cpp revision 0
0N/A * Copyright 2003-2007 Sun Microsystems, Inc. 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 0N/A * published by the Free Software Foundation. 0N/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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A#
include "incls/_precompiled.incl" 0N/A// Placeholder methods 0N/A// Placeholder objects represent classes currently being loaded. 0N/A// All threads examining the placeholder table must hold the 0N/A// SystemDictionary_lock, so we don't need special precautions 0N/A// on store ordering here. 0N/A // Both readers and writers are locked so it's safe to just 0N/A // create the placeholder and insert it in the list without a membar. 0N/A// Remove a placeholder object. 0N/A // find_and_add returns probe pointer - old or new 0N/A // If no entry exists, add a placeholder entry 0N/A // If entry exists, reuse entry 0N/A // For both, push SeenThread for classloadAction 0N/A // if havesupername: this is used for circularity for instanceklass loading 0N/A // Nothing found, add place holder 0N/A// placeholder used to track class loading internal states 0N/A// loadInstanceThreadQ tracks load_instance_class calls 0N/A// definer() tracks the single thread that owns define token 0N/A// defineThreadQ tracks waiters on defining thread's results 0N/A// 1st claimant creates placeholder 0N/A// find_and_add adds SeenThread entry for appropriate queue 0N/A// All claimants remove SeenThread after completing action 0N/A// On removal: if definer and all queues empty, remove entry 0N/A// Note: you can be in both placeholders and systemDictionary 0N/A// see parse_stream for redefine classes 0N/A// Therefore - must always check SD first 0N/A// Ignores the case where entry is not found 0N/A // No other threads using this entry 0N/A// do all entries in the placeholder table 0N/A// Note, doesn't append a cr 0N/A "checking type of _loader");
0N/A "checking type of instanceKlass result");
0N/A "Verify of system dictionary failed");