/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
#include "memory/allocation.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "services/classLoadingService.hpp"
#include "services/memoryService.hpp"
#include "utilities/dtrace.hpp"
#ifdef DTRACE_ENABLED
// Only bother with this argument setup if dtrace is available
#ifndef USDT2
{ \
int len = 0; \
} \
}
#else /* USDT2 */
{ \
int len = 0; \
} \
}
#endif /* USDT2 */
#else // ndef DTRACE_ENABLED
#endif
// counters for classes loaded from class files
// counters for classes loaded from shared archive
// These counters are for java.lang.management API support.
// They are created even if -XX:-UsePerfData is set and in
// that case, they will be allocated on C heap.
if (UsePerfData) {
}
}
DTRACE_CLASSLOAD_PROBE(unloaded, k, false);
// Classes that can be unloaded must be non-shared
if (UsePerfData) {
// add the class size
// Compute method size & subtract from running total.
// We are called during phase 1 of mark sweep, so it's
// still ok to iterate through methodOops here.
}
}
if (TraceClassUnloading) {
}
}
// increment the count
classes_counter->inc();
if (UsePerfData) {
// add the class size
}
}
// lifted from ClassStatistics.do_class(klassOop k)
if (k->oop_is_instance()) {
// We do not have to count implementors, since we only store one!
}
return class_size * oopSize;
}
// verbose will be set to the previous value
return verbose;
}
// Caller to this function must own Management_lock
}
// For consistency of the loaded classes, grab the SystemDictionary lock
// Set _loaded_classes and _current_thread and begin enumerating all classes.
// Only one thread will do the enumeration at a time.
// These static variables are needed and they are used by the static method
// add_loaded_class called from classes_do().
// FIXME: Exclude array klasses for now
// Universe::basic_type_classes_do(&add_loaded_class);
}