src/share/vm/classfile/systemDictionary.hpp
Print this page
rev 4372 : 8012182: Add information about class loading and unloading to event based tracing framework
Reviewed-by:
*** 32,41 ****
--- 32,46 ----
#include "runtime/java.hpp"
#include "runtime/reflectionUtils.hpp"
#include "utilities/hashtable.hpp"
#include "utilities/hashtable.inline.hpp"
+ #if INCLUDE_TRACE
+ #include "trace/traceTime.hpp"
+ class BoolObjectClosure;
+ #endif
+
// The system dictionary stores all loaded classes and maps:
//
// [class name,class loader] -> class i.e. [Symbol*,oop] -> klassOop
//
// Classes are loaded lazily. The default VM class loader is
*** 605,614 ****
--- 610,623 ----
static instanceKlassHandle load_instance_class(Symbol* class_name, Handle class_loader, TRAPS);
static Handle compute_loader_lock_object(Handle class_loader, TRAPS);
static void check_loader_lock_contention(Handle loader_lock, TRAPS);
static bool is_parallelCapable(Handle class_loader);
static bool is_parallelDefine(Handle class_loader);
+ static jlong class_load_tracing_begin(void);
+ static void post_class_load_event(jlong start_time, instanceKlassHandle k,
+ Handle initiating_loader);
+ static void post_class_unload_events(BoolObjectClosure* is_alive);
static klassOop find_shared_class(Symbol* class_name);
// Setup link to hierarchy
static void add_to_hierarchy(instanceKlassHandle k, TRAPS);
*** 667,676 ****
--- 676,693 ----
static oop _java_system_loader;
static bool _has_loadClassInternal;
static bool _has_checkPackageAccess;
+
+ #if INCLUDE_TRACE
+ static TracingTime _class_unload_time;
+ static BoolObjectClosure* _is_alive;
+ static int _no_of_classes_unloading;
+ static bool _should_write_unload_events;
+ static void class_unload_event(klassOop curklass);
+ #endif
};
class SystemDictionaryHandles : AllStatic {
public:
#define WK_KLASS_HANDLE_DECLARE(name, ignore_symbol, option) \