| com.sun.cldchi.tools.memoryprofiler.data.MPDataProvider
All known Subclasses: com.sun.cldchi.tools.memoryprofiler.data.GlobalData,
MPDataProvider | public interface MPDataProvider (Code) | | The MPDataProvider declares interface which provides data for
data-displaying GUI tool.
For work it requires some implementation of VMConnection .
The implementation of this interface is provided by MPDataProviderFactory .
To work with this interface you should firstly obtain its realization from MPDataProviderFactory ,
passing it an instance of VMConnection .
After this you should connect to a KDP
running on hostName:port by calling connect(String hostName, int port)
To control VM execution use pauseVM() and resumeVM() funtions. *
All other functions provide processed information.
See Also: com.sun.cldchi.tools.memoryprofiler.data.MPDataProviderFactory See Also: com.sun.cldchi.tools.memoryprofiler.jdwp.VMConnection |
Method Summary | |
public ClassStatistics[] | calculateStatistics() Returns statistics of memory usage for each class in the VM. | public void | closeConnections() Disconnects from the KDP. | public void | connect(String hostName, int port) Connects to the KDP running on hostName:port using VMConnection , which should
be set before by setConnector(VMConnection connector) call. | public JavaClass[] | getClassList() Returns list of all classes in systems. | public String | getObjectTypeName(JavaObject obj) Returns name of the type of the object. | public Iterator | getObjects() Returns all objects.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
all objects. | public JavaObject[] | getObjectsFromTheAddresses(int start, int end) Returns array JavaObjects, sorted by address from given memory block. | public JavaObject[] | getObjectsOfClass(JavaClass jc) Returns all objects with given extended class id.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
Parameters: jc - - class which objects you want to find. | public String | getStackTrace(JavaObject stackObject, int ptrAddress) Returns stacktrace of an address on java stack
The provider must be connected to a KDP, see interface description. | public int | get_allocation_top() Returns value of _old_generation_end global varaible,
which is address where old generation of heap objects ends. | public int | get_heap_start() Returns value of _heap_start global varaible, which is address where VM heap starts. | public int | get_heap_top() Returns value of _heap_top global varaible, which is address where VM heap ends. | public int | get_old_gen_end() Returns value of _old_generation_end global varaible,
which is address where old generation of heap objects ends. | public JavaObject[] | pathFromTheRoot(JavaObject obj) Returns array of linked JavaObjects, where first one is a root object and last one is the parameter. | public void | pauseVM() Pauses the VM execution. | public void | resumeVM() Resumes the VM execution. |
JAVA_OBJECT | final public static int JAVA_OBJECT(Code) | | |
STACK_OBJECT | final public static int STACK_OBJECT(Code) | | |
STATICS_OBJECT | final public static int STATICS_OBJECT(Code) | | |
VM_OBJECT | final public static int VM_OBJECT(Code) | | |
calculateStatistics | public ClassStatistics[] calculateStatistics()(Code) | | Returns statistics of memory usage for each class in the VM.
There is separate ClassStatistics object int the returned array for each class.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
array of ClassStatistics . See Also: MPDataProvider.connect(String hostName,int port) |
closeConnections | public void closeConnections()(Code) | | Disconnects from the KDP. Does nothing if not connected.
|
connect | public void connect(String hostName, int port) throws java.net.ConnectException, SocketException(Code) | | Connects to the KDP running on hostName:port using VMConnection , which should
be set before by setConnector(VMConnection connector) call.
It will throw java.net.ConnectException unless connection is successful.
Parameters: hostName - - name of host where KDP runs Parameters: port - - number of port where KDP listens See Also: MPDataProvider.closeConnections() See Also: |
getObjectTypeName | public String getObjectTypeName(JavaObject obj)(Code) | | Returns name of the type of the object.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
Parameters: obj - name of the type of the object. See Also: MPDataProvider.connect(String hostName,int port) |
getObjects | public Iterator getObjects()(Code) | | Returns all objects.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
all objects. Iterator returns instances of JavaObject See Also: MPDataProvider.connect(String hostName,int port) |
getObjectsFromTheAddresses | public JavaObject[] getObjectsFromTheAddresses(int start, int end)(Code) | | Returns array JavaObjects, sorted by address from given memory block.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
Parameters: start - - start address of the zone in heap Parameters: end - - end address of the zone in heap array JavaObjects, sorted by address from given memory block. See Also: MPDataProvider.connect(String hostName,int port) |
getObjectsOfClass | public JavaObject[] getObjectsOfClass(JavaClass jc)(Code) | | Returns all objects with given extended class id.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
Parameters: jc - - class which objects you want to find. all objects with given extended class id. See Also: MPDataProvider.connect(String hostName,int port) |
getStackTrace | public String getStackTrace(JavaObject stackObject, int ptrAddress) throws SocketException(Code) | | Returns stacktrace of an address on java stack
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
Parameters: stackObject - - JavaObject of stack type Parameters: ptrAddress - - address of the pointer on stack String. See Also: MPDataProvider.connect(String hostName,int port) |
get_allocation_top | public int get_allocation_top()(Code) | | Returns value of _old_generation_end global varaible,
which is address where old generation of heap objects ends.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
value of _old_generation_end global varaible See Also: MPDataProvider.connect(String hostName,int port) |
get_heap_start | public int get_heap_start()(Code) | | Returns value of _heap_start global varaible, which is address where VM heap starts.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
value of _heap_start global varaible See Also: MPDataProvider.connect(String hostName,int port) |
get_heap_top | public int get_heap_top()(Code) | | Returns value of _heap_top global varaible, which is address where VM heap ends.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
value of _heap_top global varaible See Also: MPDataProvider.connect(String hostName,int port) |
get_old_gen_end | public int get_old_gen_end()(Code) | | Returns value of _old_generation_end global varaible,
which is address where old generation of heap objects ends.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
value of _old_generation_end global varaible See Also: MPDataProvider.connect(String hostName,int port) |
pathFromTheRoot | public JavaObject[] pathFromTheRoot(JavaObject obj)(Code) | | Returns array of linked JavaObjects, where first one is a root object and last one is the parameter.
The provider must be connected to a KDP, see interface description.
The function will throw SocketException unless communication with VM is successful
Parameters: obj - array of linked JavaObjects, where first one is a root object and last one is the parameter. See Also: MPDataProvider.connect(String hostName,int port) |
|
|