placeholders.hpp revision 1472
1472N/A * Copyright (c) 2003, 2007, 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 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. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// Placeholder objects. These represent classes currently 0N/A// being loaded, as well as arrays of primitives. 0N/A// This returns a symbolOop to match type for SystemDictionary 0N/A// caller to create a placeholder entry must enumerate an action 0N/A// caller claims ownership of that action 0N/A// For parallel classloading: 0N/A// multiple LOAD_INSTANCE threads can proceed in parallel 0N/A// multiple LOAD_SUPER threads can proceed in parallel 0N/A// LOAD_SUPER needed to check for class circularity 0N/A// DEFINE_CLASS: ultimately define class must be single threaded 0N/A// so the head of that queue owns the token 0N/A// and the rest of the threads return the result the first thread gets 0N/A // find_and_add returns probe pointer - old or new 0N/A // If no entry exists, add a placeholder entry and push SeenThread 0N/A // If entry exists, reuse entry and push SeenThread for classloadAction 0N/A// Remove placeholder information 0N/A// SeenThread objects represent list of threads that are 0N/A// currently performing a load action on a class. 0N/A// For class circularity, set before loading a superclass. 0N/A// For bootclasssearchpath, set before calling load_instance_class. 0N/A// For DEFINE_CLASS, the head of the queue owns the 0N/A// define token and the rest of the threads wait to return the 0N/A// result the first thread gets. 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// The system dictionary is the only user of this class. 0N/A // can be multiple threads if classloader object lock broken by application 0N/A // or if classloader supports parallel classloading 0N/A // including _definer 0N/A // _definer owns token 0N/A // queue waits for and returns results from _definer 0N/A // Simple accessors, used only by SystemDictionary 0N/A // Test for equality 0N/A// Class circularity support: links in thread before loading superclass 0N/A// bootstrapsearchpath support: links in a thread before load_instance_class 0N/A// definers: use as queue of define requestors, including owner of 0N/A// define token. Appends for debugging of requestor order 0N/A // returns true if seenthreadQ is now empty 0N/A // Note, caller must ensure probe still exists while holding 0N/A // SystemDictionary_lock 0N/A // ignores if cleanup has already been done 0N/A // if found, deletes SeenThread 0N/A // Applies "f->do_oop" to all root oops in the placeholder table. 0N/A // Print method doesn't append a cr