Inherits Object, and HeapAnalyzer.
List of all members.
This heap analyzer has low CPU and memory costs. It is well suited for performance sensitive production environments.
|ObjectCountHeapAnalyzer Handle definition.|
|ObjectCountHeapAnalyzer View definition.|
|ObjectCountHeapAnalyzer Holder definition.|
Public Member Functions
|capture () const|
|Capture a Snapshot of the current state of the heap.|
Note, when performing captures in a loop, and assigning the captured snapshot to a handle referencing a snapshot, it is advisable to NULL out the handle first, so as to avoid the new snapshot including the "cost" of snapshot it is about to replace.
|delta (HeapAnalyzer::Snapshot::View vSnap) const|
|Compute the delta between the supplied Snapshot and the current heap state.|
|virtual int64_t||getObjectCount () const|
|Return the number of registered objects.|
|virtual void||toStream (std::ostream &out) const|
|Output a human-readable description of this Object to the given stream.|
coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toStream method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents.
Object::View vKey = ... Object::View vValue = ... std::cout << vKey << " = " << vValue << std::endl; String::Handle hs = COH_TO_STRING(vKey << " = " << vValue);
Protected Member Functions
|Create a new ObjectCountHeapAnalyzer.|
|virtual void||registerObject (const Object &o)|
|Register a newly created Object with the system.|
|virtual void||unregisterObject (const Object &o)|
|Unregister an Object with the system.|
|Array of object counts.|
Static Protected Attributes
|static const size_t||s_cCount|
|The size of the array of counters.|
|Snapshot containing the object count. More...|