RTI Connext Java API
Version 6.1.2
|
Heap Monitoring APIs. More...
Static Public Member Functions | |
static native boolean | enable () |
Starts monitoring the heap memory used by RTI Connext. More... | |
static boolean | enable (HeapMonitoringParams params) |
Starts monitoring the heap memory used by RTI Connext. More... | |
static native void | disable () |
Stops monitoring the heap memory used by RTI Connext. More... | |
static native boolean | pause () |
Pauses heap monitoring. More... | |
static native boolean | resume () |
Resumes heap monitoring. More... | |
static native boolean | take_heap_snapshot (String filename, boolean print_details) |
Saves the current heap memory usage in a file. More... | |
Heap Monitoring APIs.
|
static |
Starts monitoring the heap memory used by RTI Connext.
This function must be called before any other function in the RTI Connext library is called.
Once heap monitoring is enabled, you can take heap snapshots by using com.rti.ndds.utility.HeapMonitoring.take_heap_snapshot.
Use this method only for debugging purposes, since it may introduce a significant performance impact.
|
static |
Starts monitoring the heap memory used by RTI Connext.
Perfoms the same function as com.rti.ndds.utility.HeapMonitoring.enable except that it also provides the values in params. Those values will set the format used in the snapshot com.rti.ndds.utility.HeapMonitoring.take_heap_snapshot.
References HeapMonitoring.disable(), HeapMonitoring.pause(), HeapMonitoring.resume(), and HeapMonitoring.take_heap_snapshot().
|
static |
Stops monitoring the heap memory used by RTI Connext.
This method must be the last method called from RTI Connext.
Referenced by HeapMonitoring.enable().
|
static |
Pauses heap monitoring.
New memory allocations will not be monitored and they will not appear in the snapshot generated by com.rti.ndds.utility.HeapMonitoring.take_heap_snapshot.
Referenced by HeapMonitoring.enable().
|
static |
Resumes heap monitoring.
Referenced by HeapMonitoring.enable().
|
static |
Saves the current heap memory usage in a file.
After com.rti.ndds.utility.HeapMonitoring.enable is called, you may invoke this method periodically to save the current heap memory usage to a file.
By comparing two snapshots, you can tell if new memory has been allocated and in many cases where. This is why this operation can be used to debug unexpected memory growth.
The format of a snapshot is as follows:
First, there is a memory usage summary like this:
After the previous summary, and only if you set the parameter print_details to com.rti.dds.infrastructure.true, the method will print the details of every single outstanding heap allocation done by RTI Connext. For example:
filename | <<in>>. Name of file in which to store the snapshot. |
print_details | <<in>>. Indicates if the snapshot will contain only the memory usage summary or the details of the individual allocations. |
Referenced by HeapMonitoring.enable().