classLoadingService.cpp revision 1147
325N/A * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 325N/A * CA 95054 USA or visit www.sun.com if you need additional information or 325N/A#
include "incls/_precompiled.incl" 325N/A// Only bother with this argument setup if dtrace is available 325N/A#
else // ndef DTRACE_ENABLED 325N/A// counters for classes loaded from class files 325N/A// counters for classes loaded from shared archive 325N/A // These counters are for java.lang.management API support. 325N/A // They are created even if -XX:-UsePerfData is set and in 325N/A // that case, they will be allocated on C heap. 325N/A // Classes that can be unloaded must be non-shared 325N/A // Compute method size & subtract from running total. 325N/A // We are called during phase 1 of mark sweep, so it's 325N/A // still ok to iterate through methodOops here. 325N/A // lifted from ClassStatistics.do_class(klassOop k) 325N/A // We do not have to count implementors, since we only store one! 325N/A // verbose will be set to the previous value 325N/A// Caller to this function must own Management_lock 325N/A // For consistency of the loaded classes, grab the SystemDictionary lock 325N/A // Set _loaded_classes and _current_thread and begin enumerating all classes. 325N/A // Only one thread will do the enumeration at a time. 325N/A // These static variables are needed and they are used by the static method 325N/A // add_loaded_class called from classes_do(). 325N/A // FIXME: Exclude array klasses for now 325N/A // Universe::basic_type_classes_do(&add_loaded_class);