Mercurial > hg > graal-jvmci-8
comparison src/share/vm/services/diagnosticFramework.hpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | f1cb6f9cfe21 |
children | 5a1f452f8f90 |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
308 // Diagnostic commands are not directly instantiated but created with a factory. | 308 // Diagnostic commands are not directly instantiated but created with a factory. |
309 // Each diagnostic command class has its own factory. The DCmdFactory class also | 309 // Each diagnostic command class has its own factory. The DCmdFactory class also |
310 // manages the status of the diagnostic command (hidden, enabled). A DCmdFactory | 310 // manages the status of the diagnostic command (hidden, enabled). A DCmdFactory |
311 // has to be registered to make the diagnostic command available (see | 311 // has to be registered to make the diagnostic command available (see |
312 // management.cpp) | 312 // management.cpp) |
313 class DCmdFactory: public CHeapObj { | 313 class DCmdFactory: public CHeapObj<mtInternal> { |
314 private: | 314 private: |
315 static Mutex* _dcmdFactory_lock; | 315 static Mutex* _dcmdFactory_lock; |
316 // Pointer to the next factory in the singly-linked list of registered | 316 // Pointer to the next factory in the singly-linked list of registered |
317 // diagnostic commands | 317 // diagnostic commands |
318 DCmdFactory* _next; | 318 DCmdFactory* _next; |
366 public: | 366 public: |
367 DCmdFactoryImpl(bool enabled, bool hidden) : | 367 DCmdFactoryImpl(bool enabled, bool hidden) : |
368 DCmdFactory(DCmdClass::num_arguments(), enabled, hidden) { } | 368 DCmdFactory(DCmdClass::num_arguments(), enabled, hidden) { } |
369 // Returns a C-heap allocated instance | 369 // Returns a C-heap allocated instance |
370 virtual DCmd* create_Cheap_instance(outputStream* output) { | 370 virtual DCmd* create_Cheap_instance(outputStream* output) { |
371 return new (ResourceObj::C_HEAP) DCmdClass(output, true); | 371 return new (ResourceObj::C_HEAP, mtInternal) DCmdClass(output, true); |
372 } | 372 } |
373 // Returns a resourceArea allocated instance | 373 // Returns a resourceArea allocated instance |
374 virtual DCmd* create_resource_instance(outputStream* output) { | 374 virtual DCmd* create_resource_instance(outputStream* output) { |
375 return new DCmdClass(output, false); | 375 return new DCmdClass(output, false); |
376 } | 376 } |