You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(73) |
Sep
(92) |
Oct
(9) |
Nov
(80) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(92) |
Feb
(52) |
Mar
(71) |
Apr
(64) |
May
(53) |
Jun
(10) |
Jul
(111) |
Aug
(93) |
Sep
(134) |
Oct
|
Nov
|
Dec
|
From: Jan S. <st...@us...> - 2002-05-16 11:52:27
|
Update of /cvsroot/javaprofiler/patches In directory usw-pr-cvs1:/tmp/cvs-serv24621 Log Message: Patches of netbeans modules. Status: Vendor Tag: avendor Release Tags: arelease N patches/java/org/netbeans/modules/java/JavaExecSupport.java N patches/java/org/netbeans/modules/java/settings/Bundle.properties N patches/java/org/netbeans/modules/java/settings/Bundle_ja.properties N patches/java/org/netbeans/modules/java/settings/JavaSettings.java N patches/java/org/netbeans/modules/java/settings/JavaSettingsBeanInfo.java N patches/openide/org/openide/cookies/ProfilerCookie.java N patches/openide/org/openide/loaders/Bundle.properties N patches/openide/org/openide/loaders/Bundle_ja.properties N patches/openide/org/openide/loaders/ExecSupport.java N patches/openide/org/openide/profiler/ProfilerType.java No conflicts created by this import ***** Bogus filespec: - ***** Bogus filespec: Imported ***** Bogus filespec: sources |
From: Jan S. <st...@us...> - 2002-05-16 11:45:21
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect In directory usw-pr-cvs1:/tmp/cvs-serv22854 Modified Files: SocketAttachConnector.java ShmemAttachConnector.java Log Message: Some messages internacionalized. Index: SocketAttachConnector.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect/SocketAttachConnector.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** SocketAttachConnector.java 20 Apr 2002 10:46:21 -0000 1.4 --- SocketAttachConnector.java 16 May 2002 11:45:17 -0000 1.5 *************** *** 61,65 **** } if (port==-1) { ! throw new IllegalConnectorArgumentsException("Wrong or missing port number.", "port"); } IProf iprof=new IProf(new CommunSetupSocket(CommunSetupSocket.CLIENT_MODE, host, port)); --- 61,65 ---- } if (port==-1) { ! throw new IllegalConnectorArgumentsException(bundle.getString("ERR_MIS_PORT"), "port"); } IProf iprof=new IProf(new CommunSetupSocket(CommunSetupSocket.CLIENT_MODE, host, port)); *************** *** 67,71 **** iprof.run(); } catch (IProfException ipe) { ! throw new ConnectingException("Unable to connect to the profiled process: "+ipe); } return new VirtualMachineImpl(iprof); --- 67,71 ---- iprof.run(); } catch (IProfException ipe) { ! throw new ConnectingException(bundle.getString("ERR_CONNECT")+ipe); } return new VirtualMachineImpl(iprof); *************** *** 139,142 **** --- 139,145 ---- /* * $Log$ + * Revision 1.5 2002/05/16 11:45:17 stolis + * Some messages internacionalized. + * * Revision 1.4 2002/04/20 10:46:21 stolis * Changes forced by the change of the IProf.run method prototype. Index: ShmemAttachConnector.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect/ShmemAttachConnector.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ShmemAttachConnector.java 20 Apr 2002 10:46:21 -0000 1.4 --- ShmemAttachConnector.java 16 May 2002 11:45:17 -0000 1.5 *************** *** 54,58 **** } if (address==null) { ! throw new IllegalConnectorArgumentsException("Wrong or missing shared memory area address.", "address"); } IProf iprof=new IProf(new CommunSetupShMem(address, 256*1024)); --- 54,58 ---- } if (address==null) { ! throw new IllegalConnectorArgumentsException(bundle.getString("ERR_MIS_SHMEM"), "address"); } IProf iprof=new IProf(new CommunSetupShMem(address, 256*1024)); *************** *** 60,64 **** iprof.run(); } catch (IProfException ipe) { ! throw new ConnectingException("Unable to connect to the profiled process: "+ipe); } return new VirtualMachineImpl(iprof); --- 60,64 ---- iprof.run(); } catch (IProfException ipe) { ! throw new ConnectingException(bundle.getString("ERR_CONNECT")+ipe); } return new VirtualMachineImpl(iprof); *************** *** 128,131 **** --- 128,134 ---- /* * $Log$ + * Revision 1.5 2002/05/16 11:45:17 stolis + * Some messages internacionalized. + * * Revision 1.4 2002/04/20 10:46:21 stolis * Changes forced by the change of the IProf.run method prototype. |
From: Jan S. <st...@us...> - 2002-05-16 11:41:27
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect In directory usw-pr-cvs1:/tmp/cvs-serv21823 Modified Files: SocketListenConnector.java Log Message: First version of listening connector. Index: SocketListenConnector.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect/SocketListenConnector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** SocketListenConnector.java 14 Oct 2001 21:56:31 -0000 1.3 --- SocketListenConnector.java 16 May 2002 11:41:25 -0000 1.4 *************** *** 28,31 **** --- 28,32 ---- import net.sourceforge.javaprofiler.jpi.connect.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; + import net.sourceforge.javaprofiler.jpiimpl.VirtualMachineImpl; /** *************** *** 53,62 **** } if (port==-1) { ! throw new IllegalConnectorArgumentsException("Wrong or missing port number.", "port"); } ! //IProf prof=new IProf(new CommunSetupSocket(CommunSetupSocket.SERVER_MODE, "localhost", port)); ! //prof.runClient(); ! //PENDING ! return null; } --- 54,66 ---- } if (port==-1) { ! throw new IllegalConnectorArgumentsException(bundle.getString("ERR_MIS_PORT"), "port"); } ! IProf iprof=new IProf(new CommunSetupSocket(CommunSetupSocket.SERVER_MODE, "localhost", port)); ! try { ! iprof.run(); ! } catch (IProfException ipe) { ! throw new ConnectingException(bundle.getString("ERR_CONNECT")+ipe); ! } ! return new VirtualMachineImpl(iprof); } *************** *** 124,127 **** --- 128,134 ---- /* * $Log$ + * Revision 1.4 2002/05/16 11:41:25 stolis + * First version of listening connector. + * * Revision 1.3 2001/10/14 21:56:31 stolis * Connectors updated. |
From: Jan S. <st...@us...> - 2002-05-16 11:40:39
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect In directory usw-pr-cvs1:/tmp/cvs-serv21531 Modified Files: SocketLaunchConnector.java ShmemLaunchConnector.java Log Message: First version of launching connectors. Index: SocketLaunchConnector.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect/SocketLaunchConnector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** SocketLaunchConnector.java 14 Oct 2001 21:56:31 -0000 1.3 --- SocketLaunchConnector.java 16 May 2002 11:40:36 -0000 1.4 *************** *** 21,28 **** --- 21,35 ---- package net.sourceforge.javaprofiler.jpiimpl.connect; + import java.io.File; + import java.io.IOException; import java.util.Map; + import java.util.Iterator; import java.util.ResourceBundle; import net.sourceforge.javaprofiler.jpi.VirtualMachine; import net.sourceforge.javaprofiler.jpi.connect.*; + import net.sourceforge.javaprofiler.jpiimpl.VirtualMachineImpl; + import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; + import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; + import net.sourceforge.javaprofiler.jpiimpl.commun.CommunSetupSocket; /** *************** *** 36,47 **** /** ! * Launches the VM and connects to it through socket. */ ! public VirtualMachine connect(Map arguments) throws IllegalConnectorArgumentsException, ConnectingException { ! //PENDING ! return null; } /** * Returns the transport mechanism used by this connector to establish * connections with a target VM. --- 43,143 ---- /** ! * Returns the arguments accepted by this Connector and their default values. ! * The keys of the returned map are string argument names. The values are ! * {@link Connector.Argument} containing information about the argument ! * and its default value. ! * ! * @return the map associating argument names with argument information ! * and default value. */ ! public Map defaultArguments() { ! Map args=super.defaultArguments(); ! Connector.Argument arg; ! arg=new StringArgumentImpl(false, bundle.getString("Port"), ! bundle.getString("PortDesc"), "port"); ! arg.setValue(""); ! args.put(arg.name(), arg); ! return args; } /** + * Launches the VM and connects to it through socket. + */ + public VirtualMachine connect(Map args) throws IllegalConnectorArgumentsException, ConnectingException { + String quote=null; + String launcher=null; + String options=null; + String clazz=null; + String arguments=null; + String settings=null; + String workdir=null; + int port=-1; + Iterator iter=args.keySet().iterator(); + while (iter.hasNext()) { + Connector.Argument arg=(Connector.Argument)args.get(iter.next()); + if ("port".equals(arg.name())) { + if (arg.isValid(arg.value())) { + port=((Connector.IntegerArgument)arg).intValue(); + } + } + if ("quote".equals(arg.name())) { + if (arg.isValid(arg.value())) { + quote=((Connector.StringArgument)arg).value(); + } + } + if ("launcher".equals(arg.name())) { + if (arg.isValid(arg.value())) { + launcher=((Connector.StringArgument)arg).value(); + } + } + if ("options".equals(arg.name())) { + if (arg.isValid(arg.value())) { + options=((Connector.StringArgument)arg).value(); + } + } + if ("class".equals(arg.name())) { + if (arg.isValid(arg.value())) { + clazz=((Connector.StringArgument)arg).value(); + } + } + if ("arguments".equals(arg.name())) { + if (arg.isValid(arg.value())) { + arguments=((Connector.StringArgument)arg).value(); + } + } + if ("settings".equals(arg.name())) { + if (arg.isValid(arg.value())) { + settings=((Connector.StringArgument)arg).value(); + } + } + if ("workdir".equals(arg.name())) { + if (arg.isValid(arg.value())) { + workdir=((Connector.StringArgument)arg).value(); + } + } + } + StringBuffer command=new StringBuffer(); + command.append(quote).append(launcher).append(quote).append(' ').append(options).append(" -Xrunprofiler:"); + if (port!=-1) { + command.append("commun_port=").append(port).append(','); + } + command.append(settings).append(' ').append(clazz).append(' ').append(arguments); + Process proc=null; + try { + proc=Runtime.getRuntime().exec(command.toString(), null, new File(workdir)); + } catch (IOException e) { + throw new IllegalConnectorArgumentsException(bundle.getString("ERR_IOEXCEPTION"), ""); + } + // PENDING port==-1 + IProf iprof=new IProf(new CommunSetupSocket(CommunSetupSocket.CLIENT_MODE, "localhost", port)); + try { + iprof.run(); + } catch (IProfException ipe) { + throw new ConnectingException(bundle.getString("ERR_CONNECT")+ipe); + } + return new VirtualMachineImpl(iprof, proc); + } + + /** * Returns the transport mechanism used by this connector to establish * connections with a target VM. *************** *** 88,91 **** --- 184,190 ---- /* * $Log$ + * Revision 1.4 2002/05/16 11:40:36 stolis + * First version of launching connectors. + * * Revision 1.3 2001/10/14 21:56:31 stolis * Connectors updated. Index: ShmemLaunchConnector.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect/ShmemLaunchConnector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ShmemLaunchConnector.java 14 Oct 2001 21:56:31 -0000 1.3 --- ShmemLaunchConnector.java 16 May 2002 11:40:36 -0000 1.4 *************** *** 21,28 **** --- 21,35 ---- package net.sourceforge.javaprofiler.jpiimpl.connect; + import java.io.File; + import java.io.IOException; import java.util.Map; + import java.util.Iterator; import java.util.ResourceBundle; import net.sourceforge.javaprofiler.jpi.VirtualMachine; import net.sourceforge.javaprofiler.jpi.connect.*; + import net.sourceforge.javaprofiler.jpiimpl.VirtualMachineImpl; + import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; + import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; + import net.sourceforge.javaprofiler.jpiimpl.commun.CommunSetupShMem; /** *************** *** 34,45 **** public class ShmemLaunchConnector extends LaunchConnector { public static ResourceBundle bundle=ResourceBundle.getBundle("net.sourceforge.javaprofiler.jpiimpl.bundle"); ! /** ! * Launches the VM and connects to it through shared memory. */ ! public VirtualMachine connect(Map arguments) throws IllegalConnectorArgumentsException, ConnectingException { ! //PENDING ! return null; ! } /** --- 41,139 ---- public class ShmemLaunchConnector extends LaunchConnector { public static ResourceBundle bundle=ResourceBundle.getBundle("net.sourceforge.javaprofiler.jpiimpl.bundle"); ! /** ! * Launches the VM and connects to it through socket. */ ! public VirtualMachine connect(Map args) throws IllegalConnectorArgumentsException, ConnectingException { ! String quote=null; ! String launcher=null; ! String options=null; ! String clazz=null; ! String arguments=null; ! String settings=null; ! String workdir=null; ! String shmem=null; ! Iterator iter=args.keySet().iterator(); ! while (iter.hasNext()) { ! Connector.Argument arg=(Connector.Argument)args.get(iter.next()); ! if ("shmem".equals(arg.name())) { ! if (arg.isValid(arg.value())) { ! shmem=((Connector.StringArgument)arg).value(); ! } ! } ! if ("quote".equals(arg.name())) { ! if (arg.isValid(arg.value())) { ! quote=((Connector.StringArgument)arg).value(); ! } ! } ! if ("launcher".equals(arg.name())) { ! if (arg.isValid(arg.value())) { ! launcher=((Connector.StringArgument)arg).value(); ! } ! } ! if ("options".equals(arg.name())) { ! if (arg.isValid(arg.value())) { ! options=((Connector.StringArgument)arg).value(); ! } ! } ! if ("class".equals(arg.name())) { ! if (arg.isValid(arg.value())) { ! clazz=((Connector.StringArgument)arg).value(); ! } ! } ! if ("arguments".equals(arg.name())) { ! if (arg.isValid(arg.value())) { ! arguments=((Connector.StringArgument)arg).value(); ! } ! } ! if ("settings".equals(arg.name())) { ! if (arg.isValid(arg.value())) { ! settings=((Connector.StringArgument)arg).value(); ! } ! } ! if ("workdir".equals(arg.name())) { ! if (arg.isValid(arg.value())) { ! workdir=((Connector.StringArgument)arg).value(); ! } ! } ! } ! StringBuffer command=new StringBuffer(); ! command.append(quote).append(launcher).append(quote).append(' ').append(options).append(" -Xrunprofiler:"); ! command.append("commun_shmem_id=").append(shmem).append(','); ! command.append(settings).append(' ').append(clazz).append(' ').append(arguments); ! Process proc=null; ! try { ! proc=Runtime.getRuntime().exec(command.toString(), null, new File(workdir)); ! } catch (IOException e) { ! throw new IllegalConnectorArgumentsException(bundle.getString("ERR_IOEXCEPTION"), ""); ! } ! // PENDING port==-1 ! IProf iprof=new IProf(new CommunSetupShMem(shmem, 256*1024)); ! try { ! iprof.run(); ! } catch (IProfException ipe) { ! throw new ConnectingException(bundle.getString("ERR_CONNECT")+ipe); ! } ! return new VirtualMachineImpl(iprof, proc); ! } ! ! /** ! * Returns the arguments accepted by this Connector and their default values. ! * The keys of the returned map are string argument names. The values are ! * {@link Connector.Argument} containing information about the argument ! * and its default value. ! * ! * @return the map associating argument names with argument information ! * and default value. ! */ ! public Map defaultArguments() { ! Map args=super.defaultArguments(); ! Connector.Argument arg; ! arg=new StringArgumentImpl(false, bundle.getString("Shmem"), ! bundle.getString("ShmemDesc"), "shmem"); ! arg.setValue(""); ! args.put(arg.name(), arg); ! return args; ! } /** *************** *** 88,91 **** --- 182,188 ---- /* * $Log$ + * Revision 1.4 2002/05/16 11:40:36 stolis + * First version of launching connectors. + * * Revision 1.3 2001/10/14 21:56:31 stolis * Connectors updated. |
From: Jan S. <st...@us...> - 2002-05-16 11:39:28
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect In directory usw-pr-cvs1:/tmp/cvs-serv21227 Modified Files: LaunchConnector.java Log Message: Settings argument added. Index: LaunchConnector.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/connect/LaunchConnector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** LaunchConnector.java 14 Oct 2001 21:56:31 -0000 1.3 --- LaunchConnector.java 16 May 2002 11:39:25 -0000 1.4 *************** *** 72,75 **** --- 72,79 ---- arg.setValue("\""); args.put(arg.name(), arg); + arg=new StringArgumentImpl(false, bundle.getString("Settings"), + bundle.getString("SettingsDesc"), "settings"); + arg.setValue(""); + args.put(arg.name(), arg); return args; } *************** *** 78,81 **** --- 82,88 ---- /* * $Log$ + * Revision 1.4 2002/05/16 11:39:25 stolis + * Settings argument added. + * * Revision 1.3 2001/10/14 21:56:31 stolis * Connectors updated. |
From: Jan S. <st...@us...> - 2002-05-16 11:38:23
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv20942 Modified Files: bundle.properties Log Message: Several messages internacionalized. Index: bundle.properties =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/bundle.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** bundle.properties 14 Oct 2001 21:55:06 -0000 1.2 --- bundle.properties 16 May 2002 11:38:20 -0000 1.3 *************** *** 47,48 **** --- 47,66 ---- SocketListenDesc=Connector that accepts socket connections initiated by other VMs. SocketAttachDesc=Connector that attaches by socket to other VM. + + ERR_MIS_SHMEM=Wrong or missing shared memory area address. + + ERR_CONNECT=Unable to connect to the profiled process: + + ERR_MIS_PORT=Wrong or missing port number. + + Settings=Settings + + SettingsDesc=Parameters of the profiler library. + + PortDesc=Port used for communication with the profiled process. + + Shmem=Shared Memory + + ShmemDesc=Shared memory used for the communication with the profiled process. + + ERR_IOEXCEPTION=Exception while executing profiled process: |
From: Jan S. <st...@us...> - 2002-05-16 11:37:23
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv20685 Modified Files: VirtualMachineManagerImpl.java Log Message: ShmemListenConnector removed and one small bug fixed. Index: VirtualMachineManagerImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/VirtualMachineManagerImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** VirtualMachineManagerImpl.java 29 Sep 2001 21:01:33 -0000 1.2 --- VirtualMachineManagerImpl.java 16 May 2002 11:37:20 -0000 1.3 *************** *** 40,44 **** private static final Connector[] allConnectors={new SocketLaunchConnector(), new ShmemLaunchConnector(), new SocketAttachConnector(), new ShmemAttachConnector(), ! new SocketListenConnector(), new ShmemListenConnector()}; /** * All VMs that are connected to the profiler. --- 40,44 ---- private static final Connector[] allConnectors={new SocketLaunchConnector(), new ShmemLaunchConnector(), new SocketAttachConnector(), new ShmemAttachConnector(), ! new SocketListenConnector()}; /** * All VMs that are connected to the profiler. *************** *** 59,63 **** List cons=new LinkedList(); for (int i=0; i<allConnectors.length; i++) { ! if (allConnectors[i].type()==type) { cons.add(allConnectors[i]); } --- 59,63 ---- List cons=new LinkedList(); for (int i=0; i<allConnectors.length; i++) { ! if ((allConnectors[i].type()&type)!=0) { cons.add(allConnectors[i]); } *************** *** 97,100 **** --- 97,103 ---- /* * $Log$ + * Revision 1.3 2002/05/16 11:37:20 stolis + * ShmemListenConnector removed and one small bug fixed. + * * Revision 1.2 2001/09/29 21:01:33 stolis * Plural added in licenses. |
From: Jan S. <st...@us...> - 2002-05-16 11:35:25
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv20003 Modified Files: VirtualMachineImpl.java Log Message: Process field added. Index: VirtualMachineImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/VirtualMachineImpl.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** VirtualMachineImpl.java 6 May 2002 18:04:16 -0000 1.5 --- VirtualMachineImpl.java 16 May 2002 11:35:22 -0000 1.6 *************** *** 38,42 **** --- 38,48 ---- private IProf iprof; private boolean isSuspendedVM; + private Process process=null; + /** + * Creates new VirtualMachineImpl. + * + * @param iprof corresponding <code>IProf</code> object. + */ public VirtualMachineImpl(IProf iprof) { this.iprof=iprof; *************** *** 44,47 **** --- 50,64 ---- /** + * Creates new VirtualMachineImpl. + * + * @param iprof corresponding <code>IProf</code> object. + * @param process corresponding <code>Process</code> object. + */ + public VirtualMachineImpl(IProf iprof, Process process) { + this.iprof=iprof; + this.process=process; + } + + /** * Enables/disables the garbage collection in the mirrored virtual machine. * *************** *** 92,98 **** * or <code>null</code> if it was not launched by a launching connector. */ ! public Process process() { ! //PENDING ! return null; } --- 109,114 ---- * or <code>null</code> if it was not launched by a launching connector. */ ! public Process process() { ! return process; } *************** *** 337,340 **** --- 353,359 ---- /* * $Log$ + * Revision 1.6 2002/05/16 11:35:22 stolis + * Process field added. + * * Revision 1.5 2002/05/06 18:04:16 vachis * temporary thing, only for compilation |
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime In directory usw-pr-cvs1:/tmp/cvs-serv25681 Modified Files: AllocThreadMethodR.java AllocThreadTraceR.java AllocTraceR.java AllocTypeMethodR.java AllocTypeR.java AllocTypeThreadMethodR.java AllocTypeThreadR.java AllocTypeThreadTraceR.java AllocTypeTraceR.java CPUThreadMethodR.java CPUThreadTraceR.java CPUTraceR.java ClassR.java DataR.java FieldR.java FrameR.java ImageR.java MethodR.java MonThreadMethodR.java MonThreadTraceR.java MonTraceR.java ThreadGroupR.java ThreadR.java Log Message: changed method names Index: AllocThreadMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocThreadMethodR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocThreadMethodR.java 23 Apr 2002 14:33:34 -0000 1.3 --- AllocThreadMethodR.java 15 May 2002 08:26:36 -0000 1.4 *************** *** 37,43 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.Thread; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 46,51 **** * @author Lukas Petru */ ! public class AllocThreadMethodR extends MultiRootDataR implements ! AllocThreadMethod { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,48 ---- * @author Lukas Petru */ ! public class AllocThreadMethodR extends MultiRootDataR implements ! AllocThreadMethodRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 86,95 **** * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); --- 83,92 ---- * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); *************** *** 98,106 **** /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocThreadMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } --- 95,103 ---- /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocThreadMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } *************** *** 128,141 **** refreshAllocTypeThreadMethods(); return roAllocTypeThreadMethods; ! } // ---------- return parents ! public Thread getParentThread() { needConstructed(); return thread; } ! ! public Method getParentMethod() { needConstructed(); return location; --- 125,138 ---- refreshAllocTypeThreadMethods(); return roAllocTypeThreadMethods; ! } // ---------- return parents ! public ThreadRef getThread() { needConstructed(); return thread; } ! ! public MethodRef getMethod() { needConstructed(); return location; *************** *** 143,164 **** // ---------- return roots of this object ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { return null; } ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 140,161 ---- // ---------- return roots of this object ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { return null; } ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 169,194 **** // ---------- profiler statistic ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ --- 166,191 ---- // ---------- profiler statistic ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ *************** *** 196,214 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadMethod(AllocTypeThreadMethod o) { allocTypeThreadMethods.add(o); } ! void addAllocThreadTrace(AllocThreadTrace o) { allocThreadTraces.add(o); } --- 193,211 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadMethod(AllocTypeThreadMethodRef o) { allocTypeThreadMethods.add(o); } ! void addAllocThreadTrace(AllocThreadTraceRef o) { allocThreadTraces.add(o); } *************** *** 278,282 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 275,279 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 291,295 **** public String toString() { ! return getThread() + "-" + getLocation(); } } --- 288,292 ---- public String toString() { ! return getThreadR() + "-" + getLocation(); } } Index: AllocThreadTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocThreadTraceR.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AllocThreadTraceR.java 23 Apr 2002 14:33:34 -0000 1.2 --- AllocThreadTraceR.java 15 May 2002 08:26:36 -0000 1.3 *************** *** 37,43 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.Thread; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 46,51 **** * @author Lukas Petru */ ! public class AllocThreadTraceR extends MultiRootDataR implements ! AllocThreadTrace { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,48 ---- * @author Lukas Petru */ ! public class AllocThreadTraceR extends MultiRootDataR implements ! AllocThreadTraceRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 84,93 **** * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocThreadTraceR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); --- 81,90 ---- * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocThreadTraceR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); *************** *** 96,104 **** /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocThreadTraceR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } --- 93,101 ---- /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocThreadTraceR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } *************** *** 116,133 **** return roAllocTypeThreadTraces; } ! // ---------- return parents ! public AllocThreadMethod getParentAllocThreadMethod() { needConstructed(); return method; } ! ! public Thread getParentThread() { needConstructed(); return thread; } ! ! public AllocTrace getParentAllocTrace() { needConstructed(); return location; --- 113,130 ---- return roAllocTypeThreadTraces; } ! // ---------- return parents ! public AllocThreadMethodRef getAllocThreadMethod() { needConstructed(); return method; } ! ! public ThreadRef getThread() { needConstructed(); return thread; } ! ! public AllocTraceRef getAllocTrace() { needConstructed(); return location; *************** *** 135,156 **** // ---------- return roots of this object ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { return null; } ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 132,153 ---- // ---------- return roots of this object ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { return null; } ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 161,186 **** // ---------- profiler statistic ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ --- 158,183 ---- // ---------- profiler statistic ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ *************** *** 188,202 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadTrace(AllocTypeThreadTrace o) { allocTypeThreadTraces.add(o); } --- 185,199 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadTrace(AllocTypeThreadTraceRef o) { allocTypeThreadTraces.add(o); } *************** *** 216,220 **** method=new AllocThreadMethodR(methodId, image); image.putObject(methodId, method); ! } isReady=true; // add to parents' lists --- 213,217 ---- method=new AllocThreadMethodR(methodId, image); image.putObject(methodId, method); ! } isReady=true; // add to parents' lists *************** *** 247,256 **** method=new AllocThreadMethodR(methodId, image); image.putObject(methodId, method); ! } // link to roots location=image.resolveAllocTrace(new Integer(parents. parentLeftObjId)); ! thread=method.getThread(); ! isReady=true; // add to parents' and root lists --- 244,253 ---- method=new AllocThreadMethodR(methodId, image); image.putObject(methodId, method); ! } // link to roots location=image.resolveAllocTrace(new Integer(parents. parentLeftObjId)); ! thread=method.getThreadR(); ! isReady=true; // add to parents' and root lists *************** *** 278,282 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 275,279 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 291,295 **** public String toString() { ! return getThread() + "-" + getLocation(); } } --- 288,292 ---- public String toString() { ! return getThreadR() + "-" + getLocation(); } } Index: AllocTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTraceR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocTraceR.java 14 May 2002 14:47:37 -0000 1.3 --- AllocTraceR.java 15 May 2002 08:26:36 -0000 1.4 *************** *** 37,42 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 45,49 **** * @author Lukas Petru */ ! public class AllocTraceR extends Location implements AllocTrace { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,47 ---- * @author Lukas Petru */ ! public class AllocTraceR extends Location implements AllocTraceRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 59,63 **** private final List frames=new ArrayList(0); private final List roFrames=Collections.unmodifiableList(frames); ! // parents private MethodR method; --- 57,61 ---- private final List frames=new ArrayList(0); private final List roFrames=Collections.unmodifiableList(frames); ! // parents private MethodR method; *************** *** 81,89 **** /** Constructs new object with info. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTraceR(IProf.sID sid, ImageR RtImage) { ! image = RtImage; objId = new Integer(sid.objId); construct((IProf.sTraceInfo) sid.info); --- 79,87 ---- /** Constructs new object with info. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTraceR(IProf.sID sid, ImageR RtImage) { ! image = RtImage; objId = new Integer(sid.objId); construct((IProf.sTraceInfo) sid.info); *************** *** 92,96 **** /** Creates object with only Id and no info / data. * @param oId Identification of object as assigned by communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ --- 90,94 ---- /** Creates object with only Id and no info / data. * @param oId Identification of object as assigned by communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ *************** *** 105,111 **** needConstructed(); return roFrames; ! } ! public Method getParentMethod() { needConstructed(); return method; --- 103,109 ---- needConstructed(); return roFrames; ! } ! public MethodRef getMethod() { needConstructed(); return method; *************** *** 117,121 **** image.extractMultiRoot(this, IProf.ALLOC_METHOD_TRACE_THREADS, image.allocThreadTraceFactory); ! } public List getAllocThreadTraces() { --- 115,119 ---- image.extractMultiRoot(this, IProf.ALLOC_METHOD_TRACE_THREADS, image.allocThreadTraceFactory); ! } public List getAllocThreadTraces() { *************** *** 128,132 **** image.extractMultiRoot(this, IProf.ALLOC_TRACE_OBJECTS, image.allocTypeTraceFactory); ! } public List getAllocTypeTraces() { --- 126,130 ---- image.extractMultiRoot(this, IProf.ALLOC_TRACE_OBJECTS, image.allocTypeTraceFactory); ! } public List getAllocTypeTraces() { *************** *** 138,170 **** // image getter method ! public VirtualMachineImage getVirtualMachineImage() { return image; } ! ! public VirtualMachineImage getParentVirtualMachineImage() { ! return image; ! } ! // statistics getter methods ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // refresh --- 136,164 ---- // image getter method ! public VirtualMachineImageRef getVirtualMachineImage() { return image; } ! // statistics getter methods ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // refresh *************** *** 176,215 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } ! // package / private ! void addAllocTypeTrace(AllocTypeTrace o) { allocTypeTraces.add(o); } ! void addAllocThreadTrace(AllocThreadTrace o) { allocThreadTraces.add(o); } // roots ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { return null; } ! ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { return null; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 170,209 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } ! // package / private ! void addAllocTypeTrace(AllocTypeTraceRef o) { allocTypeTraces.add(o); } ! void addAllocThreadTrace(AllocThreadTraceRef o) { allocThreadTraces.add(o); } // roots ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { return null; } ! ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { return null; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 229,242 **** /** Finishes object construction. * @param info <code>sTraceInfo</code> object with data from ! * communication layer. */ private void construct (IProf.sTraceInfo info) { ! Frame caller=null; int i; for (i=info.numFrames-1; i>=0; i--) { caller=new FrameR(info.frames[i], caller, image); frames.add(caller); ! } method=(MethodR) ((FrameR) frames.get(frames.size()-1)).getMethod(); isReady = true; --- 223,236 ---- /** Finishes object construction. * @param info <code>sTraceInfo</code> object with data from ! * communication layer. */ private void construct (IProf.sTraceInfo info) { ! FrameRef caller=null; int i; for (i=info.numFrames-1; i>=0; i--) { caller=new FrameR(info.frames[i], caller, image); frames.add(caller); ! } method=(MethodR) ((FrameR) frames.get(frames.size()-1)).getMethod(); isReady = true; *************** *** 255,260 **** } catch (IProfException e) { throw new RuntimeException(e); ! } ! construct(info); } } --- 249,254 ---- } catch (IProfException e) { throw new RuntimeException(e); ! } ! construct(info); } } *************** *** 277,281 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 271,275 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 283,287 **** setData(sid.alloc); } ! /** Returns number that identifies object for profiler library. */ Integer getId() { --- 277,281 ---- setData(sid.alloc); } ! /** Returns number that identifies object for profiler library. */ Integer getId() { *************** *** 290,294 **** public String toString() { ! return "trace of " + getParentMethod(); } } --- 284,288 ---- public String toString() { ! return "trace of " + getMethod(); } } Index: AllocTypeMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeMethodR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocTypeMethodR.java 23 Apr 2002 14:33:34 -0000 1.3 --- AllocTypeMethodR.java 15 May 2002 08:26:36 -0000 1.4 *************** *** 37,41 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 44,48 **** * @author Lukas Petru */ ! public class AllocTypeMethodR extends MultiRootDataR implements AllocTypeMethod { /** Tells if any data was loaded from profiled VM about this Type. */ --- 43,47 ---- * @author Lukas Petru */ ! public class AllocTypeMethodR extends MultiRootDataR implements AllocTypeMethodRef { /** Tells if any data was loaded from profiled VM about this Type. */ *************** *** 82,91 **** * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocTypeMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); --- 81,90 ---- * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocTypeMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); *************** *** 94,102 **** /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } --- 93,101 ---- /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } *************** *** 104,118 **** // ---------- return parents ! public AllocType getParentAllocType() { needConstructed(); return type; } ! ! public Method getParentMethod() { ! needConstructed(); ! return location; ! } ! ! public Method getMethod() { needConstructed(); return location; --- 103,112 ---- // ---------- return parents ! public TypeRef getType() { needConstructed(); return type; } ! ! public MethodRef getMethod() { needConstructed(); return location; *************** *** 120,141 **** // ---------- return roots of this object ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { needConstructed(); return type; } ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { return null; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 114,135 ---- // ---------- return roots of this object ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { needConstructed(); return type; } ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { return null; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 149,153 **** image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHOD_TRACES, image.allocTypeTraceFactory); ! } public List getAllocTypeTraces() { --- 143,147 ---- image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHOD_TRACES, image.allocTypeTraceFactory); ! } public List getAllocTypeTraces() { *************** *** 160,164 **** image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHOD_THREADS, image.allocTypeThreadMethodFactory); ! } public List getAllocTypeThreadMethods() { --- 154,158 ---- image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHOD_THREADS, image.allocTypeThreadMethodFactory); ! } public List getAllocTypeThreadMethods() { *************** *** 170,192 **** // ---------- profiler statistic ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh --- 164,186 ---- // ---------- profiler statistic ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh *************** *** 197,215 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! void addAllocTypeTrace(AllocTypeTrace o) { allocTypeTraces.add(o); } ! void addAllocTypeThreadMethod(AllocTypeThreadMethod o) { allocTypeThreadMethods.add(o); } --- 191,209 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! void addAllocTypeTrace(AllocTypeTraceRef o) { allocTypeTraces.add(o); } ! void addAllocTypeThreadMethod(AllocTypeThreadMethodRef o) { allocTypeThreadMethods.add(o); } *************** *** 243,247 **** } catch (IProfException e) { throw new RuntimeException(e); ! } // resolve roots type=image.resolveAllocType(new Integer(parents.parentUpObjId)); --- 237,241 ---- } catch (IProfException e) { throw new RuntimeException(e); ! } // resolve roots type=image.resolveAllocType(new Integer(parents.parentUpObjId)); *************** *** 271,275 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 265,269 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 282,288 **** return objId; } ! public String toString() { ! return getAllocType() + "-" + getLocation(); } } --- 276,282 ---- return objId; } ! public String toString() { ! return getTypeR() + "-" + getLocation(); } } Index: AllocTypeR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeR.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AllocTypeR.java 10 Apr 2002 16:01:15 -0000 1.1 --- AllocTypeR.java 15 May 2002 08:26:36 -0000 1.2 *************** *** 37,42 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 45,49 **** * @author Lukas Petru */ ! public class AllocTypeR extends DataR implements AllocType { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,47 ---- * @author Lukas Petru */ ! public class AllocTypeR extends DataR implements TypeRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 79,90 **** allocTypeThreads); ! /** This constructor will find it's component class on its own through * RtImage. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeR(IProf.sID sid, ImageR RtImage) { ! image = RtImage; objId = new Integer(sid.objId); construct((IProf.sObjectInfo) sid.info); --- 77,88 ---- allocTypeThreads); ! /** This constructor will find it's component class on its own through * RtImage. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeR(IProf.sID sid, ImageR RtImage) { ! image = RtImage; objId = new Integer(sid.objId); construct((IProf.sObjectInfo) sid.info); *************** *** 93,97 **** /** Creates object with only Id and no data. * @param oId Identification of object as assigned by communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ --- 91,95 ---- /** Creates object with only Id and no data. * @param oId Identification of object as assigned by communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ *************** *** 108,118 **** return name; } ! /** Returns component class of this type. */ ! public Class getComponentClass() { needConstructed(); return componentClass; } ! /** Returns true, if this type is an array. */ public boolean isArray() { --- 106,116 ---- return name; } ! /** Returns component class of this type. */ ! public ClassRef getComponentClass() { needConstructed(); return componentClass; } ! /** Returns true, if this type is an array. */ public boolean isArray() { *************** *** 120,124 **** return isArray; } ! /** Returns true, if this type is an array of primitive component type. */ public boolean isArrayOfPrimitives() { --- 118,122 ---- return isArray; } ! /** Returns true, if this type is an array of primitive component type. */ public boolean isArrayOfPrimitives() { *************** *** 137,141 **** o.refreshAllocTypeTraces(); } ! } public List getAllocTypeTraces() { --- 135,139 ---- o.refreshAllocTypeTraces(); } ! } public List getAllocTypeTraces() { *************** *** 148,152 **** image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHODS, image.allocTypeMethodFactory); ! } public List getAllocTypeMethods() { --- 146,150 ---- image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHODS, image.allocTypeMethodFactory); ! } public List getAllocTypeMethods() { *************** *** 159,163 **** image.extractMultiRoot(this, IProf.ALLOC_OBJECT_THREADS, image.allocTypeThreadFactory); ! } public List getAllocTypeThreads() { --- 157,161 ---- image.extractMultiRoot(this, IProf.ALLOC_OBJECT_THREADS, image.allocTypeThreadFactory); ! } public List getAllocTypeThreads() { *************** *** 169,201 **** // image getter method ! public VirtualMachineImage getVirtualMachineImage () { ! return image; ! } ! ! public VirtualMachineImage getParentVirtualMachineImage () { return image; } ! // statistics getter methods ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // refresh --- 167,195 ---- // image getter method ! public VirtualMachineImageRef getVirtualMachineImage () { return image; } ! // statistics getter methods ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // refresh *************** *** 207,228 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // roots ! public AllocTypeR getAllocType() { return this; } ! ! public ThreadR getThread() { return null; } ! public Location getLocation() { return null; --- 201,222 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // roots ! public AllocTypeR getTypeR() { return this; } ! ! public ThreadR getThreadR() { return null; } ! public Location getLocation() { return null; *************** *** 231,243 **** // private / package ! void addAllocTypeMethod(AllocTypeMethod o) { allocTypeMethods.add(o); } ! void addAllocTypeTrace(AllocTypeTrace o) { allocTypeTraces.add(o); } ! void addAllocTypeThread(AllocTypeThread o) { allocTypeThreads.add(o); } --- 225,237 ---- // private / package ! void addAllocTypeMethod(AllocTypeMethodRef o) { allocTypeMethods.add(o); } ! void addAllocTypeTrace(AllocTypeTraceRef o) { allocTypeTraces.add(o); } ! void addAllocTypeThread(AllocTypeThreadRef o) { allocTypeThreads.add(o); } *************** *** 295,306 **** break; default: ! name = ""; } isReady = true; } ! /** Finishes Type object construction. This method will find component * class of object on its own through image. ! * @param info <code>sObjectInfo</code> object with data from * communication layer. */ --- 289,300 ---- break; default: ! name = ""; } isReady = true; } ! /** Finishes Type object construction. This method will find component * class of object on its own through image. ! * @param info <code>sObjectInfo</code> object with data from * communication layer. */ *************** *** 328,333 **** } catch (IProfException e) { throw new RuntimeException(e); ! } ! construct(info); } } --- 322,327 ---- } catch (IProfException e) { throw new RuntimeException(e); ! } ! construct(info); } } *************** *** 350,354 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 344,348 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 361,365 **** return objId; } ! public String toString () { return getName(); --- 355,359 ---- return objId; } ! public String toString () { return getName(); Index: AllocTypeThreadMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeThreadMethodR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocTypeThreadMethodR.java 23 Apr 2002 14:33:34 -0000 1.3 --- AllocTypeThreadMethodR.java 15 May 2002 08:26:36 -0000 1.4 *************** *** 37,43 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.Thread; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 46,51 **** * @author Lukas Petru */ ! public class AllocTypeThreadMethodR extends MultiRootDataR implements ! AllocTypeThreadMethod { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,48 ---- * @author Lukas Petru */ ! public class AllocTypeThreadMethodR extends MultiRootDataR implements ! AllocTypeThreadMethodRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 87,96 **** * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocTypeThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); --- 84,93 ---- * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocTypeThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); *************** *** 99,107 **** /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeThreadMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } --- 96,104 ---- /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeThreadMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } *************** *** 119,136 **** return roAllocTypeThreadTraces; } ! // ---------- return parents ! public AllocTypeMethod getParentAllocTypeMethod() { needConstructed(); return typeMethod; } ! public AllocThreadMethod getParentAllocThreadMethod() { needConstructed(); return threadMethod; } ! ! public AllocTypeThread getParentAllocTypeThread() { needConstructed(); return typeThread; --- 116,133 ---- return roAllocTypeThreadTraces; } ! // ---------- return parents ! public AllocTypeMethodRef getAllocTypeMethod() { needConstructed(); return typeMethod; } ! public AllocThreadMethodRef getAllocThreadMethod() { needConstructed(); return threadMethod; } ! ! public AllocTypeThreadRef getAllocTypeThread() { needConstructed(); return typeThread; *************** *** 138,160 **** // ---------- return roots of this object ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { needConstructed(); return type; } ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 135,157 ---- // ---------- return roots of this object ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { needConstructed(); return type; } ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 165,190 **** // ---------- profiler statistic ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ --- 162,187 ---- // ---------- profiler statistic ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ *************** *** 192,206 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadTrace(AllocTypeThreadTrace o) { allocTypeThreadTraces.add(o); } --- 189,203 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadTrace(AllocTypeThreadTraceRef o) { allocTypeThreadTraces.add(o); } *************** *** 221,225 **** typeMethod=new AllocTypeMethodR(typeMethodId, image); image.putObject(typeMethodId, typeMethod); ! } Integer typeThreadId=new Integer(sid.parentUpObjId); if (image.containsId(typeThreadId)) --- 218,222 ---- typeMethod=new AllocTypeMethodR(typeMethodId, image); image.putObject(typeMethodId, typeMethod); ! } Integer typeThreadId=new Integer(sid.parentUpObjId); if (image.containsId(typeThreadId)) *************** *** 228,232 **** typeThread=new AllocTypeThreadR(typeThreadId, image); image.putObject(typeThreadId, typeThread); ! } Integer threadMethodId=new Integer(sid.parentRightObjId); if (image.containsId(threadMethodId)) --- 225,229 ---- typeThread=new AllocTypeThreadR(typeThreadId, image); image.putObject(typeThreadId, typeThread); ! } Integer threadMethodId=new Integer(sid.parentRightObjId); if (image.containsId(threadMethodId)) *************** *** 235,239 **** threadMethod=new AllocThreadMethodR(threadMethodId, image); image.putObject(threadMethodId, threadMethod); ! } isReady=true; // add to parents' lists --- 232,236 ---- threadMethod=new AllocThreadMethodR(threadMethodId, image); image.putObject(threadMethodId, threadMethod); ! } isReady=true; // add to parents' lists *************** *** 267,271 **** typeMethod=new AllocTypeMethodR(typeMethodId, image); image.putObject(typeMethodId, typeMethod); ! } Integer typeThreadId=new Integer(parents.parentUpObjId); if (image.containsId(typeThreadId)) --- 264,268 ---- typeMethod=new AllocTypeMethodR(typeMethodId, image); image.putObject(typeMethodId, typeMethod); ! } Integer typeThreadId=new Integer(parents.parentUpObjId); if (image.containsId(typeThreadId)) *************** *** 274,278 **** typeThread=new AllocTypeThreadR(typeThreadId, image); image.putObject(typeThreadId, typeThread); ! } Integer threadMethodId=new Integer(parents.parentRightObjId); if (image.containsId(threadMethodId)) --- 271,275 ---- typeThread=new AllocTypeThreadR(typeThreadId, image); image.putObject(typeThreadId, typeThread); ! } Integer threadMethodId=new Integer(parents.parentRightObjId); if (image.containsId(threadMethodId)) *************** *** 281,289 **** threadMethod=new AllocThreadMethodR(threadMethodId, image); image.putObject(threadMethodId, threadMethod); ! } // link to roots ! type=typeThread.getAllocType(); ! thread=typeThread.getThread(); location=(MethodR) typeMethod.getLocation(); --- 278,286 ---- threadMethod=new AllocThreadMethodR(threadMethodId, image); image.putObject(threadMethodId, threadMethod); ! } // link to roots ! type=typeThread.getTypeR(); ! thread=typeThread.getThreadR(); location=(MethodR) typeMethod.getLocation(); *************** *** 313,317 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 310,314 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 326,330 **** public String toString() { ! return getAllocType() + "-" + getThread() + "-" + getLocation(); } } --- 323,327 ---- public String toString() { ! return getTypeR() + "-" + getThreadR() + "-" + getLocation(); } } Index: AllocTypeThreadR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeThreadR.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** AllocTypeThreadR.java 23 Apr 2002 14:33:34 -0000 1.4 --- AllocTypeThreadR.java 15 May 2002 08:26:36 -0000 1.5 *************** *** 37,43 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.Thread; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 46,50 **** * @author Lukas Petru */ ! public class AllocTypeThreadR extends MultiRootDataR implements AllocTypeThread { /** Tells if any data was loaded from profiled VM about this Type. */ --- 43,47 ---- * @author Lukas Petru */ ! public class AllocTypeThreadR extends MultiRootDataR implements AllocTypeThreadRef { /** Tells if any data was loaded from profiled VM about this Type. */ *************** *** 84,93 **** * Should be null if N/A. * @param sid Object with data from communication layer. !... [truncated message content] |
From: Pavel V. <va...@us...> - 2002-05-14 21:33:48
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv9020 Modified Files: SnapshotImpl.java Log Message: lists of traces Index: SnapshotImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/SnapshotImpl.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** SnapshotImpl.java 7 May 2002 21:11:38 -0000 1.21 --- SnapshotImpl.java 14 May 2002 21:33:46 -0000 1.22 *************** *** 49,52 **** --- 49,56 ---- private final List arenas = new ArrayList(); private final List gcs = new ArrayList(); + private final List allocTraces = new ArrayList(); + private final List cpuTraces = new ArrayList(); + private final List monTraces = new ArrayList(); + // unmodifiable variants of lists *************** *** 59,62 **** --- 63,69 ---- private final List roArenas = Collections.unmodifiableList( arenas ); private final List roGcs = Collections.unmodifiableList( gcs ); + private final List roAllocTraces = Collections.unmodifiableList( allocTraces ); + private final List roCpuTraces = Collections.unmodifiableList( cpuTraces ); + private final List roMonTraces = Collections.unmodifiableList( monTraces ); private Configuration conf; *************** *** 303,307 **** /**Return unmodifiable list of objects with information about arenas. * ! *@return unmodifiable list of arenas. */ public List getArenas() { --- 310,314 ---- /**Return unmodifiable list of objects with information about arenas. * ! *@return unmodifiable list <code>List</code> of {@link ArenaRef} objects. */ public List getArenas() { *************** *** 309,315 **** } ! /**Return list of objects with information about arenas. * ! *@return list of arenas. */ public List getMethods() { --- 316,322 ---- } ! /**Return unmodifiable list of objects with information about methods. * ! *@return unmodifiable <code>List</code> of {@link MethodRef} objects. */ public List getMethods() { *************** *** 317,335 **** } ! //is it usefull? ! public List getMonTraces() { ! return null; ! //PENDING } public List getCPUTraces() { ! return null; ! //PENDING } public List getAllocTraces() { ! return null; ! //PENDING } --- 324,352 ---- } ! /**Return unmodifiable list of objects with information about traces with ! * monitors data. ! * ! *@return unmodifiable <code>List</code> of {@link MonTraceRef} objects. ! */ public List getMonTraces() { ! return roMonTraces; } + /**Return unmodifiable list of objects with information about traces with + * CPU data. + * + *@return unmodifiable <code>List</code> of {@link CPUTraceRef} objects. + */ public List getCPUTraces() { ! return roCpuTraces; } + /**Return unmodifiable list of objects with information about traces with + * allocations data. + * + *@return unmodifiable <code>List</code> of {@link AllocTraceRef} objects. + */ public List getAllocTraces() { ! return roAllocTraces; } *************** *** 405,409 **** //extract( methods, null, IProf.CPU_METHOD_TRACES, // CPUTraces_MinVal, iprof ); ! extract( null, null, IProf.CPU_TRACES, conf.CPUTraces_MinVal, iprof ); } --- 422,426 ---- //extract( methods, null, IProf.CPU_METHOD_TRACES, // CPUTraces_MinVal, iprof ); ! extract( null, cpuTraces, IProf.CPU_TRACES, conf.CPUTraces_MinVal, iprof ); } *************** *** 442,446 **** //extract( methods, null, IProf.ALLOC_METHOD_TRACES, // AllocTraces_MinVal, iprof ); ! extract( null, null, IProf.ALLOC_TRACES, conf.AllocTraces_MinVal, iprof ); if ( conf.withTypes ) { --- 459,463 ---- //extract( methods, null, IProf.ALLOC_METHOD_TRACES, // AllocTraces_MinVal, iprof ); ! extract( null, allocTraces, IProf.ALLOC_TRACES, conf.AllocTraces_MinVal, iprof ); if ( conf.withTypes ) { *************** *** 483,487 **** //extract( methods, null, IProf.MON_METHOD_TRACES, // IProf.NO_OPTIONAL_ARG, iprof ); ! extract( null, null, IProf.MON_TRACES, IProf.NO_OPTIONAL_ARG, iprof ); } --- 500,504 ---- //extract( methods, null, IProf.MON_METHOD_TRACES, // IProf.NO_OPTIONAL_ARG, iprof ); ! extract( null, monTraces, IProf.MON_TRACES, IProf.NO_OPTIONAL_ARG, iprof ); } *************** *** 700,705 **** ((MethodData) libIDs.get( new Integer(trcInfo.frames[i].methodObjId ))), ! (i==0) ? null : ((FrameData) frames.get(i-1)) ! )); return frames; }; --- 717,721 ---- ((MethodData) libIDs.get( new Integer(trcInfo.frames[i].methodObjId ))), ! (i==0) ? null : ((FrameData) frames.get(i-1)) )); return frames; }; *************** *** 1103,1111 **** //FIXME: ! //to fill list of traces ! ! //GCRef, ArenaRef, CallTree, //TODO: // write exception handling code properly // filters --- 1119,1126 ---- //FIXME: ! //GCRef, ArenaRef //TODO: + //? shloud I test a duplicity in lists? // write exception handling code properly // filters *************** *** 1116,1119 **** --- 1131,1137 ---- /* * $Log$ + * Revision 1.22 2002/05/14 21:33:46 vachis + * lists of traces + * * Revision 1.21 2002/05/07 21:11:38 vachis * fix creation of fields, frames |
From: Pavel V. <va...@us...> - 2002-05-14 21:33:04
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv8719 Modified Files: MonTraceData.java Log Message: fix in siblings Index: MonTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonTraceData.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** MonTraceData.java 14 May 2002 14:05:37 -0000 1.11 --- MonTraceData.java 14 May 2002 21:33:01 -0000 1.12 *************** *** 154,158 **** */ public AllocTraceRef getSiblingAlloc() { ! ListIterator itr = getMethod().getCPUTraces().listIterator(); AllocTraceRef trace; --- 154,158 ---- */ public AllocTraceRef getSiblingAlloc() { ! ListIterator itr = getMethod().getAllocTraces().listIterator(); AllocTraceRef trace; *************** *** 191,194 **** --- 191,197 ---- /* * $Log$ + * Revision 1.12 2002/05/14 21:33:01 vachis + * fix in siblings + * * Revision 1.11 2002/05/14 14:05:37 vachis * "cross" methods |
From: Pavel V. <va...@us...> - 2002-05-14 21:32:42
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv8611 Modified Files: ClassData.java Log Message: no message Index: ClassData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ClassData.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** ClassData.java 7 May 2002 21:11:38 -0000 1.12 --- ClassData.java 14 May 2002 21:32:39 -0000 1.13 *************** *** 104,108 **** void addMethod(MethodData method) { methods.add( method ); - //pending? exception if method is in list } --- 104,107 ---- *************** *** 191,194 **** --- 190,196 ---- /* * $Log$ + * Revision 1.13 2002/05/14 21:32:39 vachis + * no message + * * Revision 1.12 2002/05/07 21:11:38 vachis * fix creation of fields, frames |
From: Pavel V. <va...@us...> - 2002-05-14 21:32:16
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv8480 Modified Files: AllocThreadMethodData.java AllocThreadTraceData.java AllocTraceData.java AllocTypeMethodData.java AllocTypeThreadData.java AllocTypeThreadMethodData.java AllocTypeTraceData.java Log Message: "cross" methods Index: AllocThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadMethodData.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** AllocThreadMethodData.java 8 May 2002 08:08:57 -0000 1.15 --- AllocThreadMethodData.java 14 May 2002 21:32:12 -0000 1.16 *************** *** 83,87 **** void addType(AllocTypeThreadMethodData allocType) { allocTypeThreadMethods.add(allocType); - //pending MAP } --- 83,86 ---- *************** *** 93,97 **** void addTrace(AllocThreadTraceData trace) { allocThreadTraces.add(trace); - //pending MAP } --- 92,95 ---- *************** *** 135,140 **** */ public AllocThreadTraceRef getAllocThreadTrace(AllocTraceRef peer) { return null; - //PENDING } --- 133,145 ---- */ public AllocThreadTraceRef getAllocThreadTrace(AllocTraceRef peer) { + ListIterator itr = getAllocThreadTraces().listIterator(); + AllocThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (AllocThreadTraceRef) itr.next(); + if ( obj.getAllocTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 159,164 **** */ public AllocTypeThreadMethodRef getAllocTypeThreadMethod(TypeRef peer) { ! return null; ! //PENDING } --- 164,176 ---- */ public AllocTypeThreadMethodRef getAllocTypeThreadMethod(TypeRef peer) { ! ListIterator itr = getAllocTypeThreadMethods().listIterator(); ! AllocTypeThreadMethodData obj; ! ! while (itr.hasNext()) { ! obj = (AllocTypeThreadMethodData) itr.next(); ! if ( obj.getType().equals( peer ) ) ! return obj; ! } ! return null; } *************** *** 193,196 **** --- 205,211 ---- /* * $Log$ + * Revision 1.16 2002/05/14 21:32:12 vachis + * "cross" methods + * * Revision 1.15 2002/05/08 08:08:57 vachis * siblings Index: AllocThreadTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadTraceData.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** AllocThreadTraceData.java 8 May 2002 08:08:57 -0000 1.15 --- AllocThreadTraceData.java 14 May 2002 21:32:12 -0000 1.16 *************** *** 82,86 **** void addType(AllocTypeThreadTraceData allocType) { allocTypeThreadTraces.add(allocType); - //pending MAP } --- 82,85 ---- *************** *** 137,142 **** */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(TypeRef peer) { return null; - //PENDING } --- 136,148 ---- */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(TypeRef peer) { + ListIterator itr = getAllocTypeThreadTraces().listIterator(); + AllocTypeThreadTraceData obj; + + while (itr.hasNext()) { + obj = (AllocTypeThreadTraceData) itr.next(); + if ( obj.getType().equals( peer ) ) + return obj; + } return null; } *************** *** 171,174 **** --- 177,183 ---- /* * $Log$ + * Revision 1.16 2002/05/14 21:32:12 vachis + * "cross" methods + * * Revision 1.15 2002/05/08 08:08:57 vachis * siblings Index: AllocTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTraceData.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** AllocTraceData.java 13 May 2002 21:25:56 -0000 1.19 --- AllocTraceData.java 14 May 2002 21:32:12 -0000 1.20 *************** *** 86,90 **** void addType(AllocTypeTraceData allocType) { allocTypeTraces.add(allocType); - //pending MAP } --- 86,89 ---- *************** *** 96,100 **** void addThread(AllocThreadTraceData thread) { allocThreadTraces.add(thread); - //pending MAP } --- 95,98 ---- *************** *** 149,154 **** */ public AllocThreadTraceRef getAllocThreadTrace(ThreadRef peer) { return null; - //PENDING } --- 147,159 ---- */ public AllocThreadTraceRef getAllocThreadTrace(ThreadRef peer) { + ListIterator itr = getAllocThreadTraces().listIterator(); + AllocThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (AllocThreadTraceRef) itr.next(); + if ( obj.getThread().equals( peer ) ) + return obj; + } return null; } *************** *** 171,176 **** */ public AllocTypeTraceRef getAllocTypeTrace(TypeRef peer) { ! return null; ! //PENDING } --- 176,188 ---- */ public AllocTypeTraceRef getAllocTypeTrace(TypeRef peer) { ! ListIterator itr = getAllocTypeTraces().listIterator(); ! AllocTypeTraceRef obj; ! ! while (itr.hasNext()) { ! obj = (AllocTypeTraceRef) itr.next(); ! if ( obj.getType().equals( peer ) ) ! return obj; ! } ! return null; } *************** *** 185,192 **** public CPUTraceRef getSiblingCPU() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! CPUTraceData trace; while ( itr.hasNext() ) { ! trace = (CPUTraceData) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; --- 197,204 ---- public CPUTraceRef getSiblingCPU() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! CPUTraceRef trace; while ( itr.hasNext() ) { ! trace = (CPUTraceRef) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; *************** *** 202,210 **** */ public MonTraceRef getSiblingMon() { ! ListIterator itr = getMethod().getCPUTraces().listIterator(); ! MonTraceData trace; while ( itr.hasNext() ) { ! trace = (MonTraceData) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; --- 214,222 ---- */ public MonTraceRef getSiblingMon() { ! ListIterator itr = getMethod().getMonTraces().listIterator(); ! MonTraceRef trace; while ( itr.hasNext() ) { ! trace = (MonTraceRef) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; *************** *** 221,224 **** --- 233,239 ---- /* * $Log$ + * Revision 1.20 2002/05/14 21:32:12 vachis + * "cross" methods + * * Revision 1.19 2002/05/13 21:25:56 vachis * use virtual methods in getting of siblings Index: AllocTypeMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeMethodData.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** AllocTypeMethodData.java 6 May 2002 17:32:13 -0000 1.5 --- AllocTypeMethodData.java 14 May 2002 21:32:12 -0000 1.6 *************** *** 85,89 **** void addTrace(AllocTypeTraceData trace) { allocTypeTraces.add(trace); - //pending MAP } --- 85,88 ---- *************** *** 97,101 **** void addThread(AllocTypeThreadMethodData thread) { allocTypeThreadMethods.add(thread); - //pending MAP } --- 96,99 ---- *************** *** 141,146 **** */ public AllocTypeTraceRef getAllocTypeTrace(AllocTraceRef peer) { return null; - //PENDING } --- 139,151 ---- */ public AllocTypeTraceRef getAllocTypeTrace(AllocTraceRef peer) { + ListIterator itr = getAllocTypeTraces().listIterator(); + AllocTypeTraceRef obj; + + while (itr.hasNext()) { + obj = (AllocTypeTraceRef) itr.next(); + if ( obj.getAllocTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 164,169 **** */ public AllocTypeThreadMethodRef getAllocTypeThreadMethod(ThreadRef peer) { return null; - //PENDING } --- 169,181 ---- */ public AllocTypeThreadMethodRef getAllocTypeThreadMethod(ThreadRef peer) { + ListIterator itr = getAllocTypeThreadMethods().listIterator(); + AllocTypeThreadMethodData obj; + + while (itr.hasNext()) { + obj = (AllocTypeThreadMethodData) itr.next(); + if ( obj.getThread().equals( peer ) ) + return obj; + } return null; } *************** *** 175,178 **** --- 187,193 ---- /* * $Log$ + * Revision 1.6 2002/05/14 21:32:12 vachis + * "cross" methods + * * Revision 1.5 2002/05/06 17:32:13 vachis * new api implemention Index: AllocTypeThreadData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeThreadData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AllocTypeThreadData.java 6 May 2002 17:33:01 -0000 1.1 --- AllocTypeThreadData.java 14 May 2002 21:32:12 -0000 1.2 *************** *** 84,88 **** void addMethod(AllocTypeThreadMethodData method) { allocTypeThreadMethods.add(method); - //pending MAP } --- 84,87 ---- *************** *** 96,100 **** void addTrace(AllocTypeThreadTraceData trace) { allocTypeThreadTraces.add(trace); - //pending MAP } --- 95,98 ---- *************** *** 142,147 **** */ public AllocTypeThreadMethodRef getAllocTypeThreadMethod(MethodRef peer) { return null; - //PENDING } --- 140,152 ---- */ public AllocTypeThreadMethodRef getAllocTypeThreadMethod(MethodRef peer) { + ListIterator itr = getAllocTypeThreadMethods().listIterator(); + AllocTypeThreadMethodData obj; + + while (itr.hasNext()) { + obj = (AllocTypeThreadMethodData) itr.next(); + if ( obj.getMethod().equals( peer ) ) + return obj; + } return null; } *************** *** 166,171 **** */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(AllocTraceRef peer) { return null; - //PENDING } --- 171,183 ---- */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(AllocTraceRef peer) { + ListIterator itr = getAllocTypeThreadTraces().listIterator(); + AllocTypeThreadTraceData obj; + + while (itr.hasNext()) { + obj = (AllocTypeThreadTraceData) itr.next(); + if ( obj.getAllocTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 177,180 **** --- 189,195 ---- /* * $Log$ + * Revision 1.2 2002/05/14 21:32:12 vachis + * "cross" methods + * * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention Index: AllocTypeThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeThreadMethodData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AllocTypeThreadMethodData.java 6 May 2002 17:33:01 -0000 1.1 --- AllocTypeThreadMethodData.java 14 May 2002 21:32:12 -0000 1.2 *************** *** 87,91 **** void addTrace(AllocTypeThreadTraceData trace) { allocTypeThreadTraces.add(trace); - //pending MAP } --- 87,90 ---- *************** *** 141,146 **** */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(AllocTraceRef peer) { return null; - //PENDING } --- 140,152 ---- */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(AllocTraceRef peer) { + ListIterator itr = getAllocTypeThreadTraces().listIterator(); + AllocTypeThreadTraceData obj; + + while (itr.hasNext()) { + obj = (AllocTypeThreadTraceData) itr.next(); + if ( obj.getAllocTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 181,184 **** --- 187,193 ---- /* * $Log$ + * Revision 1.2 2002/05/14 21:32:12 vachis + * "cross" methods + * * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention Index: AllocTypeTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeTraceData.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** AllocTypeTraceData.java 6 May 2002 17:32:13 -0000 1.5 --- AllocTypeTraceData.java 14 May 2002 21:32:12 -0000 1.6 *************** *** 81,85 **** void addThread(AllocTypeThreadTraceData thread) { allocTypeThreadTraces.add(thread); - //pending MAP } --- 81,84 ---- *************** *** 135,140 **** */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(ThreadRef peer) { return null; - //PENDING } --- 134,146 ---- */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(ThreadRef peer) { + ListIterator itr = getAllocTypeThreadTraces().listIterator(); + AllocTypeThreadTraceData obj; + + while (itr.hasNext()) { + obj = (AllocTypeThreadTraceData) itr.next(); + if ( obj.getAllocTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 146,149 **** --- 152,158 ---- /* * $Log$ + * Revision 1.6 2002/05/14 21:32:12 vachis + * "cross" methods + * * Revision 1.5 2002/05/06 17:32:13 vachis * new api implemention |
From: Lukas P. <pe...@us...> - 2002-05-14 14:47:42
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime In directory usw-pr-cvs1:/tmp/cvs-serv3650 Modified Files: AllocTraceR.java CPUTraceR.java ImageR.java MethodR.java MonTraceR.java ThreadR.java Added Files: CPUThreadMethodR.java CPUThreadTraceR.java MonThreadMethodR.java MonThreadTraceR.java Log Message: added CPU + Mon --- NEW FILE: CPUThreadMethodR.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"); you may not use this file except * in compliance with the License. A copy of the License is available * at http://www.sun.com/ * * The Original Code is the Java Profiler module. The Initial Developers * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. * * Portions created by Jan Stola are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Pavel Vacha are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Michal Pise are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Petr Luner are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Lukas Petru are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Marek Przeczek are Copyright (C) 2000-2001. * All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.realtime; import java.util.*; import net.sourceforge.javaprofiler.api.*; import net.sourceforge.javaprofiler.api.Class; import net.sourceforge.javaprofiler.api.Thread; import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; /** Implementation of API CPUThreadMethod * @author Lukas Petru */ public class CPUThreadMethodR extends MultiRootDataR implements CPUThreadMethod { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; /** VM Image that constructed this object. */ private ImageR image; /** Object identification. */ private Integer objId; // roots to which this object is linked private ThreadR thread; private MethodR location; // parents // CPU info private long hits; private long pureTime; // lists for children private final List cpuThreadTraces=new ArrayList(0); // unmodifiable variants of lists for children private final List roCPUThreadTraces=Collections.unmodifiableList( cpuThreadTraces); /** Constructs multi-rooted object * @param typeId Identification of <code>AllocTypeR</code> object. Should * be null if N/A. * @param threadId Identification of <code>ThreadR</code> object. Should * be null if N/A. * @param locationId Identification of <code>Location</code> object. * Should be null if N/A. * @param sid Object with data from communication layer. * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ CPUThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); } /** Constructs object with only <code>ID</code>. * @param oId Object identification. * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ CPUThreadMethodR(Integer oId, ImageR RtImage) { image=RtImage; objId=oId; } // ---------- return child Lists public void refreshCPUThreadTraces() { image.extractMultiRoot(this, IProf.CPU_THREAD_METHOD_TRACES, image.cpuThreadTraceFactory); } public List getCPUThreadTraces() { if ( image.getAlwaysRefresh() ) refreshCPUThreadTraces(); return roCPUThreadTraces; } // ---------- return parents public Thread getParentThread() { needConstructed(); return thread; } public Method getParentMethod() { needConstructed(); return location; } // ---------- return roots of this object /** Returns AllocType root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public AllocTypeR getAllocType() { return null; } /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public ThreadR getThread() { needConstructed(); return thread; } /** Returns Location root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public Location getLocation() { needConstructed(); return location; } // ---------- profiler statistic public long getNumOfHits() { conditionalRefresh(); return hits; } public long getPureTime() { conditionalRefresh(); return pureTime; } // ---------- refresh /** Refreshes statistics. */ public void refresh() { IProf.sData data; try { data = image.getIProf().getData(objId.intValue(), IProf.CPU_DATA); } catch (IProfException e) { throw new RuntimeException(e); } setData((IProf.sCpuStatData) data.statData); } // ---------- private / package void addCPUThreadTrace(CPUThreadTrace o) { cpuThreadTraces.add(o); } /** Finishes full object construction. */ void construct(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid) { if (! isReady) { // resolve roots thread=image.resolveThread(threadId); location=image.resolveMethod(locationId); // resolve parents isReady=true; // add to parents' lists thread.addCPUThreadMethod(this); location.addCPUThreadMethod(this); } } /** Determines whether refresh should be done and does, if so. */ private void conditionalRefresh() { if (image.getAlwaysRefresh()) refresh(); } private void needConstructed() { if (!isReady) { IProf.sParents parents; try { parents=image.getIProf().getParents(objId.intValue()); } catch (IProfException e) { throw new RuntimeException(e); } // link to parents Integer threadId=new Integer(parents.parentUpObjId); thread=image.resolveThread(threadId); Integer locationId=new Integer(parents.parentLeftObjId); location=image.resolveMethod(locationId); // link to roots // (same as parents) isReady=true; // add to parents' lists thread.addCPUThreadMethod(this); location.addCPUThreadMethod(this); } } /** Finishes object construction with info gained from profiled VM. * @param sid Object info. */ void construct(IProf.sID sid) { // not yet determined, how to use this method } /** Fills object with data gained from profiled VM. * @param data Data. */ void setData(IProf.sCpuStatData cpuData) { hits=cpuData.hits; pureTime=cpuData.pureTime; } /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ void setData(IProf.sID sid) { setData(sid.cpu); } /** Returns number that identifies object for profiler library. */ Integer getId() { return objId; } public String toString() { return getThread() + "-" + getLocation(); } } --- NEW FILE: CPUThreadTraceR.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"); you may not use this file except * in compliance with the License. A copy of the License is available * at http://www.sun.com/ * * The Original Code is the Java Profiler module. The Initial Developers * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. * * Portions created by Jan Stola are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Pavel Vacha are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Michal Pise are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Petr Luner are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Lukas Petru are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Marek Przeczek are Copyright (C) 2000-2001. * All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.realtime; import java.util.*; import net.sourceforge.javaprofiler.api.*; import net.sourceforge.javaprofiler.api.Class; import net.sourceforge.javaprofiler.api.Thread; import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; /** Implementation of API CPUThreadTrace * @author Lukas Petru */ public class CPUThreadTraceR extends MultiRootDataR implements CPUThreadTrace { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; /** VM Image that constructed this object. */ private ImageR image; /** Object identification. */ private final Integer objId; // roots to which this object is linked private ThreadR thread; private CPUTraceR location; // parents private CPUThreadMethodR method; // CPU info private long hits; private long pureTime; /** Constructs multi-rooted object * @param typeId Identification of <code>AllocTypeR</code> object. Should * be null if N/A. * @param threadId Identification of <code>ThreadR</code> object. Should * be null if N/A. * @param locationId Identification of <code>Location</code> object. * Should be null if N/A. * @param sid Object with data from communication layer. * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ CPUThreadTraceR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); } /** Constructs object with only <code>ID</code>. * @param oId Object identification. * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ CPUThreadTraceR(Integer oId, ImageR RtImage) { image=RtImage; objId=oId; } // ---------- return child Lists // ---------- return parents public CPUThreadMethod getParentCPUThreadMethod() { needConstructed(); return method; } public Thread getParentThread() { needConstructed(); return thread; } public CPUTrace getParentCPUTrace() { needConstructed(); return location; } // ---------- return roots of this object /** Returns AllocType root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public AllocTypeR getAllocType() { return null; } /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public ThreadR getThread() { needConstructed(); return thread; } /** Returns Location root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public Location getLocation() { needConstructed(); return location; } // ---------- profiler statistic public long getNumOfHits() { conditionalRefresh(); return hits; } public long getPureTime() { conditionalRefresh(); return pureTime; } // ---------- refresh /** Refreshes statistics. */ public void refresh() { IProf.sData data; try { data = image.getIProf().getData(objId.intValue(), IProf.CPU_DATA); } catch (IProfException e) { throw new RuntimeException(e); } setData((IProf.sCpuStatData) data.statData); } // ---------- private / package /** Finishes full object construction. */ void construct(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid) { if (! isReady) { // resolve roots thread=image.resolveThread(threadId); location=image.resolveCPUTrace(locationId); // resolve parents Integer methodId=new Integer(sid.parentUpObjId); if (image.containsId(methodId)) method=(CPUThreadMethodR) image.getObject(methodId); else { method=new CPUThreadMethodR(methodId, image); image.putObject(methodId, method); } isReady=true; // add to parents' lists method.addCPUThreadTrace(this); thread.addCPUThreadTrace(this); location.addCPUThreadTrace(this); } } /** Determines whether refresh should be done and does, if so. */ private void conditionalRefresh() { if (image.getAlwaysRefresh()) refresh(); } private void needConstructed() { if (!isReady) { IProf.sParents parents; try { parents=image.getIProf().getParents(objId.intValue()); } catch (IProfException e) { throw new RuntimeException(e); } // link to parents Integer methodId=new Integer(parents.parentUpObjId); if (image.containsId(methodId)) method=(CPUThreadMethodR) image.getObject(methodId); else { method=new CPUThreadMethodR(methodId, image); image.putObject(methodId, method); } // link to roots location=image.resolveCPUTrace(new Integer(parents. parentLeftObjId)); thread=method.getThread(); isReady=true; // add to parents' and root lists method.addCPUThreadTrace(this); thread.addCPUThreadTrace(this); location.addCPUThreadTrace(this); } } /** Finishes object construction with info gained from profiled VM. * @param sid Object info. */ void construct(IProf.sID sid) { // not yet determined, how to use this method } /** Fills object with data gained from profiled VM. * @param data Data. */ void setData(IProf.sCpuStatData cpuData) { hits=cpuData.hits; pureTime=cpuData.pureTime; } /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ void setData(IProf.sID sid) { setData(sid.cpu); } /** Returns number that identifies object for profiler library. */ Integer getId() { return objId; } public String toString() { return getThread() + "-" + getLocation(); } } --- NEW FILE: MonThreadMethodR.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"); you may not use this file except * in compliance with the License. A copy of the License is available * at http://www.sun.com/ * * The Original Code is the Java Profiler module. The Initial Developers * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. * * Portions created by Jan Stola are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Pavel Vacha are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Michal Pise are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Petr Luner are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Lukas Petru are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Marek Przeczek are Copyright (C) 2000-2001. * All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.realtime; import java.util.*; import net.sourceforge.javaprofiler.api.*; import net.sourceforge.javaprofiler.api.Class; import net.sourceforge.javaprofiler.api.Thread; import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; /** Implementation of API MonThreadMethod * @author Lukas Petru */ public class MonThreadMethodR extends MultiRootDataR implements MonThreadMethod { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; /** VM Image that constructed this object. */ private ImageR image; /** Object identification. */ private Integer objId; // roots to which this object is linked private ThreadR thread; private MethodR location; // parents // monitor info private long monitorHits; private long time; // lists for children private final List monThreadTraces=new ArrayList(0); // unmodifiable variants of lists for children private final List roMonThreadTraces=Collections.unmodifiableList( monThreadTraces); /** Constructs multi-rooted object * @param typeId Identification of <code>AllocTypeR</code> object. Should * be null if N/A. * @param threadId Identification of <code>ThreadR</code> object. Should * be null if N/A. * @param locationId Identification of <code>Location</code> object. * Should be null if N/A. * @param sid Object with data from communication layer. * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ MonThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); } /** Constructs object with only <code>ID</code>. * @param oId Object identification. * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ MonThreadMethodR(Integer oId, ImageR RtImage) { image=RtImage; objId=oId; } // ---------- return child Lists public void refreshMonThreadTraces() { image.extractMultiRoot(this, IProf.MON_THREAD_METHOD_TRACES, image.monThreadTraceFactory); } public List getMonThreadTraces() { if ( image.getAlwaysRefresh() ) refreshMonThreadTraces(); return roMonThreadTraces; } // ---------- return parents public Thread getParentThread() { needConstructed(); return thread; } public Method getParentMethod() { needConstructed(); return location; } // ---------- return roots of this object /** Returns AllocType root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public AllocTypeR getAllocType() { return null; } /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public ThreadR getThread() { needConstructed(); return thread; } /** Returns Location root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public Location getLocation() { needConstructed(); return location; } // ---------- profiler statistic public long getNumOfMonitorHits() { conditionalRefresh(); return monitorHits; } public long getTimeElapsedOnMonitor() { conditionalRefresh(); return time; } // ---------- refresh /** Refreshes statistics. */ public void refresh() { IProf.sData data; try { data = image.getIProf().getData(objId.intValue(), IProf.MON_DATA); } catch (IProfException e) { throw new RuntimeException(e); } setData((IProf.sMonStatData) data.statData); } // ---------- private / package void addMonThreadTrace(MonThreadTrace o) { monThreadTraces.add(o); } /** Finishes full object construction. */ void construct(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid) { if (! isReady) { // resolve roots thread=image.resolveThread(threadId); location=image.resolveMethod(locationId); // resolve parents isReady=true; // add to parents' lists thread.addMonThreadMethod(this); location.addMonThreadMethod(this); } } /** Determines whether refresh should be done and does, if so. */ private void conditionalRefresh() { if (image.getAlwaysRefresh()) refresh(); } private void needConstructed() { if (!isReady) { IProf.sParents parents; try { parents=image.getIProf().getParents(objId.intValue()); } catch (IProfException e) { throw new RuntimeException(e); } // link to parents Integer threadId=new Integer(parents.parentUpObjId); thread=image.resolveThread(threadId); Integer locationId=new Integer(parents.parentLeftObjId); location=image.resolveMethod(locationId); // link to roots // (same as parents) isReady=true; // add to parents' lists thread.addMonThreadMethod(this); location.addMonThreadMethod(this); } } /** Finishes object construction with info gained from profiled VM. * @param sid Object info. */ void construct(IProf.sID sid) { // not yet determined, how to use this method } /** Fills object with data gained from profiled VM. * @param data Data. */ void setData(IProf.sMonStatData monData) { monitorHits=monData.hits; time=monData.time; } /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ void setData(IProf.sID sid) { setData(sid.mon); } /** Returns number that identifies object for profiler library. */ Integer getId() { return objId; } public String toString() { return getThread() + "-" + getLocation(); } } --- NEW FILE: MonThreadTraceR.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"); you may not use this file except * in compliance with the License. A copy of the License is available * at http://www.sun.com/ * * The Original Code is the Java Profiler module. The Initial Developers * of the Original Code are Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. * * Portions created by Jan Stola are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Pavel Vacha are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Michal Pise are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Petr Luner are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Lukas Petru are Copyright (C) 2000-2001. * All Rights Reserved. * * Portions created by Marek Przeczek are Copyright (C) 2000-2001. * All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.realtime; import java.util.*; import net.sourceforge.javaprofiler.api.*; import net.sourceforge.javaprofiler.api.Class; import net.sourceforge.javaprofiler.api.Thread; import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; /** Implementation of API MonThreadTrace * @author Lukas Petru */ public class MonThreadTraceR extends MultiRootDataR implements MonThreadTrace { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; /** VM Image that constructed this object. */ private ImageR image; /** Object identification. */ private final Integer objId; // roots to which this object is linked private ThreadR thread; private MonTraceR location; // parents private MonThreadMethodR method; // monitor info private long monitorHits; private long time; /** Constructs multi-rooted object * @param typeId Identification of <code>AllocTypeR</code> object. Should * be null if N/A. * @param threadId Identification of <code>ThreadR</code> object. Should * be null if N/A. * @param locationId Identification of <code>Location</code> object. * Should be null if N/A. * @param sid Object with data from communication layer. * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ MonThreadTraceR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); } /** Constructs object with only <code>ID</code>. * @param oId Object identification. * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ MonThreadTraceR(Integer oId, ImageR RtImage) { image=RtImage; objId=oId; } // ---------- return child Lists // ---------- return parents public MonThreadMethod getParentMonThreadMethod() { needConstructed(); return method; } public Thread getParentThread() { needConstructed(); return thread; } public MonTrace getParentMonTrace() { needConstructed(); return location; } // ---------- return roots of this object /** Returns AllocType root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public AllocTypeR getAllocType() { return null; } /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public ThreadR getThread() { needConstructed(); return thread; } /** Returns Location root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ public Location getLocation() { needConstructed(); return location; } // ---------- profiler statistic public long getNumOfMonitorHits() { conditionalRefresh(); return monitorHits; } public long getTimeElapsedOnMonitor() { conditionalRefresh(); return time; } // ---------- refresh /** Refreshes statistics. */ public void refresh() { IProf.sData data; try { data = image.getIProf().getData(objId.intValue(), IProf.MON_DATA); } catch (IProfException e) { throw new RuntimeException(e); } setData((IProf.sMonStatData) data.statData); } // ---------- private / package /** Finishes full object construction. */ void construct(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid) { if (! isReady) { // resolve roots thread=image.resolveThread(threadId); location=image.resolveMonTrace(locationId); // resolve parents Integer methodId=new Integer(sid.parentUpObjId); if (image.containsId(methodId)) method=(MonThreadMethodR) image.getObject(methodId); else { method=new MonThreadMethodR(methodId, image); image.putObject(methodId, method); } isReady=true; // add to parents' lists method.addMonThreadTrace(this); thread.addMonThreadTrace(this); location.addMonThreadTrace(this); } } /** Determines whether refresh should be done and does, if so. */ private void conditionalRefresh() { if (image.getAlwaysRefresh()) refresh(); } private void needConstructed() { if (!isReady) { IProf.sParents parents; try { parents=image.getIProf().getParents(objId.intValue()); } catch (IProfException e) { throw new RuntimeException(e); } // link to parents Integer methodId=new Integer(parents.parentUpObjId); if (image.containsId(methodId)) method=(MonThreadMethodR) image.getObject(methodId); else { method=new MonThreadMethodR(methodId, image); image.putObject(methodId, method); } // link to roots location=image.resolveMonTrace(new Integer(parents. parentLeftObjId)); thread=method.getThread(); isReady=true; // add to parents' and root lists method.addMonThreadTrace(this); thread.addMonThreadTrace(this); location.addMonThreadTrace(this); } } /** Finishes object construction with info gained from profiled VM. * @param sid Object info. */ void construct(IProf.sID sid) { // not yet determined, how to use this method } /** Fills object with data gained from profiled VM. * @param data Data. */ void setData(IProf.sMonStatData monData) { monitorHits=monData.hits; time=monData.time; } /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ void setData(IProf.sID sid) { setData(sid.mon); } /** Returns number that identifies object for profiler library. */ Integer getId() { return objId; } public String toString() { return getThread() + "-" + getLocation(); } } Index: AllocTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTraceR.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AllocTraceR.java 21 Apr 2002 19:43:48 -0000 1.2 --- AllocTraceR.java 14 May 2002 14:47:37 -0000 1.3 *************** *** 60,63 **** --- 60,66 ---- private final List roFrames=Collections.unmodifiableList(frames); + // parents + private MethodR method; + // memory info private long numLiveInstances; *************** *** 106,110 **** public Method getParentMethod() { needConstructed(); ! return ((Frame) frames.get(0)).getMethod(); } --- 109,113 ---- public Method getParentMethod() { needConstructed(); ! return method; } *************** *** 236,241 **** frames.add(caller); } isReady = true; ! ((MethodR) getParentMethod()).addAllocTrace(this); } --- 239,245 ---- frames.add(caller); } + method=(MethodR) ((FrameR) frames.get(frames.size()-1)).getMethod(); isReady = true; ! method.addAllocTrace(this); } Index: CPUTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/CPUTraceR.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** CPUTraceR.java 10 Apr 2002 16:01:15 -0000 1.1 --- CPUTraceR.java 14 May 2002 14:47:37 -0000 1.2 *************** *** 59,62 **** --- 59,65 ---- private final List roFrames=Collections.unmodifiableList(frames); + // parents + private MethodR method; + // CPU info private long hits; *************** *** 64,68 **** --- 67,75 ---- // lists for children + private final List cpuThreadTraces=new ArrayList(0); + // unmodifiable variants of lists for children + private final List roCPUThreadTraces=Collections.unmodifiableList( + cpuThreadTraces); /** Constructs new object with info. *************** *** 96,100 **** public Method getParentMethod() { needConstructed(); ! return ((Frame) frames.get(0)).getMethod(); } --- 103,107 ---- public Method getParentMethod() { needConstructed(); ! return method; } *************** *** 102,110 **** public void refreshCPUThreadTraces() { } public List getCPUThreadTraces() { ! //PENDING ! return Collections.EMPTY_LIST; } --- 109,120 ---- public void refreshCPUThreadTraces() { + image.extractMultiRoot(this, IProf.CPU_METHOD_TRACE_THREADS, + image.cpuThreadTraceFactory); } public List getCPUThreadTraces() { ! if ( image.getAlwaysRefresh() ) ! refreshCPUThreadTraces(); ! return roCPUThreadTraces; } *************** *** 171,174 **** --- 181,188 ---- // package / private + void addCPUThreadTrace(CPUThreadTrace o) { + cpuThreadTraces.add(o); + } + /** Finishes object construction with info gained from profiled VM. * @param sid Object info. *************** *** 191,196 **** frames.add(caller); } isReady = true; ! ((MethodR) getParentMethod()).addCPUTrace(this); } --- 205,211 ---- frames.add(caller); } + method=(MethodR) ((FrameR) frames.get(frames.size()-1)).getMethod(); isReady = true; ! method.addCPUTrace(this); } Index: ImageR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/ImageR.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** ImageR.java 23 Apr 2002 14:33:34 -0000 1.4 --- ImageR.java 14 May 2002 14:47:37 -0000 1.5 *************** *** 112,123 **** final Constructor allocThreadTraceFactory; final Constructor allocTypeThreadTraceFactory; // multi-root ID factories ! final Constructor allocTypeMethodIDFactory; ! final Constructor allocTypeTraceIDFactory; ! final Constructor allocTypeThreadIDFactory; ! final Constructor allocThreadMethodIDFactory; ! final Constructor allocTypeThreadMethodIDFactory; ! final Constructor allocThreadTraceIDFactory; ! final Constructor allocTypeThreadTraceIDFactory; Set getAllFlags=new HashSet(); --- 112,129 ---- final Constructor allocThreadTraceFactory; final Constructor allocTypeThreadTraceFactory; + final Constructor cpuThreadMethodFactory; + final Constructor cpuThreadTraceFactory; + final Constructor monThreadMethodFactory; + final Constructor monThreadTraceFactory; // multi-root ID factories ! // final Constructor allocTypeMethodIDFactory; ! // final Constructor allocTypeTraceIDFactory; ! // final Constructor allocTypeThreadIDFactory; ! // final Constructor allocThreadMethodIDFactory; ! // final Constructor allocTypeThreadMethodIDFactory; ! // final Constructor allocThreadTraceIDFactory; ! // final Constructor allocTypeThreadTraceIDFactory; ! // final Constructor cpuThreadMethodIDFactory; ! // final Constructor cpuThreadTraceIDFactory; Set getAllFlags=new HashSet(); *************** *** 225,252 **** "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocTypeThreadTraceR" ).getDeclaredConstructor(mrParameterTypes); ! // init multi-root ID factories ! mrParameterTypes=new java.lang.Class[] { ! integerClass, this.getClass() }; ! allocTypeMethodIDFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocTypeMethodR" ! ).getDeclaredConstructor(mrParameterTypes); ! allocTypeTraceIDFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocTypeTraceR") ! .getDeclaredConstructor(mrParameterTypes); ! allocTypeThreadIDFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocTypeThreadR" ).getDeclaredConstructor(mrParameterTypes); ! allocThreadMethodIDFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocThreadMethodR" ! ).getDeclaredConstructor(mrParameterTypes); ! allocTypeThreadMethodIDFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocTypeThreadMethodR" ).getDeclaredConstructor(mrParameterTypes); ! allocThreadTraceIDFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocThreadTraceR" ).getDeclaredConstructor(mrParameterTypes); ! allocTypeThreadTraceIDFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocTypeThreadTraceR" ).getDeclaredConstructor(mrParameterTypes); } catch (ClassNotFoundException e) { throw new RuntimeException(e); --- 231,247 ---- "net.sourceforge.javaprofiler.jpiimpl.realtime.AllocTypeThreadTraceR" ).getDeclaredConstructor(mrParameterTypes); ! cpuThreadMethodFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.CPUThreadMethodR" ).getDeclaredConstructor(mrParameterTypes); ! cpuThreadTraceFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.CPUThreadTraceR" ).getDeclaredConstructor(mrParameterTypes); ! monThreadMethodFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.MonThreadMethodR" ).getDeclaredConstructor(mrParameterTypes); ! monThreadTraceFactory=java.lang.Class.forName( ! "net.sourceforge.javaprofiler.jpiimpl.realtime.MonThreadTraceR" ).getDeclaredConstructor(mrParameterTypes); + // init multi-root ID factories } catch (ClassNotFoundException e) { throw new RuntimeException(e); *************** *** 392,395 **** --- 387,398 ---- case IProf.ALLOC_OBJECT_METHOD_TRACE_THREADS: return THREAD_KEY; case IProf.ALLOC_THREAD_METHOD_TRACE_OBJECTS: return TYPE_KEY; + case IProf.CPU_THREAD_METHOD_TRACES: return LOCATION_KEY; + case IProf.CPU_THREAD_METHODS: return LOCATION_KEY; + case IProf.CPU_METHOD_THREADS: return THREAD_KEY; + case IProf.CPU_METHOD_TRACE_THREADS: return THREAD_KEY; + case IProf.MON_THREAD_METHOD_TRACES: return LOCATION_KEY; + case IProf.MON_THREAD_METHODS: return LOCATION_KEY; + case IProf.MON_METHOD_THREADS: return THREAD_KEY; + case IProf.MON_METHOD_TRACE_THREADS: return THREAD_KEY; default: throw new RuntimeException("No branch in switch!"); } Index: MethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/MethodR.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MethodR.java 15 Apr 2002 19:46:06 -0000 1.2 --- MethodR.java 14 May 2002 14:47:37 -0000 1.3 *************** *** 81,84 **** --- 81,86 ---- private List allocTypeMethods=new ArrayList(0); private List allocThreadMethods=new ArrayList(0); + private List cpuThreadMethods=new ArrayList(0); + private List monThreadMethods=new ArrayList(0); // unmodifiable variants of lists for children *************** *** 93,96 **** --- 95,102 ---- private List roAllocThreadMethods=Collections.unmodifiableList( allocThreadMethods); + private List roCPUThreadMethods=Collections.unmodifiableList( + cpuThreadMethods); + private List roMonThreadMethods=Collections.unmodifiableList( + monThreadMethods); /** Constructs new object with info. *************** *** 177,183 **** } public List getCPUThreadMethods() { ! //PENDING ! return Collections.EMPTY_LIST; } --- 183,195 ---- } + public void refreshCPUThreadMethods() { + image.extractMultiRoot(this, IProf.CPU_METHOD_THREADS, + image.cpuThreadMethodFactory); + } + public List getCPUThreadMethods() { ! if ( image.getAlwaysRefresh() ) ! refreshCPUThreadMethods(); ! return roCPUThreadMethods; } *************** *** 193,199 **** } public List getMonThreadMethods() { ! //PENDING ! return Collections.EMPTY_LIST; } --- 205,217 ---- } + public void refreshMonThreadMethods() { + image.extractMultiRoot(this, IProf.MON_METHOD_THREADS, + image.monThreadMethodFactory); + } + public List getMonThreadMethods() { ! if ( image.getAlwaysRefresh() ) ! refreshMonThreadMethods(); ! return roMonThreadMethods; } *************** *** 314,317 **** --- 332,343 ---- void addAllocThreadMethod(AllocThreadMethod o) { allocThreadMethods.add(o); + } + + void addCPUThreadMethod(CPUThreadMethod o) { + cpuThreadMethods.add(o); + } + + void addMonThreadMethod(MonThreadMethod o) { + monThreadMethods.add(o); } Index: MonTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/MonTraceR.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MonTraceR.java 10 Apr 2002 16:01:15 -0000 1.1 --- MonTraceR.java 14 May 2002 14:47:37 -0000 1.2 *************** *** 59,62 **** --- 59,65 ---- private final List roFrames=Collections.unmodifiableList(frames); + // parents + private MethodR method; + // monitor info private long monitorHits; *************** *** 64,68 **** --- 67,75 ---- // lists for children + private final List monThreadTraces=new ArrayList(0); + // unmodifiable variants of lists for children + private final List roMonThreadTraces=Collections.unmodifiableList( + monThreadTraces); /** Constructs new object with info. *************** *** 96,100 **** public Method getParentMethod() { needConstructed(); ! return ((Frame) frames.get(0)).getMethod(); } --- 103,107 ---- public Method getParentMethod() { needConstructed(); ! return method; } *************** *** 102,110 **** public void refreshMonThreadTraces() { } public List getMonThreadTraces() { ! //PENDING ! return Collections.EMPTY_LIST; } --- 109,120 ---- public void refreshMonThreadTraces() { + image.extractMultiRoot(this, IProf.MON_METHOD_TRACE_THREADS, + image.monThreadTraceFactory); } public List getMonThreadTraces() { ! if ( image.getAlwaysRefresh() ) ! refreshMonThreadTraces(); ! return roMonThreadTraces; } *************** *** 148,151 **** --- 158,165 ---- // package / private + void addMonThreadTrace(MonThreadTrace o) { + monThreadTraces.add(o); + } + public AllocTypeR getAllocType() { return null; *************** *** 180,185 **** frames.add(caller); } isReady = true; ! ((MethodR) getParentMethod()).addMonTrace(this); } --- 194,200 ---- frames.add(caller); } + method=(MethodR) ((FrameR) frames.get(frames.size()-1)).getMethod(); isReady = true; ! method.addMonTrace(this); } Index: ThreadR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/ThreadR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** ThreadR.java 21 Apr 2002 19:43:48 -0000 1.3 --- ThreadR.java 14 May 2002 14:47:37 -0000 1.4 *************** *** 80,83 **** --- 80,87 ---- private final List allocThreadMethods=new ArrayList(0); private final List allocThreadTraces=new ArrayList(0); + private final List cpuThreadMethods=new ArrayList(0); + private final List cpuThreadTraces=new ArrayList(0); + private final List monThreadMethods=new ArrayList(0); + private final List monThreadTraces=new ArrayList(0); // unmodifiable variants of lists for children *************** *** 88,91 **** --- 92,103 ---- private final List roAllocThreadTraces=Collections.unmodifiableList( allocThreadTraces); + private final List roCPUThreadMethods=Collections.unmodifiableList( + cpuThreadMethods); + private final List roCPUThreadTraces=Collections.unmodifiableList( + cpuThreadTraces); + private final List roMonThreadMethods=Collections.unmodifiableList( + monThreadMethods); + private final List roMonThreadTraces=Collections.unmodifiableList( + monThreadTraces); /** Constructs new object with info. *************** *** 129,140 **** // children lists getter methods public List getCPUThreadMethods() { ! //PENDING ! return Collections.EMPTY_LIST; } public List getCPUThreadTraces() { ! //PENDING ! return Collections.EMPTY_LIST; } --- 141,169 ---- // children lists getter methods + public void refreshCPUThreadMethods() { + image.extractMultiRoot(this, IProf.CPU_THREAD_METHODS, + image.cpuThreadMethodFactory); + } + public List getCPUThreadMethods() { ! if ( image.getAlwaysRefresh() ) ! refreshCPUThreadMethods(); ! return roCPUThreadMethods; } + public void refreshCPUThreadTraces() { + if (! image.getAlwaysRefresh()) + refreshCPUThreadMethods(); + Iterator it=getCPUThreadMethods().iterator(); + while (it.hasNext()) { + CPUThreadMethodR o=(CPUThreadMethodR) it.next(); + o.refreshCPUThreadTraces(); + } + } + public List getCPUThreadTraces() { ! if ( image.getAlwaysRefresh() ) ! refreshCPUThreadTraces(); ! return roCPUThreadTraces; } *************** *** 166,177 **** } public List getMonThreadMethods() { ! //PENDING ! return Collections.EMPTY_LIST; } public List getMonThreadTraces() { ! //PENDING ! return Collections.EMPTY_LIST; } --- 195,223 ---- } + public void refreshMonThreadMethods() { + image.extractMultiRoot(this, IProf.MON_THREAD_METHODS, + image.monThreadMethodFactory); + } + public List getMonThreadMethods() { ! if ( image.getAlwaysRefresh() ) ! refreshMonThreadMethods(); ! return roMonThreadMethods; } + public void refreshMonThreadTraces() { + if (! image.getAlwaysRefresh()) + refreshMonThreadMethods(); + Iterator it=getMonThreadMethods().iterator(); + while (it.hasNext()) { + MonThreadMethodR o=(MonThreadMethodR) it.next(); + o.refreshMonThreadTraces(); + } + } + public List getMonThreadTraces() { ! if ( image.getAlwaysRefresh() ) ! refreshMonThreadTraces(); ! return roMonThreadTraces; } *************** *** 283,286 **** --- 329,348 ---- void addAllocThreadTrace(AllocThreadTrace o) { allocThreadTraces.add(o); + } + + void addCPUThreadMethod(CPUThreadMethod o) { + cpuThreadMethods.add(o); + } + + void addCPUThreadTrace(CPUThreadTrace o) { + cpuThreadTraces.add(o); + } + + void addMonThreadMethod(MonThreadMethod o) { + monThreadMethods.add(o); + } + + void addMonThreadTrace(MonThreadTrace o) { + monThreadTraces.add(o); } |
From: Pavel V. <va...@us...> - 2002-05-14 14:08:06
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv20543 Modified Files: CPUThreadMethodData.java CPUTraceData.java MethodData.java MonThreadMethodData.java MonTraceData.java ThreadData.java TypeData.java Log Message: "cross" methods Index: CPUThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUThreadMethodData.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** CPUThreadMethodData.java 8 May 2002 08:08:57 -0000 1.10 --- CPUThreadMethodData.java 14 May 2002 14:05:36 -0000 1.11 *************** *** 79,84 **** void addTrace(CPUThreadTraceData trace) { cpuThreadTraces.add(trace); ! //pending MAP ! } // ---------- return parents --- 79,83 ---- void addTrace(CPUThreadTraceData trace) { cpuThreadTraces.add(trace); ! } // ---------- return parents *************** *** 121,126 **** */ public CPUThreadTraceRef getCPUThreadTrace(CPUTraceRef peer) { return null; - //PENDING } --- 120,132 ---- */ public CPUThreadTraceRef getCPUThreadTrace(CPUTraceRef peer) { + ListIterator itr = getCPUThreadTraces().listIterator(); + CPUThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (CPUThreadTraceRef) itr.next(); + if ( obj.getCPUTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 154,157 **** --- 160,166 ---- /* * $Log$ + * Revision 1.11 2002/05/14 14:05:36 vachis + * "cross" methods + * * Revision 1.10 2002/05/08 08:08:57 vachis * siblings Index: CPUTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUTraceData.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** CPUTraceData.java 13 May 2002 21:25:56 -0000 1.13 --- CPUTraceData.java 14 May 2002 14:05:36 -0000 1.14 *************** *** 84,88 **** void addThread(CPUThreadTraceData thread) { cpuThreadTraces.add(thread); - //pending MAP } --- 84,87 ---- *************** *** 135,140 **** */ public CPUThreadTraceRef getCPUThreadTrace(ThreadRef peer) { return null; - //PENDING } --- 134,146 ---- */ public CPUThreadTraceRef getCPUThreadTrace(ThreadRef peer) { + ListIterator itr = getCPUThreadTraces().listIterator(); + CPUThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (CPUThreadTraceRef) itr.next(); + if ( obj.getThread().equals( peer ) ) + return obj; + } return null; } *************** *** 149,156 **** public AllocTraceRef getSiblingAlloc() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! AllocTraceData trace; while ( itr.hasNext() ) { ! trace = (AllocTraceData) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; --- 155,162 ---- public AllocTraceRef getSiblingAlloc() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! AllocTraceRef trace; while ( itr.hasNext() ) { ! trace = (AllocTraceRef) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; *************** *** 167,174 **** public MonTraceRef getSiblingMon() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! MonTraceData trace; while ( itr.hasNext() ) { ! trace = (MonTraceData) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; --- 173,180 ---- public MonTraceRef getSiblingMon() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! MonTraceRef trace; while ( itr.hasNext() ) { ! trace = (MonTraceRef) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; *************** *** 185,188 **** --- 191,197 ---- /* * $Log$ + * Revision 1.14 2002/05/14 14:05:36 vachis + * "cross" methods + * * Revision 1.13 2002/05/13 21:25:56 vachis * use virtual methods in getting of siblings Index: MethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MethodData.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** MethodData.java 6 May 2002 17:32:13 -0000 1.16 --- MethodData.java 14 May 2002 14:05:36 -0000 1.17 *************** *** 125,129 **** void addAllocTrace(AllocTraceData trace) { allocTraces.add(trace); - //pending MAP } --- 125,128 ---- *************** *** 135,139 **** void addCPUTrace(CPUTraceData trace) { cpuTraces.add(trace); - //pending MAP } --- 134,137 ---- *************** *** 145,149 **** void addMonTrace(MonTraceData trace) { monTraces.add(trace); - //pending MAP } --- 143,146 ---- *************** *** 156,160 **** void addType(AllocTypeMethodData allocType) { allocTypeMethods.add(allocType); - //pending MAP } --- 153,156 ---- *************** *** 167,171 **** void addAllocThread(AllocThreadMethodData thread) { allocThreadMethods.add(thread); - //pending MAP } --- 163,166 ---- *************** *** 177,181 **** void addCPUThread(CPUThreadMethodData thread) { cpuThreadMethods.add(thread); - //pending MAP } --- 172,175 ---- *************** *** 187,191 **** void addMonThread(MonThreadMethodData thread) { monThreadMethods.add(thread); - //pending MAP } --- 181,184 ---- *************** *** 295,300 **** */ public AllocThreadMethodRef getAllocThreadMethod(ThreadRef peer) { return null; - //PENDING } --- 288,300 ---- */ public AllocThreadMethodRef getAllocThreadMethod(ThreadRef peer) { + ListIterator itr = getAllocThreadMethods().listIterator(); + AllocThreadMethodRef obj; + + while (itr.hasNext()) { + obj = (AllocThreadMethodRef) itr.next(); + if ( obj.getThread().equals( peer ) ) + return obj; + } return null; } *************** *** 317,322 **** */ public CPUThreadMethodRef getCPUThreadMethod(ThreadRef peer) { return null; - //PENDING } --- 317,329 ---- */ public CPUThreadMethodRef getCPUThreadMethod(ThreadRef peer) { + ListIterator itr = getCPUThreadMethods().listIterator(); + CPUThreadMethodRef obj; + + while (itr.hasNext()) { + obj = (CPUThreadMethodRef) itr.next(); + if ( obj.getThread().equals( peer ) ) + return obj; + } return null; } *************** *** 339,344 **** */ public MonThreadMethodRef getMonThreadMethod(ThreadRef peer) { return null; - //PENDING } --- 346,358 ---- */ public MonThreadMethodRef getMonThreadMethod(ThreadRef peer) { + ListIterator itr = getMonThreadMethods().listIterator(); + MonThreadMethodRef obj; + + while (itr.hasNext()) { + obj = (MonThreadMethodRef) itr.next(); + if ( obj.getThread().equals( peer ) ) + return obj; + } return null; } *************** *** 361,366 **** */ public AllocTypeMethodRef getAllocTypeMethod(TypeRef peer) { return null; - //PENDING } --- 375,387 ---- */ public AllocTypeMethodRef getAllocTypeMethod(TypeRef peer) { + ListIterator itr = getAllocTypeMethods().listIterator(); + AllocTypeMethodRef obj; + + while (itr.hasNext()) { + obj = (AllocTypeMethodRef) itr.next(); + if ( obj.getType().equals( peer ) ) + return obj; + } return null; } *************** *** 373,376 **** --- 394,400 ---- /* * $Log$ + * Revision 1.17 2002/05/14 14:05:36 vachis + * "cross" methods + * * Revision 1.16 2002/05/06 17:32:13 vachis * new api implemention Index: MonThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonThreadMethodData.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** MonThreadMethodData.java 8 May 2002 08:08:57 -0000 1.7 --- MonThreadMethodData.java 14 May 2002 14:05:37 -0000 1.8 *************** *** 121,126 **** */ public MonThreadTraceRef getMonThreadTrace(MonTraceRef peer) { return null; - //PENDING } --- 121,133 ---- */ public MonThreadTraceRef getMonThreadTrace(MonTraceRef peer) { + ListIterator itr = getMonThreadTraces().listIterator(); + MonThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (MonThreadTraceRef) itr.next(); + if ( obj.getMonTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 155,158 **** --- 162,168 ---- /* * $Log$ + * Revision 1.8 2002/05/14 14:05:37 vachis + * "cross" methods + * * Revision 1.7 2002/05/08 08:08:57 vachis * siblings Index: MonTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonTraceData.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** MonTraceData.java 13 May 2002 21:25:56 -0000 1.10 --- MonTraceData.java 14 May 2002 14:05:37 -0000 1.11 *************** *** 83,87 **** void addThread(MonThreadTraceData thread) { monThreadTraces.add(thread); - //pending MAP } --- 83,86 ---- *************** *** 135,140 **** */ public MonThreadTraceRef getMonThreadTrace(ThreadRef peer) { return null; - //PENDING } --- 134,146 ---- */ public MonThreadTraceRef getMonThreadTrace(ThreadRef peer) { + ListIterator itr = getMonThreadTraces().listIterator(); + MonThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (MonThreadTraceRef) itr.next(); + if ( obj.getThread().equals( peer ) ) + return obj; + } return null; } *************** *** 149,156 **** public AllocTraceRef getSiblingAlloc() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! AllocTraceData trace; while ( itr.hasNext() ) { ! trace = (AllocTraceData) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; --- 155,162 ---- public AllocTraceRef getSiblingAlloc() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! AllocTraceRef trace; while ( itr.hasNext() ) { ! trace = (AllocTraceRef) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; *************** *** 167,174 **** public CPUTraceRef getSiblingCPU() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! CPUTraceData trace; while ( itr.hasNext() ) { ! trace = (CPUTraceData) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; --- 173,180 ---- public CPUTraceRef getSiblingCPU() { ListIterator itr = getMethod().getCPUTraces().listIterator(); ! CPUTraceRef trace; while ( itr.hasNext() ) { ! trace = (CPUTraceRef) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; *************** *** 185,188 **** --- 191,197 ---- /* * $Log$ + * Revision 1.11 2002/05/14 14:05:37 vachis + * "cross" methods + * * Revision 1.10 2002/05/13 21:25:56 vachis * use virtual methods in getting of siblings Index: ThreadData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ThreadData.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** ThreadData.java 7 May 2002 21:11:38 -0000 1.20 --- ThreadData.java 14 May 2002 14:05:37 -0000 1.21 *************** *** 143,147 **** void addType(AllocTypeThreadData allocType) { allocTypeThreads.add(allocType); - //pending MAP } --- 143,146 ---- *************** *** 153,157 **** void addAllocMethod(AllocThreadMethodData method) { allocThreadMethods.add(method); - //pending MAP } --- 152,155 ---- *************** *** 163,167 **** void addCPUMethod(CPUThreadMethodData method) { cpuThreadMethods.add(method); - //pending MAP } --- 161,164 ---- *************** *** 173,177 **** void addMonMethod(MonThreadMethodData method) { monThreadMethods.add(method); - //pending MAP } --- 170,173 ---- *************** *** 183,187 **** void addAllocTrace(AllocThreadTraceData trace) { allocThreadTraces.add(trace); - //pending MAP } --- 179,182 ---- *************** *** 193,197 **** void addCPUTrace(CPUThreadTraceData trace) { cpuThreadTraces.add(trace); - //pending MAP } --- 188,191 ---- *************** *** 203,211 **** void addMonTrace(MonThreadTraceData trace) { monThreadTraces.add(trace); - //pending MAP } ! ! //PENDING MAP ! /** Set tree of method calls in this thread. * @param root Root of call tree for this thread --- 197,202 ---- void addMonTrace(MonThreadTraceData trace) { monThreadTraces.add(trace); } ! /** Set tree of method calls in this thread. * @param root Root of call tree for this thread *************** *** 294,299 **** */ public AllocThreadMethodRef getAllocThreadMethod(MethodRef peer) { return null; - //PENDING } --- 285,297 ---- */ public AllocThreadMethodRef getAllocThreadMethod(MethodRef peer) { + ListIterator itr = getAllocThreadMethods().listIterator(); + AllocThreadMethodRef obj; + + while (itr.hasNext()) { + obj = (AllocThreadMethodRef) itr.next(); + if ( obj.getMethod().equals( peer ) ) + return obj; + } return null; } *************** *** 316,321 **** */ public AllocThreadTraceRef getAllocThreadTrace(AllocTraceRef peer) { return null; - //PENDING } --- 314,326 ---- */ public AllocThreadTraceRef getAllocThreadTrace(AllocTraceRef peer) { + ListIterator itr = getAllocThreadTraces().listIterator(); + AllocThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (AllocThreadTraceRef) itr.next(); + if ( obj.getAllocTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 338,343 **** */ public AllocTypeThreadRef getAllocTypeThread(TypeRef peer) { return null; - //PENDING } --- 343,355 ---- */ public AllocTypeThreadRef getAllocTypeThread(TypeRef peer) { + ListIterator itr = getAllocTypeThreads().listIterator(); + AllocTypeThreadRef obj; + + while (itr.hasNext()) { + obj = (AllocTypeThreadRef) itr.next(); + if ( obj.getType().equals( peer ) ) + return obj; + } return null; } *************** *** 360,365 **** */ public CPUThreadMethodRef getCPUThreadMethod(MethodRef peer) { return null; - //PENDING } --- 372,384 ---- */ public CPUThreadMethodRef getCPUThreadMethod(MethodRef peer) { + ListIterator itr = getCPUThreadMethods().listIterator(); + CPUThreadMethodRef obj; + + while (itr.hasNext()) { + obj = (CPUThreadMethodRef) itr.next(); + if ( obj.getMethod().equals( peer ) ) + return obj; + } return null; } *************** *** 382,387 **** */ public CPUThreadTraceRef getCPUThreadTrace(CPUTraceRef peer) { return null; - //PENDING } --- 401,413 ---- */ public CPUThreadTraceRef getCPUThreadTrace(CPUTraceRef peer) { + ListIterator itr = getCPUThreadTraces().listIterator(); + CPUThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (CPUThreadTraceRef) itr.next(); + if ( obj.getCPUTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 404,409 **** */ public MonThreadMethodRef getMonThreadMethod(MethodRef peer) { return null; - //PENDING } --- 430,442 ---- */ public MonThreadMethodRef getMonThreadMethod(MethodRef peer) { + ListIterator itr = getMonThreadMethods().listIterator(); + MonThreadMethodRef obj; + + while (itr.hasNext()) { + obj = (MonThreadMethodRef) itr.next(); + if ( obj.getMethod().equals( peer ) ) + return obj; + } return null; } *************** *** 426,431 **** */ public MonThreadTraceRef getMonThreadTrace(MonTraceRef peer) { return null; - //PENDING } --- 459,471 ---- */ public MonThreadTraceRef getMonThreadTrace(MonTraceRef peer) { + ListIterator itr = getMonThreadTraces().listIterator(); + MonThreadTraceRef obj; + + while (itr.hasNext()) { + obj = (MonThreadTraceRef) itr.next(); + if ( obj.getMonTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 453,456 **** --- 493,499 ---- /* * $Log$ + * Revision 1.21 2002/05/14 14:05:37 vachis + * "cross" methods + * * Revision 1.20 2002/05/07 21:11:38 vachis * fix creation of fields, frames Index: TypeData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/TypeData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** TypeData.java 6 May 2002 17:33:01 -0000 1.1 --- TypeData.java 14 May 2002 14:05:37 -0000 1.2 *************** *** 136,140 **** void addMethod(AllocTypeMethodData method) { allocTypeMethods.add(method); - //pending MAP } --- 136,139 ---- *************** *** 146,150 **** void addThread(AllocTypeThreadData thread) { allocTypeThreads.add(thread); - //pending MAP } --- 145,148 ---- *************** *** 156,160 **** void addTrace(AllocTypeTraceData trace) { allocTypeTraces.add(trace); - //pending MAP } --- 154,157 ---- *************** *** 210,215 **** */ public AllocTypeTraceRef getAllocTypeTrace(AllocTraceRef peer) { return null; - //PENDING; } --- 207,219 ---- */ public AllocTypeTraceRef getAllocTypeTrace(AllocTraceRef peer) { + ListIterator itr = getAllocTypeTraces().listIterator(); + AllocTypeTraceRef obj; + + while (itr.hasNext()) { + obj = (AllocTypeTraceRef) itr.next(); + if ( obj.getAllocTrace().equals( peer ) ) + return obj; + } return null; } *************** *** 231,236 **** */ public AllocTypeMethodRef getAllocTypeMethod(MethodRef peer) { return null; - //PENDING; } --- 235,247 ---- */ public AllocTypeMethodRef getAllocTypeMethod(MethodRef peer) { + ListIterator itr = getAllocTypeMethods().listIterator(); + AllocTypeMethodRef obj; + + while (itr.hasNext()) { + obj = (AllocTypeMethodRef) itr.next(); + if ( obj.getMethod().equals( peer ) ) + return obj; + } return null; } *************** *** 253,258 **** */ public AllocTypeThreadRef getAllocTypeThread(ThreadRef peer) { return null; - //PENDING; } --- 264,276 ---- */ public AllocTypeThreadRef getAllocTypeThread(ThreadRef peer) { + ListIterator itr = getAllocTypeThreads().listIterator(); + AllocTypeThreadRef obj; + + while (itr.hasNext()) { + obj = (AllocTypeThreadRef) itr.next(); + if ( obj.getThread().equals( peer ) ) + return obj; + } return null; } *************** *** 264,267 **** --- 282,288 ---- /* * $Log$ + * Revision 1.2 2002/05/14 14:05:37 vachis + * "cross" methods + * * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention |
From: Pavel V. <va...@us...> - 2002-05-13 21:26:01
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv23356 Modified Files: AllocTraceData.java CPUTraceData.java MonTraceData.java Log Message: use virtual methods in getting of siblings Index: AllocTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTraceData.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** AllocTraceData.java 13 May 2002 20:04:17 -0000 1.18 --- AllocTraceData.java 13 May 2002 21:25:56 -0000 1.19 *************** *** 189,193 **** while ( itr.hasNext() ) { trace = (CPUTraceData) itr.next(); ! if ( frames.equals( trace.getFrames() ) ) return trace; } --- 189,193 ---- while ( itr.hasNext() ) { trace = (CPUTraceData) itr.next(); ! if ( getFrames().equals( trace.getFrames() ) ) return trace; } *************** *** 207,211 **** while ( itr.hasNext() ) { trace = (MonTraceData) itr.next(); ! if ( frames.equals( trace.getFrames() ) ) return trace; } --- 207,211 ---- while ( itr.hasNext() ) { trace = (MonTraceData) itr.next(); ! if ( getFrames().equals( trace.getFrames() ) ) return trace; } *************** *** 221,224 **** --- 221,227 ---- /* * $Log$ + * Revision 1.19 2002/05/13 21:25:56 vachis + * use virtual methods in getting of siblings + * * Revision 1.18 2002/05/13 20:04:17 vachis * siblings Index: CPUTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUTraceData.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** CPUTraceData.java 13 May 2002 20:04:17 -0000 1.12 --- CPUTraceData.java 13 May 2002 21:25:56 -0000 1.13 *************** *** 153,157 **** while ( itr.hasNext() ) { trace = (AllocTraceData) itr.next(); ! if ( frames.equals( trace.getFrames() ) ) return trace; } --- 153,157 ---- while ( itr.hasNext() ) { trace = (AllocTraceData) itr.next(); ! if ( getFrames().equals( trace.getFrames() ) ) return trace; } *************** *** 171,175 **** while ( itr.hasNext() ) { trace = (MonTraceData) itr.next(); ! if ( frames.equals( trace.getFrames() ) ) return trace; } --- 171,175 ---- while ( itr.hasNext() ) { trace = (MonTraceData) itr.next(); ! if ( getFrames().equals( trace.getFrames() ) ) return trace; } *************** *** 185,188 **** --- 185,191 ---- /* * $Log$ + * Revision 1.13 2002/05/13 21:25:56 vachis + * use virtual methods in getting of siblings + * * Revision 1.12 2002/05/13 20:04:17 vachis * siblings Index: MonTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonTraceData.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** MonTraceData.java 13 May 2002 20:04:17 -0000 1.9 --- MonTraceData.java 13 May 2002 21:25:56 -0000 1.10 *************** *** 153,157 **** while ( itr.hasNext() ) { trace = (AllocTraceData) itr.next(); ! if ( frames.equals( trace.getFrames() ) ) return trace; } --- 153,157 ---- while ( itr.hasNext() ) { trace = (AllocTraceData) itr.next(); ! if ( getFrames().equals( trace.getFrames() ) ) return trace; } *************** *** 171,175 **** while ( itr.hasNext() ) { trace = (CPUTraceData) itr.next(); ! if ( frames.equals( trace.getFrames() ) ) return trace; } --- 171,175 ---- while ( itr.hasNext() ) { trace = (CPUTraceData) itr.next(); ! if ( getFrames().equals( trace.getFrames() ) ) return trace; } *************** *** 185,188 **** --- 185,191 ---- /* * $Log$ + * Revision 1.10 2002/05/13 21:25:56 vachis + * use virtual methods in getting of siblings + * * Revision 1.9 2002/05/13 20:04:17 vachis * siblings |
From: Pavel V. <va...@us...> - 2002-05-13 20:08:08
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv11501 Modified Files: AllocTraceData.java CPUTraceData.java FrameData.java MonTraceData.java Log Message: siblings Index: AllocTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTraceData.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** AllocTraceData.java 7 May 2002 21:11:38 -0000 1.17 --- AllocTraceData.java 13 May 2002 20:04:17 -0000 1.18 *************** *** 171,175 **** */ public AllocTypeTraceRef getAllocTypeTrace(TypeRef peer) { ! return null; //PENDING } --- 171,175 ---- */ public AllocTypeTraceRef getAllocTypeTrace(TypeRef peer) { ! return null; //PENDING } *************** *** 184,189 **** */ public CPUTraceRef getSiblingCPU() { return null; - //PENDING } --- 184,196 ---- */ public CPUTraceRef getSiblingCPU() { + ListIterator itr = getMethod().getCPUTraces().listIterator(); + CPUTraceData trace; + + while ( itr.hasNext() ) { + trace = (CPUTraceData) itr.next(); + if ( frames.equals( trace.getFrames() ) ) + return trace; + } return null; } *************** *** 195,200 **** */ public MonTraceRef getSiblingMon() { return null; - //PENDING } --- 202,214 ---- */ public MonTraceRef getSiblingMon() { + ListIterator itr = getMethod().getCPUTraces().listIterator(); + MonTraceData trace; + + while ( itr.hasNext() ) { + trace = (MonTraceData) itr.next(); + if ( frames.equals( trace.getFrames() ) ) + return trace; + } return null; } *************** *** 207,210 **** --- 221,227 ---- /* * $Log$ + * Revision 1.18 2002/05/13 20:04:17 vachis + * siblings + * * Revision 1.17 2002/05/07 21:11:38 vachis * fix creation of fields, frames Index: CPUTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUTraceData.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** CPUTraceData.java 7 May 2002 21:11:38 -0000 1.11 --- CPUTraceData.java 13 May 2002 20:04:17 -0000 1.12 *************** *** 148,153 **** */ public AllocTraceRef getSiblingAlloc() { return null; - //PENDING } --- 148,160 ---- */ public AllocTraceRef getSiblingAlloc() { + ListIterator itr = getMethod().getCPUTraces().listIterator(); + AllocTraceData trace; + + while ( itr.hasNext() ) { + trace = (AllocTraceData) itr.next(); + if ( frames.equals( trace.getFrames() ) ) + return trace; + } return null; } *************** *** 159,164 **** */ public MonTraceRef getSiblingMon() { return null; - //PENDING } --- 166,178 ---- */ public MonTraceRef getSiblingMon() { + ListIterator itr = getMethod().getCPUTraces().listIterator(); + MonTraceData trace; + + while ( itr.hasNext() ) { + trace = (MonTraceData) itr.next(); + if ( frames.equals( trace.getFrames() ) ) + return trace; + } return null; } *************** *** 171,174 **** --- 185,191 ---- /* * $Log$ + * Revision 1.12 2002/05/13 20:04:17 vachis + * siblings + * * Revision 1.11 2002/05/07 21:11:38 vachis * fix creation of fields, frames Index: FrameData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/FrameData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** FrameData.java 6 May 2002 17:33:01 -0000 1.1 --- FrameData.java 13 May 2002 20:04:17 -0000 1.2 *************** *** 81,88 **** --- 81,128 ---- return getMethod() + ":" + getLineNo(); } + + public boolean equals(Object obj) { + if ( obj == null ) + return false; + + FrameData o = (FrameData) obj; + if ( this.line != o.line ) + return false; + + if ( this.method == null ) { + if (o.method != null ) + return false; + } + else { + if ( !this.method.equals( o.method ) ) + return false; + } + + if ( this.caller == null ) { + if ( o.caller != null ) + return false; + } + else { + if ( !this.caller.equals( o.caller ) ) + return false; + } + + return true; + } + + public int hashCode() { + /*return (method.hashCode() & 0xFFFFFFFF) << 8 + + (caller.hashCode() & 0xFFFFFF) << 6 + + (line & 0xFF);*/ + return method.hashCode() + caller.hashCode() + line; + } + } /* * $Log$ + * Revision 1.2 2002/05/13 20:04:17 vachis + * siblings + * * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention Index: MonTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonTraceData.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** MonTraceData.java 7 May 2002 21:11:38 -0000 1.8 --- MonTraceData.java 13 May 2002 20:04:17 -0000 1.9 *************** *** 148,153 **** */ public AllocTraceRef getSiblingAlloc() { return null; - //PENDING } --- 148,160 ---- */ public AllocTraceRef getSiblingAlloc() { + ListIterator itr = getMethod().getCPUTraces().listIterator(); + AllocTraceData trace; + + while ( itr.hasNext() ) { + trace = (AllocTraceData) itr.next(); + if ( frames.equals( trace.getFrames() ) ) + return trace; + } return null; } *************** *** 159,164 **** */ public CPUTraceRef getSiblingCPU() { return null; - //PENDING } --- 166,178 ---- */ public CPUTraceRef getSiblingCPU() { + ListIterator itr = getMethod().getCPUTraces().listIterator(); + CPUTraceData trace; + + while ( itr.hasNext() ) { + trace = (CPUTraceData) itr.next(); + if ( frames.equals( trace.getFrames() ) ) + return trace; + } return null; } *************** *** 171,174 **** --- 185,191 ---- /* * $Log$ + * Revision 1.9 2002/05/13 20:04:17 vachis + * siblings + * * Revision 1.8 2002/05/07 21:11:38 vachis * fix creation of fields, frames |
From: Marek P. <ma...@us...> - 2002-05-10 17:50:55
|
Update of /cvsroot/javaprofiler/library/src/commun In directory usw-pr-cvs1:/tmp/cvs-serv25366/src/commun Modified Files: communSocket.cpp Log Message: socket read fixes Index: communSocket.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun/communSocket.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** communSocket.cpp 14 Mar 2002 00:08:43 -0000 1.14 --- communSocket.cpp 10 May 2002 17:50:50 -0000 1.15 *************** *** 239,249 **** else buf = new char[size]; ! rc = recv( _csock, buf, size, 0); #ifdef WIN32 ! _failed = (rc == SOCKET_ERROR || rc < size); #else ! _failed = (rc < 0 || rc < size); #endif if( !_failed) b.useBuffer( buf, size); --- 239,260 ---- else buf = new char[size]; ! char* p = buf; ! jint sz = size; ! ! while( sz) { ! ! rc = recv( _csock, p, sz, 0); #ifdef WIN32 ! _failed = (rc == SOCKET_ERROR); #else ! _failed = (rc < 0); #endif + + if( _failed) break; + + sz -= rc; + p += rc; + } if( !_failed) b.useBuffer( buf, size); |
From: Pavel V. <va...@us...> - 2002-05-08 08:09:01
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv21569 Modified Files: AllocThreadMethodData.java AllocThreadTraceData.java CPUThreadMethodData.java CPUThreadTraceData.java MonThreadMethodData.java MonThreadTraceData.java Log Message: siblings Index: AllocThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadMethodData.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** AllocThreadMethodData.java 6 May 2002 17:32:13 -0000 1.14 --- AllocThreadMethodData.java 8 May 2002 08:08:57 -0000 1.15 *************** *** 172,177 **** */ public CPUThreadMethodRef getSiblingCPU() { ! return null; ! //PENDING } --- 172,176 ---- */ public CPUThreadMethodRef getSiblingCPU() { ! return getMethod().getCPUThreadMethod( getThread() ); } *************** *** 183,188 **** */ public MonThreadMethodRef getSiblingMon() { ! return null; ! //PENDING } --- 182,186 ---- */ public MonThreadMethodRef getSiblingMon() { ! return getMethod().getMonThreadMethod( getThread() ); } *************** *** 195,198 **** --- 193,199 ---- /* * $Log$ + * Revision 1.15 2002/05/08 08:08:57 vachis + * siblings + * * Revision 1.14 2002/05/06 17:32:13 vachis * new api implemention Index: AllocThreadTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadTraceData.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** AllocThreadTraceData.java 6 May 2002 17:32:13 -0000 1.14 --- AllocThreadTraceData.java 8 May 2002 08:08:57 -0000 1.15 *************** *** 150,155 **** */ public CPUThreadTraceRef getSiblingCPU() { ! return null; ! //PENDING } --- 150,154 ---- */ public CPUThreadTraceRef getSiblingCPU() { ! return getAllocTrace().getSiblingCPU().getCPUThreadTrace( getThread() ); } *************** *** 161,166 **** */ public MonThreadTraceRef getSiblingMon() { ! return null; ! //PENDING } --- 160,164 ---- */ public MonThreadTraceRef getSiblingMon() { ! return getAllocTrace().getSiblingMon().getMonThreadTrace( getThread() ); } *************** *** 173,176 **** --- 171,177 ---- /* * $Log$ + * Revision 1.15 2002/05/08 08:08:57 vachis + * siblings + * * Revision 1.14 2002/05/06 17:32:13 vachis * new api implemention Index: CPUThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUThreadMethodData.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** CPUThreadMethodData.java 6 May 2002 17:32:13 -0000 1.9 --- CPUThreadMethodData.java 8 May 2002 08:08:57 -0000 1.10 *************** *** 134,139 **** */ public AllocThreadMethodRef getSiblingAlloc() { ! return null; ! //PENDING } --- 134,138 ---- */ public AllocThreadMethodRef getSiblingAlloc() { ! return getMethod().getAllocThreadMethod( getThread() ); } *************** *** 145,150 **** */ public MonThreadMethodRef getSiblingMon() { ! return null; ! //PENDING } --- 144,148 ---- */ public MonThreadMethodRef getSiblingMon() { ! return getMethod().getMonThreadMethod( getThread() ); } *************** *** 156,159 **** --- 154,160 ---- /* * $Log$ + * Revision 1.10 2002/05/08 08:08:57 vachis + * siblings + * * Revision 1.9 2002/05/06 17:32:13 vachis * new api implemention Index: CPUThreadTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUThreadTraceData.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** CPUThreadTraceData.java 6 May 2002 17:32:13 -0000 1.7 --- CPUThreadTraceData.java 8 May 2002 08:08:57 -0000 1.8 *************** *** 104,109 **** */ public AllocThreadTraceRef getSiblingAlloc() { ! return null; ! //PENDING } --- 104,108 ---- */ public AllocThreadTraceRef getSiblingAlloc() { ! return getCPUTrace().getSiblingAlloc().getAllocThreadTrace(getThread()); } *************** *** 115,120 **** */ public MonThreadTraceRef getSiblingMon() { ! return null; ! //PENDING } --- 114,118 ---- */ public MonThreadTraceRef getSiblingMon() { ! return getCPUTrace().getSiblingMon().getMonThreadTrace( getThread() ); } *************** *** 127,130 **** --- 125,131 ---- /* * $Log$ + * Revision 1.8 2002/05/08 08:08:57 vachis + * siblings + * * Revision 1.7 2002/05/06 17:32:13 vachis * new api implemention Index: MonThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonThreadMethodData.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** MonThreadMethodData.java 6 May 2002 17:32:13 -0000 1.6 --- MonThreadMethodData.java 8 May 2002 08:08:57 -0000 1.7 *************** *** 134,139 **** */ public AllocThreadMethodRef getSiblingAlloc() { ! return null; ! //PENDING } --- 134,138 ---- */ public AllocThreadMethodRef getSiblingAlloc() { ! return getMethod().getAllocThreadMethod( getThread() ); } *************** *** 145,150 **** */ public CPUThreadMethodRef getSiblingCPU() { ! return null; ! //PENDING } --- 144,148 ---- */ public CPUThreadMethodRef getSiblingCPU() { ! return getMethod().getCPUThreadMethod( getThread() ); } *************** *** 157,160 **** --- 155,161 ---- /* * $Log$ + * Revision 1.7 2002/05/08 08:08:57 vachis + * siblings + * * Revision 1.6 2002/05/06 17:32:13 vachis * new api implemention Index: MonThreadTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonThreadTraceData.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** MonThreadTraceData.java 6 May 2002 17:32:13 -0000 1.5 --- MonThreadTraceData.java 8 May 2002 08:08:57 -0000 1.6 *************** *** 98,101 **** --- 98,103 ---- } + // ---------- return siblings + /** Returns sibling alloc object. Sibbling object is object with same roots. * In this case it means that object belons to same thread and corresponding trace. *************** *** 105,110 **** */ public AllocThreadTraceRef getSiblingAlloc() { ! return null; ! //PENDING } --- 107,111 ---- */ public AllocThreadTraceRef getSiblingAlloc() { ! return getMonTrace().getSiblingAlloc().getAllocThreadTrace( getThread() ); } *************** *** 116,121 **** */ public CPUThreadTraceRef getSiblingCPU() { ! return null; ! //PENDING } --- 117,121 ---- */ public CPUThreadTraceRef getSiblingCPU() { ! return getMonTrace().getSiblingCPU().getCPUThreadTrace( getThread() ); } *************** *** 127,130 **** --- 127,133 ---- /* * $Log$ + * Revision 1.6 2002/05/08 08:08:57 vachis + * siblings + * * Revision 1.5 2002/05/06 17:32:13 vachis * new api implemention |
From: Pavel V. <va...@us...> - 2002-05-07 21:11:41
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv27134 Modified Files: AllocTraceData.java CallTreeData.java ClassData.java CPUTraceData.java MonTraceData.java SnapshotImpl.java ThreadData.java Log Message: fix creation of fields, frames CallTree new api Index: AllocTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTraceData.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** AllocTraceData.java 6 May 2002 17:32:13 -0000 1.16 --- AllocTraceData.java 7 May 2002 21:11:38 -0000 1.17 *************** *** 34,39 **** implements AllocTraceRef { // private data accessible via getter methods ! private final List frames=new ArrayList(0); ! private final List roFrames=Collections.unmodifiableList(frames); --- 34,39 ---- implements AllocTraceRef { // private data accessible via getter methods ! private final List frames; ! private final List roFrames; *************** *** 58,64 **** AllocTraceData(Integer ID, MethodData method, List frames) { super(ID); ! this.frames.add(frames); ! //FIXME write the constructor, that takes frames from info ! //pending ??assert mehtod == frames.get(0) } --- 58,63 ---- AllocTraceData(Integer ID, MethodData method, List frames) { super(ID); ! this.frames = frames; ! roFrames=Collections.unmodifiableList(frames); } *************** *** 68,73 **** * @param sid data returned by communication layer * @param method allocation data for this method. ! * @param frames frames that make up this trace. It should be ! * <code>List</code> of {@link FrameData} objects. */ AllocTraceData( IProf.sID sid, MethodData method, List frames ) { --- 67,73 ---- * @param sid data returned by communication layer * @param method allocation data for this method. ! * @param frames frames that make up this trace. It should be ! * <code>List</code> of {@link FrameData} objects. Constructor takes this list, ! * it doesn't make a copy of the list. */ AllocTraceData( IProf.sID sid, MethodData method, List frames ) { *************** *** 207,210 **** --- 207,214 ---- /* * $Log$ + * Revision 1.17 2002/05/07 21:11:38 vachis + * fix creation of fields, frames + * CallTree new api + * * Revision 1.16 2002/05/06 17:32:13 vachis * new api implemention Index: CallTreeData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CallTreeData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** CallTreeData.java 6 May 2002 17:32:13 -0000 1.4 --- CallTreeData.java 7 May 2002 21:11:38 -0000 1.5 *************** *** 29,35 **** /** Call tree item of profiled application. Items are connected in a tree-like * graph structure. ! * @author Lukas Petru */ ! public final class CallTreeData implements Serializable { /** time spent in the method (including sub-calls) */ private long cumulativeTime; --- 29,35 ---- /** Call tree item of profiled application. Items are connected in a tree-like * graph structure. ! * @author Lukas Petru, Pavel Vacha */ ! public final class CallTreeData implements Serializable, CallTreeRef { /** time spent in the method (including sub-calls) */ private long cumulativeTime; *************** *** 38,47 **** /** time spent in the method (excluding sub-calls) */ private long pureTime; ! /** method of this item */ ! private MethodData method; /** methods called by this method * (list of sCallTree objects, can be null) */ ! private List children; /** parent item (method from which current method was called) */ private CallTreeData parent; --- 38,48 ---- /** time spent in the method (excluding sub-calls) */ private long pureTime; ! /** frame of this item */ ! private FrameData frame; /** methods called by this method * (list of sCallTree objects, can be null) */ ! private List children = new ArrayList(0); ! private List roChildren = Collections.unmodifiableList( children ); /** parent item (method from which current method was called) */ private CallTreeData parent; *************** *** 57,67 **** */ CallTreeData( CallTreeData caller, MethodData aMethod, ! long aCumulativeTime, long aHits, long aPureTime ) { parent = caller; ! method = aMethod; cumulativeTime = aCumulativeTime; hits = aHits; pureTime = aPureTime; - children = Collections.EMPTY_LIST; if (parent != null) parent.addChild(this); --- 58,68 ---- */ CallTreeData( CallTreeData caller, MethodData aMethod, ! long aCumulativeTime, long aHits, long aPureTime, int lineno ) { parent = caller; ! frame = new FrameData( lineno, aMethod, ! (parent != null) ? parent.frame : null ); cumulativeTime = aCumulativeTime; hits = aHits; pureTime = aPureTime; if (parent != null) parent.addChild(this); *************** *** 76,80 **** IProf.sCallTree aData ) { this(caller, aMethod, aData.cumulativeTime, aData.hits, ! aData.pureTime); } --- 77,81 ---- IProf.sCallTree aData ) { this(caller, aMethod, aData.cumulativeTime, aData.hits, ! aData.pureTime, aData.lineno ); } *************** *** 82,126 **** */ private void addChild( CallTreeData child ) { - if (children == Collections.EMPTY_LIST) - children = new LinkedList(); children.add(child); ! } ! /** Returns method of this item. */ ! public MethodData getMethod() { ! return method; } /** Returns parent of this item in the tree. */ ! public CallTreeData getParent() { return parent; } /** Returns cumulative time. */ ! public long getCumulativeTime() { return cumulativeTime; } /** Returns hit count. */ ! public long getHits() { return hits; } /** returns pure time. */ ! public long getPureTime() { return pureTime; } } /* * $Log$ * Revision 1.4 2002/05/06 17:32:13 vachis * new api implemention - * - * Revision 1.3 2002/03/11 19:13:20 vachis - * coding style - * - * Revision 1.2 2002/03/08 10:39:53 petrul - * automatically add child to parent's list * * Revision 1.1 2002/03/07 10:36:13 petrul --- 83,147 ---- */ private void addChild( CallTreeData child ) { children.add(child); ! } ! ! // -------------- info for package ! ! /** Returns parent of this item in the tree. */ ! CallTreeData getParentData() { ! return parent; ! } ! ! // -------------- info getter methods ! /** Returns method of this item. */ ! public FrameRef getFrame() { ! return frame; } /** Returns parent of this item in the tree. */ ! public CallTreeRef getParent() { return parent; } /** Returns cumulative time. */ ! public long getCPUCumulativeTime() { return cumulativeTime; } /** Returns hit count. */ ! public long getCPUHitsCount() { return hits; } /** returns pure time. */ ! public long getCPUPureTime() { return pureTime; } + + // -------------- children lists getter methods + + /** Returns unmodifiable list of children. + * Roughly it returns list of methods called from this methods. + * Exactly objects are again <code>CallTreeRefs</code> and don't + * include methods, but frames. The {@link FrameRef} is composed from method + * and line number where this method was called from. + * + * @return unmodifibale <code>List</code> of {@link CallTreeRef} objects. + */ + public List getChildren() { + return roChildren; + } + } /* * $Log$ + * Revision 1.5 2002/05/07 21:11:38 vachis + * fix creation of fields, frames + * CallTree new api + * * Revision 1.4 2002/05/06 17:32:13 vachis * new api implemention * * Revision 1.1 2002/03/07 10:36:13 petrul Index: ClassData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ClassData.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** ClassData.java 6 May 2002 17:32:13 -0000 1.11 --- ClassData.java 7 May 2002 21:11:38 -0000 1.12 *************** *** 112,116 **** * @param fields field defined in this class. */ ! void addFields(FieldData field) { fields.add( field ); } --- 112,116 ---- * @param fields field defined in this class. */ ! void addField(FieldData field) { fields.add( field ); } *************** *** 191,194 **** --- 191,198 ---- /* * $Log$ + * Revision 1.12 2002/05/07 21:11:38 vachis + * fix creation of fields, frames + * CallTree new api + * * Revision 1.11 2002/05/06 17:32:13 vachis * new api implemention Index: CPUTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUTraceData.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** CPUTraceData.java 6 May 2002 17:32:13 -0000 1.10 --- CPUTraceData.java 7 May 2002 21:11:38 -0000 1.11 *************** *** 34,39 **** implements CPUTraceRef { // private data accessible via getter methods ! private final List frames=new ArrayList(0); ! private final List roFrames=Collections.unmodifiableList(frames); // lists for children --- 34,39 ---- implements CPUTraceRef { // private data accessible via getter methods ! private final List frames; ! private final List roFrames; // lists for children *************** *** 53,63 **** * @param method profiling data for this method. * @param frames frames that make up this trace. It should be ! * <code>List</code> of {@link FrameData} objects. */ CPUTraceData(Integer ID, MethodData method, List frames) { super(ID); ! this.frames.add(frames); ! //FIXME write the constructor, that takes frames from info ! //pending ??assert mehtod == frames.get(0) } --- 53,63 ---- * @param method profiling data for this method. * @param frames frames that make up this trace. It should be ! * <code>List</code> of {@link FrameData} objects. Constructor takes this list, ! * it doesn't make a copy of the list. */ CPUTraceData(Integer ID, MethodData method, List frames) { super(ID); ! this.frames = frames; ! roFrames=Collections.unmodifiableList(frames); } *************** *** 171,174 **** --- 171,178 ---- /* * $Log$ + * Revision 1.11 2002/05/07 21:11:38 vachis + * fix creation of fields, frames + * CallTree new api + * * Revision 1.10 2002/05/06 17:32:13 vachis * new api implemention Index: MonTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonTraceData.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** MonTraceData.java 6 May 2002 17:32:13 -0000 1.7 --- MonTraceData.java 7 May 2002 21:11:38 -0000 1.8 *************** *** 35,40 **** implements MonTraceRef { // private data accessible via getter methods ! private final List frames=new ArrayList(0); ! private final List roFrames=Collections.unmodifiableList(frames); // lists for children --- 35,40 ---- implements MonTraceRef { // private data accessible via getter methods ! private final List frames; ! private final List roFrames; // lists for children *************** *** 54,64 **** * @param method profiling data for this method. * @param frames frames that make up this trace. It should be ! * <code>List</code> of {@link FrameData} objects. */ MonTraceData(Integer ID, MethodData method, List frames) { super(ID); ! this.frames.add(frames); ! //FIXME write the constructor, that takes frames from info ! //pending ??assert mehtod == frames.get(0) } --- 54,64 ---- * @param method profiling data for this method. * @param frames frames that make up this trace. It should be ! * <code>List</code> of {@link FrameData} objects. Constructor takes this list, ! * it doesn't make a copy of the list. */ MonTraceData(Integer ID, MethodData method, List frames) { super(ID); ! this.frames = frames; ! roFrames=Collections.unmodifiableList(frames); } *************** *** 171,174 **** --- 171,178 ---- /* * $Log$ + * Revision 1.8 2002/05/07 21:11:38 vachis + * fix creation of fields, frames + * CallTree new api + * * Revision 1.7 2002/05/06 17:32:13 vachis * new api implemention Index: SnapshotImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/SnapshotImpl.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** SnapshotImpl.java 6 May 2002 17:32:13 -0000 1.20 --- SnapshotImpl.java 7 May 2002 21:11:38 -0000 1.21 *************** *** 554,558 **** List listInner; List postOpLst = new LinkedList(); - List postOpIterLst = new LinkedList(); IDObjectData obj, objInner, objOpposite; --- 554,557 ---- *************** *** 592,597 **** sid = (IProf.sID) iterInner.next(); //this could by factory ! objInner = createAndPutIn( whatType, sid, obj, postOpLst, ! postOpIterLst ); libIDs.put( objInner.getID(), objInner ); if ( out != null ) --- 591,595 ---- sid = (IProf.sID) iterInner.next(); //this could by factory ! objInner = createAndPutIn( whatType, sid, obj, postOpLst); libIDs.put( objInner.getID(), objInner ); if ( out != null ) *************** *** 604,609 **** //}; - postOpIterLst = doPostOpIter( whatType, obj, postOpIterLst ); - if ( iter == null ) //one pass break; --- 602,605 ---- *************** *** 613,617 **** listInner = null; postOpLst = null; - postOpIterLst = null; } //PENDING trow other exception --- 609,612 ---- *************** *** 647,656 **** Iterator ctIt = iprof.getCallTreeThruIterator (threadID, true); ! if (ctIt == null) return null; if (ctIt.hasNext ()) { ! IProf.sCallTree sRoot = (IProf.sCallTree) ctIt.next (); ! MethodData method = (MethodData) libIDs.get (new Integer ( ! sRoot.methodObjId)); ! root = new CallTreeData (null, method, sRoot); root.missingChildrenCount = sRoot.numOfChildren; } --- 642,652 ---- Iterator ctIt = iprof.getCallTreeThruIterator (threadID, true); ! if (ctIt == null) ! return null; if (ctIt.hasNext ()) { ! IProf.sCallTree sRoot = (IProf.sCallTree) ctIt.next(); ! MethodData method = (MethodData) libIDs.get( new Integer( ! sRoot.methodObjId) ); ! root = new CallTreeData(null, method, sRoot); root.missingChildrenCount = sRoot.numOfChildren; } *************** *** 659,701 **** while (current != null) { if (current.missingChildrenCount > 0) { ! IProf.sCallTree sChild = (IProf.sCallTree) ctIt.next (); ! MethodData method = (MethodData) libIDs.get (new Integer ( ! sChild.methodObjId)); ! CallTreeData child = new CallTreeData (current, method, sChild); current.missingChildrenCount--; child.missingChildrenCount = sChild.numOfChildren; current = child; ! } else { ! current = current.getParent(); } } return root; } ! ! /* Uses postOpIterLst, returns new List, which should be used used in next ! * iteration. It called for each extract operation (each obect in List ! * <code>in</code> in method <code>extract()</code> ! */ ! private List doPostOpIter( int whatType, IDObjectData refObj, List postOpIterLst ) { ! if ( postOpIterLst == null ) ! return new LinkedList(); ! // if ( refObj == null ) ! // return postOpIterLst; ! ! switch ( whatType ) { ! case IProf.CLASS_FIELDS_INSTANCES: { ! //PENDING //FIXME ! //((ClassData) refObj).setInstaceFields( postOpIterLst ); ! return new LinkedList(); ! } ! case IProf.CLASS_FIELDS_STATICS: { ! //PENDING //FIXME ! //((ClassData) refObj).setStaticFields( postOpIterLst ); ! return new LinkedList(); ! } ! default: return postOpIterLst; ! } ! } ! /* This method is called at the end of <code>extract()</code> method. */ --- 655,673 ---- while (current != null) { if (current.missingChildrenCount > 0) { ! IProf.sCallTree sChild = (IProf.sCallTree) ctIt.next(); ! MethodData method = (MethodData) libIDs.get( new Integer( ! sChild.methodObjId) ); ! CallTreeData child = new CallTreeData(current, method, sChild); current.missingChildrenCount--; child.missingChildrenCount = sChild.numOfChildren; current = child; ! } ! else { ! current = current.getParentData(); } } return root; } ! /* This method is called at the end of <code>extract()</code> method. */ *************** *** 720,734 **** */ private List createFramesFromInfo( IProf.sTraceInfo trcInfo ) { ! int num = trcInfo.numFrames; ! int i; ! ! List frames = new ArrayList( trcInfo.numFrames ); ! for ( i = 0; i < num; i++ ) ! frames.add(new FrameData( trcInfo.frames[i].lineno, ((MethodData) libIDs.get( new Integer(trcInfo.frames[i].methodObjId ))), (i==0) ? null : ((FrameData) frames.get(i-1)) )); ! return frames; }; --- 692,706 ---- */ private List createFramesFromInfo( IProf.sTraceInfo trcInfo ) { ! int num = trcInfo.numFrames; ! int i; ! ! List frames = new ArrayList( trcInfo.numFrames ); ! for ( i = 0; i < num; i++ ) ! frames.add(new FrameData( trcInfo.frames[i].lineno, ((MethodData) libIDs.get( new Integer(trcInfo.frames[i].methodObjId ))), (i==0) ? null : ((FrameData) frames.get(i-1)) )); ! return frames; }; *************** *** 744,749 **** */ private IDObjectData createAndPutIn( int whatType, IProf.sID sid, ! IDObjectData refObj, List postOpLst, ! List postOpIterLst) { switch ( whatType ) { case IProf.CLASSES: { --- 716,720 ---- */ private IDObjectData createAndPutIn( int whatType, IProf.sID sid, ! IDObjectData refObj, List postOpLst) { switch ( whatType ) { case IProf.CLASSES: { *************** *** 791,795 **** ClassData rf = (ClassData) refObj; FieldData newObj = new FieldData( sid, rf, true ); ! postOpIterLst.add( newObj ); //later setStaticFileds() is called to this List return newObj; } --- 762,766 ---- ClassData rf = (ClassData) refObj; FieldData newObj = new FieldData( sid, rf, true ); ! rf.addField( newObj ); return newObj; } *************** *** 798,802 **** ClassData rf = (ClassData) refObj; FieldData newObj = new FieldData( sid, rf, false ); ! postOpIterLst.add( newObj ); //later setInstanceFileds() is called to this List return newObj; } --- 769,773 ---- ClassData rf = (ClassData) refObj; FieldData newObj = new FieldData( sid, rf, false ); ! rf.addField( newObj ); return newObj; } *************** *** 1132,1136 **** //FIXME: - //creation of fiels, frames, //to fill list of traces --- 1103,1106 ---- *************** *** 1146,1149 **** --- 1116,1123 ---- /* * $Log$ + * Revision 1.21 2002/05/07 21:11:38 vachis + * fix creation of fields, frames + * CallTree new api + * * Revision 1.20 2002/05/06 17:32:13 vachis * new api implemention Index: ThreadData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ThreadData.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** ThreadData.java 6 May 2002 17:32:13 -0000 1.19 --- ThreadData.java 7 May 2002 21:11:38 -0000 1.20 *************** *** 443,451 **** */ public CallTreeRef getCallTree () { ! return null;//callTree; FIXME } - //PENDING active? - public String toString() { return getName(); --- 443,449 ---- */ public CallTreeRef getCallTree () { ! return callTree; } public String toString() { return getName(); *************** *** 455,458 **** --- 453,460 ---- /* * $Log$ + * Revision 1.20 2002/05/07 21:11:38 vachis + * fix creation of fields, frames + * CallTree new api + * * Revision 1.19 2002/05/06 17:32:13 vachis * new api implemention |
From: Pavel V. <va...@us...> - 2002-05-07 21:06:44
|
Update of /cvsroot/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv25468 Modified Files: readme.txt Log Message: no message Index: readme.txt =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/readme.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** readme.txt 22 Feb 2002 13:28:08 -0000 1.4 --- readme.txt 7 May 2002 21:06:37 -0000 1.5 *************** *** 36,40 **** ---------------------------------------------------------------------- ! If you do not have any Ant, you can get it from http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/ --- 36,40 ---- ---------------------------------------------------------------------- ! If you do not have the Ant, you can get it from http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/ |
From: Pavel V. <va...@us...> - 2002-05-06 18:08:03
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl In directory usw-pr-cvs1:/tmp/cvs-serv7943 Modified Files: VirtualMachineImpl.java Log Message: temporary thing, only for compilation Index: VirtualMachineImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/VirtualMachineImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** VirtualMachineImpl.java 27 Jan 2002 22:51:56 -0000 1.4 --- VirtualMachineImpl.java 6 May 2002 18:04:16 -0000 1.5 *************** *** 105,112 **** //pending: if not_suspendedVM then suspendVM and resumeVM suspendThreads(); ! Snapshot snap = new SnapshotImpl( iprof ); resumeThreads(); ! return snap; ! //return null; } --- 105,113 ---- //pending: if not_suspendedVM then suspendVM and resumeVM suspendThreads(); ! //FIXME ! SnapshotImpl snap = new SnapshotImpl( iprof ); resumeThreads(); ! //return snap; ! return null; } *************** *** 336,339 **** --- 337,343 ---- /* * $Log$ + * Revision 1.5 2002/05/06 18:04:16 vachis + * temporary thing, only for compilation + * * Revision 1.4 2002/01/27 22:51:56 stolis * isShutdowned() and shutdown() methods added. |
From: Pavel V. <va...@us...> - 2002-05-06 17:33:04
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv27708 Added Files: AllocTypeThreadData.java AllocTypeThreadMethodData.java AllocTypeThreadTraceData.java AllStatIDObjectData.java FieldData.java FrameData.java TypeData.java Log Message: new api implemention --- NEW FILE: AllocTypeThreadData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; import net.sourceforge.javaprofiler.api.*; /** * Allocation data for one thread and class. * * @author Jan Stola, Pavel Vacha, Lukas Petru */ public class AllocTypeThreadData extends AllocStatIDObjectData implements AllocTypeThreadRef { /** Allocation data for this thread. */ private ThreadData thread; /** Allocation data for this type. */ private TypeData type; // lists for children private final List allocTypeThreadMethods=new ArrayList(0); private final List allocTypeThreadTraces=new ArrayList(0); // unmodifiable variants of lists for children private final List roAllocTypeThreadMethods=Collections.unmodifiableList( allocTypeThreadMethods); private final List roAllocTypeThreadTraces=Collections.unmodifiableList( allocTypeThreadTraces); /** * Creates new AllocTypeThreadData. * * @param ID unique ID of this object. * @param thread allocation data for this thread. * @param type allocation data for this class. */ AllocTypeThreadData(Integer ID, ThreadData thread, TypeData type) { super(ID); this.thread=thread; this.type=type; } /** * Creates new AllocTypeThreadData. * * @param sid data returned by communication layer * @param thread allocation data for this thread. * @param type allocation data for this type. */ AllocTypeThreadData(IProf.sID sid, ThreadData thread, TypeData type) { this( new Integer(sid.objId) , thread, type ); //if (sid.alloc!=null) //do not test this, its an error setStat(sid.alloc); } /** * Adds method where an instance of this class was allocated * (in given thread). * * @param method method where an instance of this class was allocated * (in given thread). */ void addMethod(AllocTypeThreadMethodData method) { allocTypeThreadMethods.add(method); //pending MAP } /** * Adds trace where an instance of this class was allocated * (in given thread). * * @param trace method where an instance of this class was allocated * (in given thread). */ void addTrace(AllocTypeThreadTraceData trace) { allocTypeThreadTraces.add(trace); //pending MAP } // ---------- return parents /** * Return allocation data for this class. * * @return allocation data for this class. */ public TypeRef getType() { return type; } /** * Returns allocation data for this thread. * * @return allocation data for this thread. */ public ThreadRef getThread() { return thread; } // ---------- return child Lists /** * Returns unmodifiable list of methods where an instance of this class was allocated * (and in this thread). * * @return unmodifiable list of {@link AllocTypeThreadMethodRef} objects. */ public List getAllocTypeThreadMethods() { return roAllocTypeThreadMethods; } /** * Returns statistic data for given method where an instances of this class were * allocated (and in this thread). * * @param peer method. * @return method where an instances of this class were * allocated (and in this thread) or <code>null</code> if such thread does * not exist. */ public AllocTypeThreadMethodRef getAllocTypeThreadMethod(MethodRef peer) { return null; //PENDING } /** * Returns unmodifiable list of traces where an instance of this class was allocated * (in given thread). * * @return unmodifiable list of {@link AllocTypeThreadTraceRef} objects. */ public List getAllocTypeThreadTraces() { return roAllocTypeThreadTraces; } /** * Returns statistic data for given trace where an instances of this class were * allocated (and in this thread). * * @param peer trace. * @return trace where an instances of this class were * allocated (and in this thread) or <code>null</code> if such thread does * not exist. */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(AllocTraceRef peer) { return null; //PENDING } public String toString() { return getType() + "-" + getThread(); } } /* * $Log: AllocTypeThreadData.java,v $ * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention * */ --- NEW FILE: AllocTypeThreadMethodData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; import net.sourceforge.javaprofiler.api.*; /** * Allocation data for one class, method and thread. * * @author Jan Stola, Pavel Vacha, Lukas Petru */ public class AllocTypeThreadMethodData extends AllocStatIDObjectData implements AllocTypeThreadMethodRef { /** Allocation data for this type and thread. */ private AllocTypeThreadData typeThread; /** Allocation data for this type and method. */ private AllocTypeMethodData typeMethod; /** Allocation data for this method and thread. */ private AllocThreadMethodData threadMethod; // lists for children private final List allocTypeThreadTraces=new ArrayList(0); // unmodifiable variants of lists for children private final List roAllocTypeThreadTraces=Collections.unmodifiableList( allocTypeThreadTraces); /** * Creates new AllocTypeThreadMethodData. * * @param ID unique ID of this object. * @param typeThread allocation data for this type and thread. * @param typeMethod allocation data for this type and method. * @param threadMethod allocation data for this thread and method. */ AllocTypeThreadMethodData(Integer ID, AllocTypeThreadData typeThread, AllocTypeMethodData typeMethod, AllocThreadMethodData threadMethod) { super(ID); this.typeThread=typeThread; this.typeMethod=typeMethod; this.threadMethod=threadMethod; } /** * Creates new AllocTypeThreadMethodData. * * @param sid data returned by communication layer * @param threadType allocation data for this type and thread. * @param typeMethod allocation data for this type and method. * @param threadMethod allocation data for this thread and method. */ AllocTypeThreadMethodData(IProf.sID sid, AllocTypeThreadData threadType, AllocTypeMethodData typeMethod, AllocThreadMethodData threadMethod) { this( new Integer(sid.objId), threadType, typeMethod, threadMethod ); //if (sid.alloc!=null) //do not test this, its an error setStat(sid.alloc); } /** * Adds trace of this method in this thread where instances of this * type (class or array of classes) were allocated. * * @param trace trace of this method in this thread where instances of this * type were allocated. */ void addTrace(AllocTypeThreadTraceData trace) { allocTypeThreadTraces.add(trace); //pending MAP } // ---------- return parents /** * Returns allocation data for this type and method. * * @return allocation data for this type and method. */ public AllocTypeMethodRef getAllocTypeMethod() { return typeMethod; } /** * Returns allocation data for this thread and method. * * @return allocation data for this thread and method. */ public AllocThreadMethodRef getAllocThreadMethod() { return threadMethod; } /** * Returns allocation data for this type and thread. * * @return allocation data for this type and thread. */ public AllocTypeThreadRef getAllocTypeThread() { return typeThread; } // ---------- return child Lists /** * Returns unmodifiable list of traces of this method in this thread where instances of this * type (class or array of classes) were allocated. * * @return unmodifiable list of {@link AllocTypeThreadTraceRef} objects. */ public List getAllocTypeThreadTraces() { return roAllocTypeThreadTraces; } /** * Returns statistic data for given trace. The trace of this method in this thread where * instances of this class were allocated. * * @param peer trace. * @return trace of this method in this thread where * instances of this class were allocated or <code>null</code> if such * trace does not exist. */ public AllocTypeThreadTraceRef getAllocTypeThreadTrace(AllocTraceRef peer) { return null; //PENDING } // ------------- roots /** * Returns allocation data for this thread (root object). * * @return allocation data for this thread (root object). */ public ThreadRef getThread() { return getAllocTypeThread().getThread(); } /** * Returns allocation data for this type (root object). * * @return allocation data for this type (root object). */ public TypeRef getType() { return getAllocTypeThread().getType(); } /** * Returns allocation data for this method (root object). * * @return allocation data for this method (root object). */ public MethodRef getMethod() { return getAllocTypeMethod().getMethod(); } public String toString() { return getType() + "-" + getThread() + "-" + getMethod(); } } /* * $Log: AllocTypeThreadMethodData.java,v $ * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention * */ --- NEW FILE: AllocTypeThreadTraceData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import net.sourceforge.javaprofiler.jpiimpl.commun.*; import net.sourceforge.javaprofiler.api.*; /** * Allocation data for one class, thread and trace. * * @author Jan Stola, Pavel Vacha, Lukas Petru */ public class AllocTypeThreadTraceData extends AllocStatIDObjectData implements AllocTypeThreadTraceRef { /** Allocation data for this type and trace. */ private AllocTypeTraceData typeTrace; /** Allocation data for this type, thread and method. */ private AllocTypeThreadMethodData threadTypeMethod; /** Allocation data for this thread and trace. */ private AllocThreadTraceData threadTrace; /** * Creates new AllocTypeThreadTraceData. * * @param ID unique ID of this object. * @param typeTrace allocation data for this type and trace. * @param threadTypeMethod allocation data for this type, thread and method. * @param threadTrace allocation data for this thread and trace. */ AllocTypeThreadTraceData(Integer ID, AllocTypeTraceData typeTrace, AllocTypeThreadMethodData threadTypeMethod, AllocThreadTraceData threadTrace) { super(ID); this.typeTrace=typeTrace; this.threadTypeMethod=threadTypeMethod; this.threadTrace=threadTrace; } /** * Creates new AllocTypeThreadTraceData. * * @param sid data returned by communication layer * @param typeTrace allocation data for this type and trace. * @param threadTypeMethod allocation data for this type, thread and method. * @param threadTrace allocation data for this thread and trace. */ AllocTypeThreadTraceData(IProf.sID sid, AllocTypeTraceData classTrace, AllocTypeThreadMethodData threadClassMethod, AllocThreadTraceData threadTrace) { this( new Integer(sid.objId), classTrace, threadClassMethod, threadTrace ); //if (sid.alloc!=null) //do not test this, its an error setStat(sid.alloc); } // ---------- return parents /** * Returns allocation data for this type, thread and method. * * @return allocation data for this type, thread and method. */ public AllocTypeThreadMethodRef getAllocTypeThreadMethod() { return threadTypeMethod; } /** * Returns allocation data for this type and trace. * * @return allocation data for this type and trace. */ public AllocTypeTraceRef getAllocTypeTrace() { return typeTrace; } /** * Returns allocation data for this thread and trace. * * @return allocation data for this thread and trace. */ public AllocThreadTraceRef getAllocThreadTrace() { return threadTrace; } /** * Returns allocation data for this type and thread. * * @return allocation data for this type and thread. */ public AllocTypeThreadRef getAllocTypeThread() { return threadTypeMethod.getAllocTypeThread(); } // ---------- return child Lists // ------------- roots /** * Returns allocation data for this thread (root object). * * @return allocation data for this thread (root object). */ public ThreadRef getThread() { return getAllocTypeThread().getThread(); } /** * Returns allocation data for this type (root object). * * @return allocation data for this type (root object). */ public TypeRef getType() { return getAllocTypeThread().getType(); } /** * Returns allocation data for this trace (root object). * * @return allocation data for this trace (root object). */ public AllocTraceRef getAllocTrace() { return getAllocTypeTrace().getAllocTrace(); } public String toString() { return getType() + "-" + getThread() + "-" + getAllocTrace(); } } /* * $Log: AllocTypeThreadTraceData.java,v $ * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention * */ --- NEW FILE: AllStatIDObjectData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.api.*; /** * Class with statistic data for memory, CPU and monitors profiling. * * * @author Pavel Vacha */ public abstract class AllStatIDObjectData extends IDObjectData implements AllocStatData, AllocStat, CPUStatData, CPUStat, MonStatData, MonStat{ /** * Constructor to be used by subclasses. * * @param ID unique ID. */ protected AllStatIDObjectData(Integer ID) { super(ID); } /** Fills statistics on instances. * * @param stat Object with statistics on instances. */ public void setStat(IProf.sID sid) { if (sid.cpu != null) setStat(sid.cpu); if (sid.mon != null) setStat(sid.mon); if (sid.alloc!=null) { setStat(sid.alloc); } } //ALLOC ------------------------------------------------------------------ /** Number of live instances. */ private long numLiveInstances; /** Total number of created instances. */ private long numTotalInstances; /** Amount of space used by live instances. */ private long sizeLiveInstances; /** Total amount of space used by created instances. */ private long sizeTotalInstances; /** * Fills statistics on instances. * * @param stat Object with statistics on instances. */ public void setStat(IProf.sAllocStatData stat) { numLiveInstances=stat.allocNumInstancesLive; numTotalInstances=stat.allocNumInstancesTotal; sizeLiveInstances=stat.allocSizeInstancesLive; sizeTotalInstances=stat.allocSizeInstancesTotal; } /** * Returns number of live instances. * * @return number of live instances. */ public long getLiveInstancesCount() { return numLiveInstances; } /** * Returns total number of created instances. * * @return total number of created instances. */ public long getTotalInstancesCount() { return numTotalInstances; } /** * Returns amount of space used by live instances. * * @return amount of space used by live instances. */ public long getLiveInstancesSize() { return sizeLiveInstances; } /** * Returns total amount of space used by created instances. * * @return total amount of space used by created instances. */ public long getTotalInstancesSize() { return sizeTotalInstances; } /** * Adds given size (in bytes) to the statistics. * * @param size size of newly created instance. */ public void addToStat(int size) { numLiveInstances++; numTotalInstances++; sizeLiveInstances+=size; sizeTotalInstances+=size; } /** * Removes given size (in bytes) from the statistics; * * @param size of the garbage collected instance. */ public void subFromStat(int size) { numLiveInstances--; sizeLiveInstances-=size; } /** * Adds listener to changes in Alloc data * *@param listener to Alloc data changes */ public void addAllocStatListener( AllocStatListener listener) { } /** * Removes listener to changes in Alloc data * *@param listener to Alloc data changes */ public void removeAllocStatListener( AllocStatListener listener) { } //CPU ----------------------------------------------------------- //** Pure time spent in this method or trace. */ private long cpuPureTime; /** How many times was this method or trace called. */ private long cpuHits; /** * Adds given number of hits and time to the statistics. * * @param hits how many times was this method or trace called. * @param time pure time spent in this method or trace. */ public void addToCPUStat(long hits, long time) { this.cpuHits+=hits; this.cpuPureTime+=time; } /** * Returns how many times was this method or trace called. * * @return how many times was this method or trace called. */ public long getCPUHitsCount() { return cpuHits; } /** * Returns pure time spent in this method or trace. * * @return pure time spent in this method or trace. */ public long getCPUPureTime() { return cpuPureTime; } /** Fills statistics on instances. * * @param stat Object with statistics on instances. */ public void setStat(IProf.sCpuStatData stat) { cpuPureTime=stat.pureTime; cpuHits=stat.hits; } /** * Adds listener to changes in CPU data * *@param listener to CPU data changes */ public void addCPUStatListener( CPUStatListener listener) { } /** * Adds listener to changes in CPU data * *@param listener to CPU data changes */ public void removeCPUStatListener( CPUStatListener listener) { } //MON ----------------------------------------------------------------- /** Pure time spent by waiting for monitors. */ private long monPureTime; /** How many times waited this method */ private long monHits; /** * Adds given number of hits and time to the statistics. * * @param hits how many times waited this method * @param time pure time spent by waiting for monitors */ public void addToMonStat(long hits, long time) { this.monHits+=hits; this.monPureTime+=time; } /** * Returns how many times waited this method * * @return how many times waited this method */ public long getMonHitsCount() { return monHits; } /** * Returns pure time spent by waiting for monitors * * @return pure time spent by waiting for monitors */ public long getMonPureTime() { return monPureTime; } /** Fills statistics on instances. * * @param stat Object with statistics on instances. */ public void setStat(IProf.sMonStatData stat) { monPureTime=stat.time; monHits=stat.hits; } /** * Adds listener to changes in Monitor data * *@param listener to monitor data changes */ public void addMonStatListener( MonStatListener listener) { } /** * Adds listener to changes in Monitor data * *@param listener to monitor data changes */ public void removeMonStatListener( MonStatListener listener) { } } --- NEW FILE: FieldData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import net.sourceforge.javaprofiler.jpiimpl.commun.*; import net.sourceforge.javaprofiler.api.*; /** * Static or instance field of class. * * @author Jan Stola, Pavel Vacha, Lukas Petru */ public class FieldData extends IDObjectData implements FieldRef { /** Name of the field. */ private String name; /** Signature of the field. */ private String signature; private final ClassData fieldClass; private final boolean isStatic; /** * Creates new ClassFieldData * * @param ID unique ID of this object. * @param name name of the field. * @param signature signature of the field. */ FieldData(Integer ID, String name, String signature, ClassData parentClass, boolean aStatic) { super(ID); this.name=name; this.signature=signature; fieldClass=parentClass; isStatic=aStatic; } /** * Creates new ClassFieldData * * @param sid data returned by communication layer . */ FieldData(IProf.sID sid, ClassData parentClass, boolean aStatic) { this( new Integer(sid.objId), ((IProf.sClassFieldInfo) sid.info).fieldName, ((IProf.sClassFieldInfo) sid.info).fieldSignature, parentClass, aStatic); } // -------------- info getter methods /** * Returns name of the field. * * @return name of the field. */ public String getName() { return name; } /** * Returns signature of the field. * * @return signature of the field. */ public String getSignature() { return signature; } /** * Returns ClassRef which the field belongs to. * * @return parentClass of the field. */ public ClassRef getParentClass() { return fieldClass; } /** *Returns whether the field is static field. * *@return whether the field is static. */ public boolean isStatic() { return isStatic; } public String toString() { return getName(); } } /* * $Log: FieldData.java,v $ * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention * * Revision 1.4 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer * * Revision 1.1.1.1 2001/07/11 22:27:58 stolis * no message * */ --- NEW FILE: FrameData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.io.Serializable; import net.sourceforge.javaprofiler.api.*; /** * Frame of some trace. * * @author Jan Stola, Pavel Vacha */ public class FrameData implements Serializable, FrameRef { /** Line number of this frame in the source file. */ private final int line; /** Method of this frame. */ private final MethodData method; private final FrameData caller; /** * Creates new FrameData. * * @param line line number of this frame in the source file. * @param method method of this frame. */ FrameData(int line, MethodData method, FrameData callerFrame) { this.line=line; this.method=method; caller=callerFrame; } // -------------- info getter methods /** * Returns line line number of this frame in the source file. * * @return line line number of this frame in the source file. */ public int getLineNo() { return line; } /** * Returns method of this frame. * * @return method of this frame. */ public MethodRef getMethod() { return method; } /** * Returns caller of this frame. * * @return caller of this frame. */ public FrameRef getCallerFrame() { return caller; } public String toString() { return getMethod() + ":" + getLineNo(); } } /* * $Log: FrameData.java,v $ * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention * * Revision 1.3 2002/04/20 10:25:55 stolis * Implements Serializable (is contained in Snapshot). * * Revision 1.1.1.1 2001/07/11 22:28:10 stolis * no message * */ --- NEW FILE: TypeData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; import net.sourceforge.javaprofiler.api.*; /** * Allocation data for one class. * * @author Jan Stola, Pavel Vacha, Lukas Petru */ public class TypeData extends AllocStatIDObjectData implements TypeRef { /** Class related to this type (class or array of classes), may be NULL for arrays of ints,bytes,etc. */ private ClassData componentClass; /** * Type of array (for example JVMPI_NORMAL_OBJECT, JVMPI_CLASS, * JVMPI_BOOLEAN etc.) */ private int arrayType; private String name; private boolean isArray; private boolean isPrimitiveArray; private final VirtualMachineImageRef vmImage; // lists for children private final List allocTypeMethods=new ArrayList(0); private final List allocTypeTraces=new ArrayList(0); private final List allocTypeThreads=new ArrayList(0); // unmodifiable variants of lists for children private final List roAllocTypeMethods=Collections.unmodifiableList( allocTypeMethods); private final List roAllocTypeTraces=Collections.unmodifiableList( allocTypeTraces); private final List roAllocTypeThreads=Collections.unmodifiableList( allocTypeThreads); /** * Creates new TypeData. * * @param ID unique ID of this object. * @param classData class related to this type (class or array of classes), may be NULL for arrays of ints,bytes,etc.. * @param typeID object ID of the AllocType object. * @param arrayType arrayType of this type. * @param virtualMachineImage VirtualMachineImage this method belongs to. The VirtualMachineImage could be live * (realtime implementation) or static (snaphshot). */ TypeData(Integer ID, ClassData componentClass, int arrayType, VirtualMachineImageRef vmImage) { super(ID); this.componentClass=componentClass; this.arrayType=arrayType; this.vmImage=vmImage; isArray = true; isPrimitiveArray = componentClass == null; switch ( arrayType ) { case IProf.JVMPI_NORMAL_OBJECT: name = componentClass.getName(); isArray = false; break; case IProf.JVMPI_CLASS: name = "[" + componentClass.getName(); break; case IProf.JVMPI_BOOLEAN: name = "[Z"; break; case IProf.JVMPI_BYTE: name = "[B"; break; case IProf.JVMPI_CHAR: name = "[C"; break; case IProf.JVMPI_SHORT: name = "[S"; break; case IProf.JVMPI_INT: name = "[I"; break; case IProf.JVMPI_LONG: name = "[J"; break; case IProf.JVMPI_FLOAT: name = "[F"; break; case IProf.JVMPI_DOUBLE: name = "[D"; break; default: name = ""; } } /** * Creates new TypeData. * @param sid data returned by communication layer * @param componentClass class related to this type (class or array of classes), may be NULL for arrays of ints,bytes,etc.. * @param virtualMachineImage VirtualMachineImage this method belongs to. The VirtualMachineImage could be live * (realtime implementation) or static (snaphshot). */ TypeData(IProf.sID sid, ClassData componentClass, VirtualMachineImageRef vmImage) { this( new Integer(sid.objId), componentClass, ((IProf.sObjectInfo) sid.info).isArray, vmImage ); //if (sid.alloc != null) //do not test this, its an error setStat(sid.alloc); } /** * Adds method where instance of this type (class or array of classes) was allocated. * * @param method method where instance of this class were allocated. */ void addMethod(AllocTypeMethodData method) { allocTypeMethods.add(method); //pending MAP } /** * Adds thread where instances of this type (class or array of classes) were allocated. * * @param thread where instances of this type (class or array of classes) were allocated. */ void addThread(AllocTypeThreadData thread) { allocTypeThreads.add(thread); //pending MAP } /** * Adds trace where instance of this type (class or array of classes) was allocated. * * @param trace method where instance of this class were allocated. */ void addTrace(AllocTypeTraceData trace) { allocTypeTraces.add(trace); //pending MAP } // -------------- info getter methods /** Returns name of a type. */ public String getName() { return name; } /** Returns component class of this type. */ public ClassRef getComponentClass() { return componentClass; } /** Returns true, if this type is an array. */ public boolean isArray() { return isArray; } /** Returns true, if this type is an array of primitive component type. */ public boolean isArrayOfPrimitives() { return isPrimitiveArray; } /** * Returns VirtualMachineImage this method belongs to. The VirtualMachineImage could be live * (realtime implementation) or static (snaphshot). * * @return VirtualMachineImage this method belongs to. */ public VirtualMachineImageRef getVirtualMachineImage() { return vmImage; } // -------------- children lists getter methods /** * Return unmodifiable list of trace in which instances of this type (class or array of classes) were allocated. * * @return lunmodifiable ist between {@link AllocTypeTraceRef} objects. */ public List getAllocTypeTraces() { return roAllocTypeTraces; } /** * Returns statistic data for given trace where instance of this type (class or array of classes) was allocated. * * @param peer trace. * @return trace where instance of this type (class or array of classes) was allocated * or <code>null</code> if such method does not exist. */ public AllocTypeTraceRef getAllocTypeTrace(AllocTraceRef peer) { return null; //PENDING; } /** * Returns unmodifiable list of methods where instance of this type (class or array of classes) were allocated. * * @return unmodifiable list between {@link AllocTypeMethodRef} objects. */ public List getAllocTypeMethods() { return roAllocTypeMethods; } /** * Returns statistic data for given method where instance of this type (class or array of classes) was allocated. * * @param peer method. * @return method where instance of this type (class or array of classes) was allocated * or <code>null</code> if such method does not exist. */ public AllocTypeMethodRef getAllocTypeMethod(MethodRef peer) { return null; //PENDING; } /** * Return unmodifiable list of threads in which instances of this type (class or array of classes) were allocated. * * @return unmodifiable list between {@link AllocTypeThreadRef} objects. */ public List getAllocTypeThreads() { return roAllocTypeThreads; } /** * Returns statistic data for given thread where instances of this type (class or array of classes) * were allocated. * * @param peer thread. * @return thread where instances of this type (class or array of classes) * were allocated or <code>null</code> if such thread does not exist. */ public AllocTypeThreadRef getAllocTypeThread(ThreadRef peer) { return null; //PENDING; } public String toString () { return getName(); } } /* * $Log: TypeData.java,v $ * Revision 1.1 2002/05/06 17:33:01 vachis * new api implemention * */ |
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv27491 Modified Files: ThreadGroupData.java ThreadData.java SnapshotImpl.java MonTraceData.java MonThreadTraceData.java MonThreadMethodData.java MonStatIDObjectData.java MonStatData.java MethodData.java IDObjectData.java CPUTraceData.java CPUThreadTraceData.java CPUThreadMethodData.java CPUStatIDObjectData.java CPUStatData.java ClassData.java CallTreeData.java AllocTypeTraceData.java AllocTypeMethodData.java AllocTraceData.java AllocThreadTraceData.java AllocThreadMethodData.java AllocStatIDObjectData.java AllocStatData.java AllocArenaData.java Log Message: new api implemention Index: ThreadGroupData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ThreadGroupData.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ThreadGroupData.java 3 Mar 2002 01:20:09 -0000 1.5 --- ThreadGroupData.java 6 May 2002 17:32:13 -0000 1.6 *************** *** 24,41 **** import net.sourceforge.javaprofiler.jpiimpl.commun.*; /** * Information about one thread group. * ! * @author Jan Stola */ ! public class ThreadGroupData extends IDObjectData { /** Name of the thread group. */ ! private String name; ! /** ! * Threads in this group. ! * List of {@link ThreadData} objects. ! */ ! private List threads; /** --- 24,45 ---- import net.sourceforge.javaprofiler.jpiimpl.commun.*; + import net.sourceforge.javaprofiler.api.*; /** * Information about one thread group. * ! * @author Jan Stola, Pavel Vacha, Lukas Petru */ ! public class ThreadGroupData extends IDObjectData implements ThreadGroupRef { ! /** Name of the thread group. */ ! private String groupName; ! ! // lists for children ! private final List threads=new ArrayList(0); ! ! // unmodifiable variants of lists for children ! private final List roThreads=Collections.unmodifiableList( ! threads); /** *************** *** 44,51 **** * @param ID unique ID of this object. */ ! ThreadGroupData(Integer ID, String name) { super(ID); ! this.name=name; ! threads=new LinkedList(); } --- 48,54 ---- * @param ID unique ID of this object. */ ! ThreadGroupData(Integer ID, String groupName) { super(ID); ! this.groupName=groupName; } *************** *** 60,113 **** /** ! * Returns name of this thread group. ! * ! * @return name of this thread group. ! */ ! public String getName() { ! return name; ! } ! ! /** ! * Returns threads in this group. * ! * @return <code>List</code> of {@link ThreadData} objects. */ ! public List getThreads() { ! return threads; } /** ! * Adds thread into this group. * ! * @param thread thread in this group. */ ! void addThread(ThreadData thread) { ! threads.add(thread); } /** ! * Removes thread from this group. * ! * @param thread thread in this group. */ ! void removeThread(ThreadData thread) { ! threads.remove(thread); } } /* * $Log$ * Revision 1.5 2002/03/03 01:20:09 vachis * type of ID changed from int to Integer - * - * Revision 1.4 2001/12/02 15:57:56 petrul - * changed constructor code - * - * Revision 1.3 2001/11/20 22:23:37 vachis - * Contructors from IProf.sID and monitors statistic info - * - * Revision 1.2 2001/09/29 21:01:33 stolis - * Plural added in licenses. * * Revision 1.1.1.1 2001/07/11 22:28:06 stolis --- 63,109 ---- /** ! * Adds thread into this group. * ! * @param thread thread in this group. */ ! void addThread(ThreadData thread) { ! threads.add(thread); } + // -------------- info getter methods + /** ! * Returns name of this thread group. * ! * @return name of this thread group. */ ! public String getName() { ! return groupName; } + // -------------- children lists getter methods + /** ! * Returns threads in this group. * ! * @return unmodifiable <code>List</code> of {@link ThreadRef} objects. */ ! public List getThreads() { ! return roThreads; } + public String toString() { + return getName(); + } + } /* * $Log$ + * Revision 1.6 2002/05/06 17:32:13 vachis + * new api implemention + * * Revision 1.5 2002/03/03 01:20:09 vachis * type of ID changed from int to Integer * * Revision 1.1.1.1 2001/07/11 22:28:06 stolis Index: ThreadData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ThreadData.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** ThreadData.java 7 Mar 2002 10:35:24 -0000 1.18 --- ThreadData.java 6 May 2002 17:32:13 -0000 1.19 *************** *** 24,69 **** import net.sourceforge.javaprofiler.jpiimpl.commun.*; ! /** * Information about one thread. * ! * @author Jan Stola, Pavel Vacha */ ! public class ThreadData extends AllocStatIDObjectData { ! /** Name of the thread. */ ! private String name; ! /** Group of the thread. */ ! private ThreadGroupData group; ! /** Parent of the thread. */ private ThreadData parent; - /** Determines whether this thread is active. */ private boolean active; ! /** ! * Children of this thread. ! * List of {@link ThreadData} objects. ! */ ! private List children; ! /** ! * Map of types (classes or arrays of classes) whose instances were allocated in this thread. ! * Mapping of {@link AllocThreadTypeData} objects and types IDs. ! */ ! private Map types; ! /** ! * Map of methods invoked in this thread. ! * Mapping of {@link AllocThreadMethodData} objects and method IDs. ! */ ! private Map allocMethods; ! /** ! * Map of methods invoked in this thread. ! * Mapping of {@link CPUThreadMethodData} objects and method IDs. ! */ ! private Map CPUMethods; ! /** ! * Map of methods invoked in this thread. ! * Mapping of {@link MonThreadMethodData} objects and method IDs. ! */ ! private Map MonMethods; ! /** Call tree of methods in this thread. ! */ private CallTreeData callTree; --- 24,70 ---- import net.sourceforge.javaprofiler.jpiimpl.commun.*; ! import net.sourceforge.javaprofiler.api.*; /** * Information about one thread. * ! * @author Jan Stola, Pavel Vacha, Lukas Petru */ ! public class ThreadData extends AllStatIDObjectData ! implements ThreadRef, AllocStatData, MonStatData, CPUStatData { ! // private data accessible via getter methods ! private String threadName; ! private ThreadGroupData threadGroup; private ThreadData parent; private boolean active; ! private final VirtualMachineImageRef vmImage; ! ! // lists for children ! private final List allocTypeThreads=new ArrayList(0); ! private final List allocThreadMethods=new ArrayList(0); ! private final List allocThreadTraces=new ArrayList(0); ! private final List cpuThreadMethods=new ArrayList(0); ! private final List cpuThreadTraces=new ArrayList(0); ! private final List monThreadMethods=new ArrayList(0); ! private final List monThreadTraces=new ArrayList(0); ! private final List childThreads=new ArrayList(0); ! ! // unmodifiable variants of lists for children ! private final List roAllocTypeThreads=Collections.unmodifiableList( ! allocTypeThreads); ! private final List roAllocThreadMethods=Collections.unmodifiableList( ! allocThreadMethods); ! private final List roAllocThreadTraces=Collections.unmodifiableList( ! allocThreadTraces); ! private final List roCPUThreadMethods=Collections.unmodifiableList( ! cpuThreadMethods); ! private final List roCPUThreadTraces=Collections.unmodifiableList( ! cpuThreadTraces); ! private final List roMonThreadMethods=Collections.unmodifiableList( ! monThreadMethods); ! private final List roMonThreadTraces=Collections.unmodifiableList( ! monThreadTraces); ! private final List roChildThreads=Collections.unmodifiableList( ! childThreads); ! private CallTreeData callTree; *************** *** 75,92 **** * @param group group of this thread. * @param parent parent of this thread. ! * @param active determines whether this thread is active. */ ! ThreadData(Integer ID, String name, ThreadGroupData group, ! ThreadData parent, boolean active) { super(ID); ! this.name=name; ! this.group=group; this.parent=parent; //warning probably may be null this.active=active; - children=Collections.EMPTY_LIST; - types=Collections.EMPTY_MAP; - allocMethods=Collections.EMPTY_MAP; - CPUMethods=Collections.EMPTY_MAP; - MonMethods=Collections.EMPTY_MAP; } --- 76,91 ---- * @param group group of this thread. * @param parent parent of this thread. ! * @param virtualMachineImage VirtualMachineImage this method belongs to. The VirtualMachineImage could be live ! * (realtime implementation) or static (snaphshot). ! * @param active determines whether this thread is active. */ ! ThreadData(Integer ID, String name, ThreadGroupData group, ! ThreadData parent, VirtualMachineImageRef vmImage, boolean active) { super(ID); ! this.threadName=name; ! this.threadGroup=group; this.parent=parent; //warning probably may be null + this.vmImage=vmImage; this.active=active; } *************** *** 97,154 **** * @param group group of this thread. * @param parent parent of this thread. */ ! ThreadData( IProf.sID sid, ThreadGroupData group, ThreadData parent ) { ! this( new Integer(sid.objId), ((IProf.sThreadInfo)sid.info).threadName, group, ! parent, sid.active); ! //if (sid.alloc != null) //do not test this, its an error ! setStatistics(sid.alloc); } /** ! * Returns name of this thread. * ! * @return name of this thread. */ ! public String getName() { ! return name; } /** ! * Returns group of this thread. * ! * @return group of this thread. */ ! public ThreadGroupData getGroup() { ! return group; } /** ! * Returns parent of this thread. * ! * @return parent of this thread. */ ! public ThreadData getParent() { ! return parent; } /** ! * Sets parent for this thread. Use this, if you can't pass parent ! * param to constructor. * ! * @param parent parent of this thread. */ ! void setParent( ThreadData parent ) { ! this.parent = parent; } ! /** ! * Determines whether this thread is active. * ! * @return <code>true</code> if this thread is active. Returns ! * <code>false</code> otherwise. */ ! public boolean isActive() { ! return active; } --- 96,216 ---- * @param group group of this thread. * @param parent parent of this thread. + * @param virtualMachineImage VirtualMachineImage this method belongs to. The VirtualMachineImage could be live + * (realtime implementation) or static (snaphshot). */ ! ThreadData( IProf.sID sid, ThreadGroupData group, ThreadData parent, ! VirtualMachineImageRef vmImage) { ! this( new Integer(sid.objId), ((IProf.sThreadInfo)sid.info).threadName, ! group, parent, vmImage, sid.active); ! if (sid.alloc != null) ! setStat(sid.alloc); } + /** Fills statistics on instances. + * + * @param stat Object with statistics on instances. + */ + public void setStat(IProf.sID sid) { + setStat(sid.alloc); //only alloc is inlcluded for thread + } + /** ! * Sets parent for this thread. Use this, if you can't pass parent ! * param to constructor. * ! * @param parent parent of this thread. */ ! void setParent( ThreadData parent ) { ! this.parent = parent; } /** ! * Adds child of this thread. * ! * @param child child of this thread. ! */ ! void addChild(ThreadData child) { ! childThreads.add(child); ! } ! ! /** ! * Adds type that was allocated in this thread. Type ! * can be instance of class or its array. ! * ! * @param allocType allocType that were allocated in this thread. */ ! void addType(AllocTypeThreadData allocType) { ! allocTypeThreads.add(allocType); ! //pending MAP } /** ! * Adds method invoked in this thread. * ! * @param method method invoked in this thread. */ ! void addAllocMethod(AllocThreadMethodData method) { ! allocThreadMethods.add(method); ! //pending MAP ! } ! ! /** ! * Adds method invoked in this thread. ! * ! * @param method method invoked in this thread. ! */ ! void addCPUMethod(CPUThreadMethodData method) { ! cpuThreadMethods.add(method); ! //pending MAP ! } ! ! /** ! * Adds method invoked in this thread. (monitors data) ! * ! * @param method method invoked in this thread. ! */ ! void addMonMethod(MonThreadMethodData method) { ! monThreadMethods.add(method); ! //pending MAP } /** ! * Adds trace created in this thread. (alloc data) * ! * @param trace created in this thread. */ ! void addAllocTrace(AllocThreadTraceData trace) { ! allocThreadTraces.add(trace); ! //pending MAP } ! /** ! * Adds trace created in this thread. (CPU data) * ! * @param trace created in this thread. */ ! void addCPUTrace(CPUThreadTraceData trace) { ! cpuThreadTraces.add(trace); ! //pending MAP ! } ! ! /** ! * Adds trace created in this thread. (monitors data) ! * ! * @param trace created in this thread. ! */ ! void addMonTrace(MonThreadTraceData trace) { ! monThreadTraces.add(trace); ! //pending MAP ! } ! ! //PENDING MAP ! ! /** Set tree of method calls in this thread. ! * @param root Root of call tree for this thread ! */ ! void setCallTree (CallTreeData root) { ! callTree = root; } *************** *** 156,323 **** * Sets active flag of this thread. * ! * @param active determines whether this thread is active. */ void setActive(boolean active) { this.active=active; } /** ! * Returns children of this thread. * ! * @return <code>List</code> of {@link ThreadData} objects. */ ! public List getChildren() { ! return children; } /** ! * Adds child of this thread. * ! * @param child child of this thread. */ ! void addChild(ThreadData child) { ! if ( children == Collections.EMPTY_LIST ) ! children = new LinkedList(); ! children.add(child); } ! ! /** ! * Returns map of types (classes or arrays of classes) whose instances were allocated in this thread. * ! * @return mapping of {@link AllocThreadTypeData} objects and types IDs. */ ! public Map getTypes() { ! return types; } /** ! * Adds type that was allocated in this thread. Type ! * can be instance of class or its array. * ! * @param allocType allocType that were allocated in this thread. */ ! void addType(AllocThreadTypeData allocType) { ! if ( types == Collections.EMPTY_MAP ) ! types = new HashMap(); ! types.put(allocType.getID(), allocType); } ! /** ! * Returns class (with given ID) whose instances were allocated ! * in this thread. * ! * @param ID ID of the class. ! * @return class (with given ID) whose instances were allocated ! * in this thread or <code>null</code> if such class does not exist. ! */ ! public AllocThreadTypeData getType(Integer ID) { ! return (AllocThreadTypeData)types.get(ID); ! } ! /** ! * Returns map of methods invoked in this thread. * ! * @return mapping of {@link AllocThreadMethodData} objects and method IDs. */ ! public Map getAllocMethods() { ! return allocMethods; } /** ! * Adds method invoked in this thread. * ! * @param method method invoked in this thread. */ ! void addAllocMethod(AllocThreadMethodData method) { ! if ( allocMethods == Collections.EMPTY_MAP ) ! allocMethods = new HashMap(); ! allocMethods.put(method.getMethod().getID(), method); } /** ! * Returns method (with given ID) invoked in this thread. * ! * @param ID ID of the method. ! * @return method (with given ID) invoked in this thread * or <code>null</code> if such method does not exist. */ ! public AllocThreadMethodData getAllocMethod(Integer ID) { ! return (AllocThreadMethodData)allocMethods.get(ID); } ! /** ! * Map of methods invoked in this thread. * ! * @return mapping of {@link CPUThreadMethodData} objects and method IDs. */ ! public Map getCPUMethods() { ! return CPUMethods; } ! /** ! * Adds method invoked in this thread. * ! * @param method method invoked in this thread. */ ! void addCPUMethod(CPUThreadMethodData method) { ! if ( CPUMethods == Collections.EMPTY_MAP ) ! CPUMethods = new HashMap(); ! CPUMethods.put(method.getMethod().getID(), method); } ! /** ! * Returns method (with given ID) invoked in this thread. * ! * @param ID ID of the method. ! * @return method (with given ID) invoked in this thread * or <code>null</code> if such method does not exist. */ ! public CPUThreadMethodData getCPUMethod(Integer ID) { ! return (CPUThreadMethodData)CPUMethods.get(ID); } /** ! * Map of methods invoked in this thread. (monitors data) * ! * @return mapping of {@link MonThreadMethodData} objects and method IDs. */ ! public Map getMonMethods() { ! return MonMethods; } ! /** ! * Adds method invoked in this thread. (monitors data) * ! * @param method method invoked in this thread. ! */ ! void addMonMethod(MonThreadMethodData method) { ! if ( MonMethods == Collections.EMPTY_MAP ) ! MonMethods = new HashMap(); ! MonMethods.put(method.getMethod().getID(), method); } /** ! * Returns method (with given ID) invoked in this thread. * ! * @param ID ID of the method. (monitors data) ! * @return method (with given ID) invoked in this thread * or <code>null</code> if such method does not exist. */ ! public MonThreadMethodData getMonMethod(Integer ID) { ! return (MonThreadMethodData)MonMethods.get(ID); } ! ! /** Returns tree of method calls in this thread. ! * @return Root of call tree for this thread */ ! public CallTreeData getCallTree () { ! return callTree; } ! /** Set tree of method calls in this thread. ! * @param root Root of call tree for this thread */ ! public void setCallTree (CallTreeData root) { ! callTree = root; } } --- 218,453 ---- * Sets active flag of this thread. * ! * @param active determines whether the thread is active. */ void setActive(boolean active) { this.active=active; } + + //GETTER methods ------------------------------------------------------- + // -------------- info getter methods /** ! * Returns name of this thread. * ! * @return name of this thread. */ ! public String getName() { ! return threadName; } /** ! * Returns parent of this thread. * ! * @return parent of this thread. */ ! public ThreadRef getParentThread() { ! return parent; } ! ! /** ! * Returns group of this thread. * ! * @return group of this thread. */ ! public ThreadGroupRef getThreadGroup() { ! return threadGroup; } /** ! * Returns VirtualMachineImage this method belongs to. The VirtualMachineImage could be live ! * (realtime implementation) or static (snaphshot). * ! * @return VirtualMachineImage this method belongs to. */ ! public VirtualMachineImageRef getVirtualMachineImage() { ! return vmImage; } ! /** ! * Determines whether the thread is active. * ! * @return <code>true</code> if the threas is active. Returns ! * <code>false</code> otherwise. ! */ ! public boolean isActive() { ! return active; ! } ! ! // -------------- children lists getter methods ! /** ! * Returns unmodifiable list of methods invoked in this thread. (allocation data) * ! * @return unmodifiable list of {@link AllocThreadMethodRef} objects. */ ! public List getAllocThreadMethods() { ! return roAllocThreadMethods; } /** ! * Returns statistic data for given method that was invoked in this thread. ! * (allocation data) * ! * @param peer method. ! * @return method invoked in this thread ! * or <code>null</code> if such method does not exist. */ ! public AllocThreadMethodRef getAllocThreadMethod(MethodRef peer) { ! return null; ! //PENDING ! } ! ! /** ! * Returns unmodifiable list of traces created in this thread. (allocation data) ! * ! * @return unmodifiable list of {@link AllocThreadTracedRef} objects. ! */ ! public List getAllocThreadTraces() { ! return roAllocThreadTraces; } /** ! * Returns statistic data for given trace that was created in this thread. ! * (allocation data) * ! * @param peer trace. ! * @return trace created in this thread * or <code>null</code> if such method does not exist. */ ! public AllocThreadTraceRef getAllocThreadTrace(AllocTraceRef peer) { ! return null; ! //PENDING } ! /** ! * Returns unmodifiable list of types (classes or arrays of classes) whose instances were allocated in this thread. * ! * @return unmodifiable list of {@link AllocTypeThreadRef} objects. */ ! public List getAllocTypeThreads() { ! return roAllocTypeThreads; } + + /** + * Returns statistic data for given type (class or array of types) whose instances were allocated + * in this thread. + * + * @param peer type. + * @return type whose instances were allocated + * in this thread or <code>null</code> if such class does not exist. + */ + public AllocTypeThreadRef getAllocTypeThread(TypeRef peer) { + return null; + //PENDING + } ! /** ! * Returns unmodifiable list of methods invoked in this thread. (CPU data) * ! * @return unmodifiable list of {@link CPUThreadMethodRef} objects. */ ! public List getCPUThreadMethods() { ! return roCPUThreadMethods; } ! /** ! * Returns statistic data for given method that was invoked in this thread. ! * (CPU data) * ! * @param peer method. ! * @return method invoked in this thread * or <code>null</code> if such method does not exist. */ ! public CPUThreadMethodRef getCPUThreadMethod(MethodRef peer) { ! return null; ! //PENDING } /** ! * Returns unmodifiable list of traces created in this thread. (CPU data) * ! * @return unmodifiable list of {@link CPUThreadTraceRef} objects. */ ! public List getCPUThreadTraces() { ! return roCPUThreadTraces; } ! /** ! * Returns statistic data for given trace that was created in this thread. ! * (CPU data) * ! * @param peer trace. ! * @return trace created in this thread ! * or <code>null</code> if such method does not exist. ! */ ! public CPUThreadTraceRef getCPUThreadTrace(CPUTraceRef peer) { ! return null; ! //PENDING } /** ! * Returns unmodifiable list of methods invoked in this thread. (monitors data) ! * ! * @return unmodifiable list of {@link MonThreadMethodRef} objects. ! */ ! public List getMonThreadMethods() { ! return roMonThreadMethods; ! } ! ! /** ! * Returns statistic data for given method that was invoked in this thread. ! * (monitors data) * ! * @param peer method. ! * @return method invoked in this thread * or <code>null</code> if such method does not exist. */ ! public MonThreadMethodRef getMonThreadMethod(MethodRef peer) { ! return null; ! //PENDING } ! ! /** ! * Returns unmodifiable list of traces created in this thread. (monitors data) ! * ! * @return unmodifiable list of {@link MonThreadTRaceRef} objects. */ ! public List getMonThreadTraces() { ! return roMonThreadTraces; ! } ! ! /** ! * Returns statistic data for given trace that was created in this thread. ! * (monitors data) ! * ! * @param peer trace. ! * @return trace created in this thread ! * or <code>null</code> if such method does not exist. ! */ ! public MonThreadTraceRef getMonThreadTrace(MonTraceRef peer) { ! return null; ! //PENDING } ! /** ! * Returns children of this thread. ! * ! * @return unmodifiable <code>List</code> of {@link ThreadRef} objects. */ ! public List getChildThreads() { ! return roChildThreads; ! } ! ! /** Returns tree of method calls in this thread. ! * @return Root of call tree for this thread ! */ ! public CallTreeRef getCallTree () { ! return null;//callTree; FIXME ! } ! ! //PENDING active? ! ! public String toString() { ! return getName(); } } *************** *** 325,381 **** /* * $Log$ * Revision 1.18 2002/03/07 10:35:24 petrul * callTree field added - * - * Revision 1.17 2002/03/04 23:59:53 vachis - * removed/delayed allocation, use of Collections.EMPTY_MAP - * - * Revision 1.16 2002/03/03 01:20:09 vachis - * type of ID changed from int to Integer - * - * Revision 1.15 2002/03/01 11:41:43 vachis - * doc changes - * - * Revision 1.14 2002/02/16 16:21:52 vachis - * code refacorization Class.. to Type... (forgotten methods) - * - * Revision 1.13 2002/02/15 22:37:30 vachis - * code refactorization Class..Data renamed to Type..Data - * - * Revision 1.12 2002/01/15 22:05:56 vachis - * addClass() modified - * adding allocClassData insted fo classData - * - * Revision 1.11 2002/01/11 22:22:16 vachis - * unnecessary test removed - * - * Revision 1.10 2001/12/27 14:11:39 vachis - * new setParent() method - * - * Revision 1.9 2001/12/09 23:21:01 vachis - * temporary fix, classData may be null - * - * Revision 1.8 2001/12/05 00:39:26 vachis - * MonMethods fix - * - * Revision 1.7 2001/12/03 10:13:19 vachis - * addChild() fix - * - * Revision 1.6 2001/12/02 15:54:40 petrul - * changed constructor code - * - * Revision 1.5 2001/11/20 22:23:37 vachis - * Contructors from IProf.sID and monitors statistic info - * - * Revision 1.4 2001/09/29 21:01:33 stolis - * Plural added in licenses. - * - * Revision 1.3 2001/07/19 21:59:22 stolis - * Keys of maps changed. - * - * Revision 1.2 2001/07/18 22:20:39 stolis - * Mirrors for CPU profiling added; - * references to obejct IDs removed; - * Lists changed to Maps. * * Revision 1.1.1.1 2001/07/11 22:28:06 stolis --- 455,463 ---- /* * $Log$ + * Revision 1.19 2002/05/06 17:32:13 vachis + * new api implemention + * * Revision 1.18 2002/03/07 10:35:24 petrul * callTree field added * * Revision 1.1.1.1 2001/07/11 22:28:06 stolis Index: SnapshotImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/SnapshotImpl.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** SnapshotImpl.java 9 Apr 2002 08:20:16 -0000 1.19 --- SnapshotImpl.java 6 May 2002 17:32:13 -0000 1.20 *************** *** 25,30 **** import java.io.Serializable; ! import net.sourceforge.javaprofiler.jpi.*; ! import net.sourceforge.javaprofiler.jpi.dump.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; import net.sourceforge.javaprofiler.jpiimpl.data.*; --- 25,29 ---- import java.io.Serializable; ! import net.sourceforge.javaprofiler.api.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; import net.sourceforge.javaprofiler.jpiimpl.data.*; *************** *** 32,53 **** /** ! * Implementation of Snapshot. * ! * @see net.sourceforge.javaprofiler.jpi.Snapshot * @author Pavel Vacha */ ! public class SnapshotImpl implements Snapshot, Serializable { ! private String name; ! private long time; transient private Map libIDs; //converts libIds to references ! private List classes = new LinkedList(); ! private List methods = new LinkedList(); ! private List groupThreads = new LinkedList(); ! private List threads = new LinkedList(); ! private List allocTypes = new LinkedList(); ! private List arenas = new LinkedList(); ! private List gcs = new LinkedList(); private Configuration conf; --- 31,62 ---- /** ! * Implementation of Snapshot (VirtualMachineImage). * ! * @see net.sourceforge.javaprofiler.api.VirtualMachineImageRef * @author Pavel Vacha */ ! public class SnapshotImpl implements VirtualMachineImageRef, Serializable { ! private String name; ! private long time; //PENDING transient private Map libIDs; //converts libIds to references ! private final List classes = new ArrayList(); ! private final List methods = new ArrayList(); ! private final List groupThreads = new ArrayList(); ! private final List threads = new ArrayList(); ! private final List types = new ArrayList(); ! private final List arenas = new ArrayList(); ! private final List gcs = new ArrayList(); ! ! // unmodifiable variants of lists ! private final List roClasses = Collections.unmodifiableList( classes ); ! private final List roMethods = Collections.unmodifiableList( methods ); ! private final List roGroupThreads = Collections.unmodifiableList( ! groupThreads); ! private final List roThreads = Collections.unmodifiableList( threads ); ! private final List roTypes = Collections.unmodifiableList( types ); ! private final List roArenas = Collections.unmodifiableList( arenas ); ! private final List roGcs = Collections.unmodifiableList( gcs ); private Configuration conf; *************** *** 170,186 **** ////////////////////////////////////////////////////////////////////////// ! // implementation of Snapdhot interface ////////////////////////////////////////////////////////////////////////// ! /** ! * Returns number of threads that were running by the time the snapshot ! * was made. ! * ! * @return number of threads that were running by the time the snapshot ! * was made. ! */ ! public int getThreadCount() { ! return threads.size(); ! } /** --- 179,186 ---- ////////////////////////////////////////////////////////////////////////// ! // implementation of VirtualMachineImage interface ////////////////////////////////////////////////////////////////////////// ! //------------------------ maybe /** *************** *** 201,259 **** * monitors in the mirrored virtual machine. */ ! public List dumpMonitors() { ! //PENDIG ! return null; ! } ! ! /** ! * Returns size (in bytes) of free memory in the mirrored virtual machine. ! * ! * @return size (in bytes) of free memory in the mirrored virtual machine. ! */ ! public long freeMemory() { ! //PENDIG ! return 0; ! } - /** - * Returns <code>index</code>-th loaded type by the mirrored virtual machine. - * - * @param index index of some loaded type by the mirrored virtual machine. - * @return a {@link ReferenceType} object representing <code>index</code>-th - * loaded type by the mirrored virtual machine. - */ - public ReferenceType getClass(int index) { - //PENDING - //return classes.get( index ); - return null; - } - - /** - * Returns number of all loaded types by the mirrored virtual machine. - * - * @return number of all loaded types by the mirrored virtual machine. - */ - public int getClassCount() { - return classes.size(); - } /** - * Returns a list of the currently running threads. For each running thread - * in the target VM, a {@link ThreadInfo} that holds information about it - * is placed in the list. The returned list contains threads created through - * <code>Thread</code>, all native threads attached to the target - * VM through JNI, and system threads created by the target VM. - * <p>Thread objects that have not yet been started - * (through <code>Thread.start()</code>) and thread objects that - * have completed their execution are not included in the returned list. - * - * @return a <code>List</code> of {@link ThreadInfo} objects, one for each - * running thread in the mirrored VM. - */ - public List threads() { - return threads; - } - - /** * Sets name of this snapshot. * --- 201,211 ---- * monitors in the mirrored virtual machine. */ ! //public List dumpMonitors() { ! // //PENDIG ! // return null; ! //} /** * Sets name of this snapshot. * *************** *** 265,281 **** /** - * Returns all loaded types. For each loaded type in the target VM - * a {@link ReferenceType} will be placed in the returned list. The list - * will include <code>ReferenceTypes</code> which mirror classes, interfaces, - * and array types. - * - * @return a <code>List</code> of {@link ReferenceType} objects, each - * mirroring a loaded type in the target VM. - */ - public List classes() { - return classes; - } - - /** * Returns size (in bytes) of allocated memory in the mirrored virtual * machine. --- 217,220 ---- *************** *** 298,302 **** } ! /** * Performed heap dump of the mirrored virtual machine. * --- 237,241 ---- } ! /** * Performed heap dump of the mirrored virtual machine. * *************** *** 304,344 **** * representing the content of the memory of the mirrored virtual machine. */ ! public HeapDump dumpHeap() { //PENDING ! return null; } ! //some public classes, that are not in interface yet ! /** Returns list of objects, that can be allocated. * These are class, array of class array of int, etc. * ! * @return list of allocatable objects. */ ! public List allocTypes() { ! return allocTypes; } ! /** Retuns list of Group of threads. * ! * @return list of Group of threads. */ ! public List groupOfThreads() { ! return groupThreads; } ! /** Returns list of objects with garbage collector information. * ! *@return list of objects with garbage collector information. */ ! public List gcs() { ! return gcs; } ! /**Return list of arenas. * *@return list of arenas. */ ! public List arenas() { ! return arenas; } --- 243,335 ---- * representing the content of the memory of the mirrored virtual machine. */ ! //public HeapDump dumpHeap() { //PENDING ! // return null; ! //} ! ! //------------------------ interafacee ! ! /** ! * Returns a unmodifiable list of threads. The returned list contains threads created through ! * <code>Thread</code>, all native threads attached to the target ! * VM through JNI, and system threads created by the target VM. ! * <p>Thread objects that have not yet been started ! * (through <code>Thread.start()</code>) and thread objects that ! * have completed their execution are included in the returned list too. ! * ! * @return a unmodifiable <code>List</code> of {@link ThreadRef} objects, one for each ! * thread in the image of VirtualMachine. ! */ ! public List getThreads() { ! return roThreads; ! } ! ! /** ! * Returns all loaded classes. For each loaded type in the target VM ! * a {@link ClassRef} will be placed in the returned list. ! * ! * @return a unmodifiable <code>List</code> of {@link ClassRef} objects, each ! * corresponding with a loaded type in the target VM. ! */ ! public List getClasses() { ! return roClasses; } ! /** Returns unmodifiable list of objects, that can be allocated. * These are class, array of class array of int, etc. * ! * @return unmodifiable <code>List</code> of {@link TypeRef} objects. ! */ ! public List getTypes() { ! return roTypes; ! } ! ! /** Retuns unmodifiable list of Group of threads. ! * ! * @return unmodifiable <code>List</code> of {@link ThreadGroupRef} objects. */ ! public List getThreadGroups() { ! return roGroupThreads; } ! /** Returns unmodifiable list of objects with garbage collector information. * ! *@return unmodifiable <code>List</code> of {@link GCSRef} objects. */ ! public List getGcs() { ! return roGcs; } ! /**Return unmodifiable list of objects with information about arenas. * ! *@return unmodifiable list of arenas. */ ! public List getArenas() { ! return roArenas; } ! /**Return list of objects with information about arenas. * *@return list of arenas. */ ! public List getMethods() { ! return roMethods; ! } ! ! //is it usefull? ! ! public List getMonTraces() { ! return null; ! //PENDING ! } ! ! public List getCPUTraces() { ! return null; ! //PENDING ! } ! ! public List getAllocTraces() { ! return null; ! //PENDING } *************** *** 442,448 **** actLst.clear(); if ( conf.withTypes ) { ! extract( null, allocTypes, IProf.OBJECT_TYPES, IProf.NO_OPTIONAL_ARG, iprof ); ! extract( allocTypes, (conf.withAllocTraces)? actLst : null, IProf.ALLOC_OBJECT_METHODS, IProf.NO_OPTIONAL_ARG, iprof ); --- 433,439 ---- actLst.clear(); if ( conf.withTypes ) { ! extract( null, types, IProf.OBJECT_TYPES, IProf.NO_OPTIONAL_ARG, iprof ); ! extract( types, (conf.withAllocTraces)? actLst : null, IProf.ALLOC_OBJECT_METHODS, IProf.NO_OPTIONAL_ARG, iprof ); *************** *** 694,702 **** switch ( whatType ) { case IProf.CLASS_FIELDS_INSTANCES: { ! ((ClassData) refObj).setInstaceFields( postOpIterLst ); return new LinkedList(); } case IProf.CLASS_FIELDS_STATICS: { ! ((ClassData) refObj).setStaticFields( postOpIterLst ); return new LinkedList(); } --- 685,695 ---- switch ( whatType ) { case IProf.CLASS_FIELDS_INSTANCES: { ! //PENDING //FIXME ! //((ClassData) refObj).setInstaceFields( postOpIterLst ); return new LinkedList(); } case IProf.CLASS_FIELDS_STATICS: { ! //PENDING //FIXME ! //((ClassData) refObj).setStaticFields( postOpIterLst ); return new LinkedList(); } *************** *** 732,739 **** List frames = new ArrayList( trcInfo.numFrames ); for ( i = 0; i < num; i++ ) ! frames.add(new TraceFrameData( trcInfo.frames[i].lineno, ((MethodData) libIDs.get( ! new Integer(trcInfo.frames[i].methodObjId )) ! ) )); return frames; }; --- 725,733 ---- List frames = new ArrayList( trcInfo.numFrames ); for ( i = 0; i < num; i++ ) ! frames.add(new FrameData( trcInfo.frames[i].lineno, ((MethodData) libIDs.get( ! new Integer(trcInfo.frames[i].methodObjId ))), ! (i==0) ? null : ((FrameData) frames.get(i-1)) ! )); return frames; }; *************** *** 761,765 **** ClassData clz = (ClassData) libIDs.get( new Integer( ((IProf.sObjectInfo) sid.info).classObjId)); ! return new AllocTypeData( sid, clz ); } --- 755,759 ---- ClassData clz = (ClassData) libIDs.get( new Integer( ((IProf.sObjectInfo) sid.info).classObjId)); ! return new TypeData( sid, clz, this ); } *************** *** 781,785 **** Integer parentID = new Integer( ((IProf.sThreadInfo) sid.info).parentObjId); ThreadData parent = (ThreadData) libIDs.get( parentID); ! ThreadData newObj = new ThreadData( sid, up, parent ); up.addThread( newObj ); if (parent != null ) --- 775,779 ---- Integer parentID = new Integer( ((IProf.sThreadInfo) sid.info).parentObjId); ThreadData parent = (ThreadData) libIDs.get( parentID); ! ThreadData newObj = new ThreadData( sid, up, parent, this ); up.addThread( newObj ); if (parent != null ) *************** *** 796,800 **** case IProf.CLASS_FIELDS_STATICS: { ClassData rf = (ClassData) refObj; ! ClassFieldData newObj = new ClassFieldData( sid ); postOpIterLst.add( newObj ); //later setStaticFileds() is called to this List return newObj; --- 790,794 ---- case IProf.CLASS_FIELDS_STATICS: { ClassData rf = (ClassData) refObj; ! FieldData newObj = new FieldData( sid, rf, true ); postOpIterLst.add( newObj ); //later setStaticFileds() is called to this List return newObj; *************** *** 803,807 **** case IProf.CLASS_FIELDS_INSTANCES: { ClassData rf = (ClassData) refObj; ! ClassFieldData newObj = new ClassFieldData( sid ); postOpIterLst.add( newObj ); //later setInstanceFileds() is called to this List return newObj; --- 797,801 ---- case IProf.CLASS_FIELDS_INSTANCES: { ClassData rf = (ClassData) refObj; ! FieldData newObj = new FieldData( sid, rf, false ); postOpIterLst.add( newObj ); //later setInstanceFileds() is called to this List return newObj; *************** *** 810,814 **** case IProf.METHODS: { ClassData up = (ClassData) libIDs.get( new Integer(sid.parentUpObjId) ); ! MethodData newObj = new MethodData( sid, up ); up.addMethod( newObj ); return newObj; --- 804,808 ---- case IProf.METHODS: { ClassData up = (ClassData) libIDs.get( new Integer(sid.parentUpObjId) ); ! MethodData newObj = new MethodData( sid, up, this ); up.addMethod( newObj ); return newObj; *************** *** 816,820 **** case IProf.CLASS_METHODS: { ClassData up = (ClassData) refObj; ! MethodData newObj = new MethodData( sid, up ); up.addMethod( newObj ); return newObj; --- 810,814 ---- case IProf.CLASS_METHODS: { ClassData up = (ClassData) refObj; ! MethodData newObj = new MethodData( sid, up, this ); up.addMethod( newObj ); return newObj; *************** *** 840,844 **** case IProf.ALLOC_METHOD_OBJECTS: { MethodData lf = (MethodData) refObj; ! AllocTypeData up = (AllocTypeData) libIDs.get( new Integer( sid.parentUpObjId )); AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); --- 834,838 ---- case IProf.ALLOC_METHOD_OBJECTS: { MethodData lf = (MethodData) refObj; ! TypeData up = (TypeData) libIDs.get( new Integer( sid.parentUpObjId )); AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); *************** *** 850,854 **** MethodData lf = (MethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocTypeData up = (AllocTypeData) refObj; AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); lf.addType( newObj ); --- 844,848 ---- MethodData lf = (MethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! TypeData up = (TypeData) refObj; AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); lf.addType( newObj ); *************** *** 877,883 **** //// case IProf.ALLOC_OBJECT_THREADS: { ! AllocTypeData lf = (AllocTypeData) refObj; ThreadData up = (ThreadData) libIDs.get( new Integer( sid.parentUpObjId)); ! AllocThreadTypeData newObj = new AllocThreadTypeData( sid, up, lf ); up.addType( newObj ); lf.addThread( newObj ); --- 871,877 ---- //// case IProf.ALLOC_OBJECT_THREADS: { ! TypeData lf = (TypeData) refObj; ThreadData up = (ThreadData) libIDs.get( new Integer( sid.parentUpObjId)); ! AllocTypeThreadData newObj = new AllocTypeThreadData( sid, up, lf ); up.addType( newObj ); lf.addThread( newObj ); *************** *** 885,892 **** } case IProf.ALLOC_THREAD_OBJECTS: { ! AllocTypeData lf = (AllocTypeData) libIDs.get( new Integer( sid.parentLeftObjId )); ThreadData up = (ThreadData) refObj; ! AllocThreadTypeData newObj = new AllocThreadTypeData( sid, up, lf ); lf.addThread( newObj ); up.addType( newObj ); --- 879,886 ---- } case IProf.ALLOC_THREAD_OBJECTS: { ! TypeData lf = (TypeData) libIDs.get( new Integer( sid.parentLeftObjId )); ThreadData up = (ThreadData) refObj; ! AllocTypeThreadData newObj = new AllocTypeThreadData( sid, up, lf ); lf.addThread( newObj ); up.addType( newObj ); *************** *** 896,904 **** case IProf.ALLOC_OBJECT_METHOD_THREADS:{ AllocTypeMethodData lf =(AllocTypeMethodData) refObj; ! AllocThreadTypeData up = (AllocThreadTypeData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadMethodData rg = (AllocThreadMethodData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadTypeMethodData newObj = new AllocThreadTypeMethodData( sid, up, lf, rg ); lf.addThread( newObj ); --- 890,898 ---- case IProf.ALLOC_OBJECT_METHOD_THREADS:{ AllocTypeMethodData lf =(AllocTypeMethodData) refObj; ! AllocTypeThreadData up = (AllocTypeThreadData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadMethodData rg = (AllocThreadMethodData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocTypeThreadMethodData newObj = new AllocTypeThreadMethodData( sid, up, lf, rg ); lf.addThread( newObj ); *************** *** 910,917 **** AllocTypeMethodData lf =(AllocTypeMethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadTypeData up = (AllocThreadTypeData) refObj; AllocThreadMethodData rg = (AllocThreadMethodData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadTypeMethodData newObj = new AllocThreadTypeMethodData( sid, up, lf, rg ); lf.addThread( newObj ); --- 904,911 ---- AllocTypeMethodData lf =(AllocTypeMethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocTypeThreadData up = (AllocTypeThreadData) refObj; AllocThreadMethodData rg = (AllocThreadMethodData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocTypeThreadMethodData newObj = new AllocTypeThreadMethodData( sid, up, lf, rg ); lf.addThread( newObj ); *************** *** 923,930 **** AllocTypeMethodData lf =(AllocTypeMethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadTypeData up = (AllocThreadTypeData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadMethodData rg = (AllocThreadMethodData) refObj; ! AllocThreadTypeMethodData newObj = new AllocThreadTypeMethodData( sid, up, lf, rg ); lf.addThread( newObj ); --- 917,924 ---- AllocTypeMethodData lf =(AllocTypeMethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocTypeThreadData up = (AllocTypeThreadData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadMethodData rg = (AllocThreadMethodData) refObj; ! AllocTypeThreadMethodData newObj = new AllocTypeThreadMethodData( sid, up, lf, rg ); lf.addThread( newObj ); *************** *** 936,944 **** case IProf.ALLOC_OBJECT_METHOD_TRACE_THREADS:{ AllocTypeTraceData lf = (AllocTypeTraceData) refObj; ! AllocThreadTypeMethodData up = (AllocThreadTypeMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadTraceData rg = (AllocThreadTraceData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadTypeTraceData newObj = new AllocThreadTypeTraceData( sid, lf, up, rg ); lf.addThread( newObj ); --- 930,938 ---- case IProf.ALLOC_OBJECT_METHOD_TRACE_THREADS:{ AllocTypeTraceData lf = (AllocTypeTraceData) refObj; ! AllocTypeThreadMethodData up = (AllocTypeThreadMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadTraceData rg = (AllocThreadTraceData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocTypeThreadTraceData newObj = new AllocTypeThreadTraceData( sid, lf, up, rg ); lf.addThread( newObj ); *************** *** 950,957 **** AllocTypeTraceData lf = (AllocTypeTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadTypeMethodData up = (AllocThreadTypeMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadTraceData rg = (AllocThreadTraceData) refObj; ! AllocThreadTypeTraceData newObj = new AllocThreadTypeTraceData( sid, lf, up, rg ); lf.addThread( newObj ); --- 944,951 ---- AllocTypeTraceData lf = (AllocTypeTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocTypeThreadMethodData up = (AllocTypeThreadMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadTraceData rg = (AllocThreadTraceData) refObj; ! AllocTypeThreadTraceData newObj = new AllocTypeThreadTraceData( sid, lf, up, rg ); lf.addThread( newObj ); *************** *** 963,970 **** AllocTypeTraceData lf = (AllocTypeTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadTypeMethodData up = (AllocThreadTypeMethodData) refObj; AllocThreadTraceData rg = (AllocThreadTraceData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadTypeTraceData newObj = new AllocThreadTypeTraceData( sid, lf, up, rg ); lf.addThread( newObj ); --- 957,964 ---- AllocTypeTraceData lf = (AllocTypeTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocTypeThreadMethodData up = (AllocTypeThreadMethodData) refObj; AllocThreadTraceData rg = (AllocThreadTraceData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocTypeThreadTraceData newObj = new AllocTypeThreadTraceData( sid, lf, up, rg ); lf.addThread( newObj ); *************** *** 1133,1144 **** } ! }; ! } //TODO: // write exception handling code properly - // ?expansion from classes // filters --- 1127,1142 ---- } ! } ! } + //FIXME: + //creation of fiels, frames, + //to fill list of traces + + //GCRef, ArenaRef, CallTree, //TODO: // write exception handling code properly // filters *************** *** 1148,1206 **** /* * $Log$ ! * Revision 1.19 2002/04/09 08:20:16 vachis ! * don't clear chaged flag * * Revision 1.18 2002/03/13 21:08:34 vachis * Confuguration.withFields, Confuguration.isValid() * added - * - * Revision 1.17 2002/03/10 19:59:10 vachis - * fix in ThreadGroupPart, calling calltree moved - * - * Revision 1.16 2002/03/08 10:42:06 petrul - * fixed tree traversal error - * - * Revision 1.15 2002/03/07 10:37:38 petrul - * call tree snapshot added - * - * Revision 1.14 2002/03/06 17:47:24 vachis - * You can choose not to include Types or CPU/Mon/Alloc Threads/Traces - * - * Revision 1.13 2002/03/04 00:13:56 vachis - * configuration class added - * - * Revision 1.12 2002/03/03 01:20:09 vachis - * type of ID changed from int to Integer - * - * Revision 1.11 2002/02/16 16:21:52 vachis - * code refacorization Class.. to Type... (forgotten methods) - * - * Revision 1.10 2002/02/15 22:37:30 vachis - * code refactorization Class..Data renamed to Type..Data - * - * Revision 1.9 2002/01/26 20:56:02 vachis - * methods gcs(), arenas() added - * - * Revision 1.8 2002/01/11 22:24:02 vachis - * added allocObjects list, methods for getting allocObjects and groupOfThreads - * - * Revision 1.7 2001/12/27 23:30:35 vachis - * comments - * - * Revision 1.6 2001/12/27 14:21:23 vachis - * finished connecting threads and class fields to mirror - * - * Revision 1.5 2001/12/09 23:27:34 vachis - * connecting MethodData to ClassData - * extection of class fields; frames fix - * - * Revision 1.4 2001/12/05 00:40:05 vachis - * fixies - * - * Revision 1.3 2001/12/04 00:14:51 vachis - * Changes to GetAllThruIterator() - * - * Revision 1.2 2001/12/03 10:37:57 vachis - * chages to getAll() with info * * Revision 1.1 2001/11/20 22:31:45 vachis --- 1146,1155 ---- /* * $Log$ ! * Revision 1.20 2002/05/06 17:32:13 vachis ! * new api implemention * * Revision 1.18 2002/03/13 21:08:34 vachis * Confuguration.withFields, Confuguration.isValid() * added * * Revision 1.1 2001/11/20 22:31:45 vachis Index: MonTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonTraceData.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** MonTraceData.java 4 Mar 2002 23:59:53 -0000 1.6 --- MonTraceData.java 6 May 2002 17:32:13 -0000 1.... [truncated message content] |
From: Pavel V. <va...@us...> - 2002-05-06 17:30:32
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv26949 Removed Files: AllocAbstractStatThreadTypeData.java AllocGlobalRefData.java AllocInstanceData.java AllocThreadTypeData.java AllocThreadTypeMethodData.java AllocThreadTypeTraceData.java AllocTypeData.java ClassFieldData.java TraceData.java TraceFrameData.java Log Message: new api implementation --- AllocAbstractStatThreadTypeData.java DELETED --- --- AllocGlobalRefData.java DELETED --- --- AllocInstanceData.java DELETED --- --- AllocThreadTypeData.java DELETED --- --- AllocThreadTypeMethodData.java DELETED --- --- AllocThreadTypeTraceData.java DELETED --- --- AllocTypeData.java DELETED --- --- ClassFieldData.java DELETED --- --- TraceData.java DELETED --- --- TraceFrameData.java DELETED --- |