36 #include "utilities/defaultStream.hpp"
37 #include "logging/log.hpp"
38 #include "logging/logConfiguration.hpp"
39
40 #ifdef DTRACE_ENABLED
41
42 // Only bother with this argument setup if dtrace is available
43
44 #define HOTSPOT_CLASS_unloaded HOTSPOT_CLASS_UNLOADED
45 #define HOTSPOT_CLASS_loaded HOTSPOT_CLASS_LOADED
46 #define DTRACE_CLASSLOAD_PROBE(type, clss, shared) \
47 { \
48 char* data = NULL; \
49 int len = 0; \
50 Symbol* name = (clss)->name(); \
51 if (name != NULL) { \
52 data = (char*)name->bytes(); \
53 len = name->utf8_length(); \
54 } \
55 HOTSPOT_CLASS_##type( /* type = unloaded, loaded */ \
56 data, len, (clss)->class_loader(), (shared)); \
57 }
58
59 #else // ndef DTRACE_ENABLED
60
61 #define DTRACE_CLASSLOAD_PROBE(type, clss, shared)
62
63 #endif
64
65 #if INCLUDE_MANAGEMENT
66 // counters for classes loaded from class files
67 PerfCounter* ClassLoadingService::_classes_loaded_count = NULL;
68 PerfCounter* ClassLoadingService::_classes_unloaded_count = NULL;
69 PerfCounter* ClassLoadingService::_classbytes_loaded = NULL;
70 PerfCounter* ClassLoadingService::_classbytes_unloaded = NULL;
71
72 // counters for classes loaded from shared archive
73 PerfCounter* ClassLoadingService::_shared_classes_loaded_count = NULL;
74 PerfCounter* ClassLoadingService::_shared_classes_unloaded_count = NULL;
75 PerfCounter* ClassLoadingService::_shared_classbytes_loaded = NULL;
76 PerfCounter* ClassLoadingService::_shared_classbytes_unloaded = NULL;
|
36 #include "utilities/defaultStream.hpp"
37 #include "logging/log.hpp"
38 #include "logging/logConfiguration.hpp"
39
40 #ifdef DTRACE_ENABLED
41
42 // Only bother with this argument setup if dtrace is available
43
44 #define HOTSPOT_CLASS_unloaded HOTSPOT_CLASS_UNLOADED
45 #define HOTSPOT_CLASS_loaded HOTSPOT_CLASS_LOADED
46 #define DTRACE_CLASSLOAD_PROBE(type, clss, shared) \
47 { \
48 char* data = NULL; \
49 int len = 0; \
50 Symbol* name = (clss)->name(); \
51 if (name != NULL) { \
52 data = (char*)name->bytes(); \
53 len = name->utf8_length(); \
54 } \
55 HOTSPOT_CLASS_##type( /* type = unloaded, loaded */ \
56 data, len, (void*)(clss)->class_loader(), (shared)); \
57 }
58
59 #else // ndef DTRACE_ENABLED
60
61 #define DTRACE_CLASSLOAD_PROBE(type, clss, shared)
62
63 #endif
64
65 #if INCLUDE_MANAGEMENT
66 // counters for classes loaded from class files
67 PerfCounter* ClassLoadingService::_classes_loaded_count = NULL;
68 PerfCounter* ClassLoadingService::_classes_unloaded_count = NULL;
69 PerfCounter* ClassLoadingService::_classbytes_loaded = NULL;
70 PerfCounter* ClassLoadingService::_classbytes_unloaded = NULL;
71
72 // counters for classes loaded from shared archive
73 PerfCounter* ClassLoadingService::_shared_classes_loaded_count = NULL;
74 PerfCounter* ClassLoadingService::_shared_classes_unloaded_count = NULL;
75 PerfCounter* ClassLoadingService::_shared_classbytes_loaded = NULL;
76 PerfCounter* ClassLoadingService::_shared_classbytes_unloaded = NULL;
|