Update of /cvsroot/javaprofiler/test/module
In directory usw-pr-cvs1:/tmp/cvs-serv712
Modified Files:
TestAllocHistView.java
Log Message:
no message
Index: TestAllocHistView.java
===================================================================
RCS file: /cvsroot/javaprofiler/test/module/TestAllocHistView.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** TestAllocHistView.java 24 Jul 2002 23:58:41 -0000 1.5
--- TestAllocHistView.java 25 Jul 2002 23:03:13 -0000 1.6
***************
*** 45,60 ****
/** Creates a new instance of TestAllocHistView */
! public TestAllocHistView() {
try {
System.out.print( "Connecting ... \n" );
! vm = connect();
! System.out.print( "Preparing relatime ... \n" );
! image = vm.realtimeImage();
! ((net.sourceforge.javaprofiler.jpiimpl.realtime.ImageR) image).
! refreshTypes();
! refreshThread = new RefreshThread();
!
! //image = getSnapshot(vm);
System.out.print( "Creating window ... \n" );
--- 45,64 ----
/** Creates a new instance of TestAllocHistView */
! public TestAllocHistView( boolean useRealtime, boolean useShmem ) {
try {
System.out.print( "Connecting ... \n" );
! vm = connect( useShmem );
! if ( useRealtime ) {
! System.out.print( "Preparing realtime ... \n" );
! image = vm.realtimeImage();
! ((net.sourceforge.javaprofiler.jpiimpl.realtime.ImageR) image).
! refreshTypes();
! refreshThread = new RefreshThread();
! }
! else {
! System.out.print( "Creating snapshot ... \n" );
! image = getSnapshot(vm);
! }
System.out.print( "Creating window ... \n" );
***************
*** 140,157 ****
}
! private VirtualMachineRef connect() throws ConnectingException {
//try {
Bootstrap.virtualMachineManager().defaultConnector();
! /*Connector con = new SocketAttachConnector();
! Map args = con.defaultArguments();
! ((Connector.IntegerArgument) args.get("port")).setValue(25595);
! ((Connector.Argument) args.get("host")).setValue("localhost");
! return (new SocketAttachConnector()).connect( args );*/
!
! Connector con = new ShmemAttachConnector();
! Map args = con.defaultArguments();
! ((Connector.Argument) args.get("address")).setValue("com");
! return (new ShmemAttachConnector()).connect( args );
/*}
--- 144,164 ----
}
! private VirtualMachineRef connect( boolean useShmem ) throws ConnectingException {
//try {
Bootstrap.virtualMachineManager().defaultConnector();
! if ( !useShmem ) {
! Connector con = new SocketAttachConnector();
! Map args = con.defaultArguments();
! ((Connector.IntegerArgument) args.get("port")).setValue(25595);
! ((Connector.Argument) args.get("host")).setValue("localhost");
! return (new SocketAttachConnector()).connect( args );
! }
! else {
! Connector con = new ShmemAttachConnector();
! Map args = con.defaultArguments();
! ((Connector.Argument) args.get("address")).setValue("com");
! return (new ShmemAttachConnector()).connect( args );
! }
/*}
***************
*** 167,171 ****
public static void main( String[] arg) {
// let's run the test
! TestAllocHistView test = new TestAllocHistView();
test.show();
--- 174,178 ----
public static void main( String[] arg) {
// let's run the test
! TestAllocHistView test = new TestAllocHistView( true, true );
test.show();
|