comparison src/share/vm/runtime/dtraceJSDT.hpp @ 6204:90d5a592ea8f

Merge
author coleenp
date Thu, 12 Jul 2012 14:26:25 -0400
parents d2a62e0f25eb
children b9a9ed0f8eeb
comparison
equal deleted inserted replaced
6196:3759236eea14 6204:90d5a592ea8f
61 static jboolean is_probe_enabled(jmethodID method); 61 static jboolean is_probe_enabled(jmethodID method);
62 static void dispose(OpaqueProbes handle); 62 static void dispose(OpaqueProbes handle);
63 static jboolean is_supported(); 63 static jboolean is_supported();
64 }; 64 };
65 65
66 class RegisteredProbes : public CHeapObj { 66 class RegisteredProbes : public CHeapObj<mtInternal> {
67 private: 67 private:
68 nmethod** _nmethods; // all the probe methods 68 nmethod** _nmethods; // all the probe methods
69 size_t _count; // number of probe methods 69 size_t _count; // number of probe methods
70 int _helper_handle; // DTrace-assigned identifier 70 int _helper_handle; // DTrace-assigned identifier
71 71
72 public: 72 public:
73 RegisteredProbes(size_t count) { 73 RegisteredProbes(size_t count) {
74 _count = count; 74 _count = count;
75 _nmethods = NEW_C_HEAP_ARRAY(nmethod*, count); 75 _nmethods = NEW_C_HEAP_ARRAY(nmethod*, count, mtInternal);
76 } 76 }
77 77
78 ~RegisteredProbes() { 78 ~RegisteredProbes() {
79 for (size_t i = 0; i < _count; ++i) { 79 for (size_t i = 0; i < _count; ++i) {
80 // Let the sweeper reclaim it 80 // Let the sweeper reclaim it
81 _nmethods[i]->make_not_entrant(); 81 _nmethods[i]->make_not_entrant();
82 _nmethods[i]->method()->clear_code(); 82 _nmethods[i]->method()->clear_code();
83 } 83 }
84 FREE_C_HEAP_ARRAY(nmethod*, _nmethods); 84 FREE_C_HEAP_ARRAY(nmethod*, _nmethods, mtInternal);
85 _nmethods = NULL; 85 _nmethods = NULL;
86 _count = 0; 86 _count = 0;
87 } 87 }
88 88
89 static RegisteredProbes* toRegisteredProbes(OpaqueProbes p) { 89 static RegisteredProbes* toRegisteredProbes(OpaqueProbes p) {