2212 ms. Memory: 31664K Free: 7107K (22%)This data is printed by ptolemy.actor.Manager, which has methods such as
timeAndMemory()
To measure the time of an execution within a model, you could use the WallClockTime actor, see
The Expression Language also has totalMemory and freeMemory variables that can be accessed, though the values tend to get cached, so they are not always updated during the execution of a system. To do performance measurements, run models without a GUI and then do several runs, tossing out the times for the first run. $PTII/ptolemy/actor/lib/test/performance, has some scripts that might be of use.
See the TPTP Documentation
Help
- Software Updates
- Find and Install...
- Search for new features to install
- Add Update Site...
* Name: EMF Update Manager Site
* URL: http://download.eclipse.org/tools/emf/updates/site.xml (Releases)
(or): http://download.eclipse.org/tools/emf/updates/site-interim.xml (I, M and S Builds)
- From the Help menu in Eclipse, select Software Updates > Find and Install.
- Select the Search for new features to install radio button. Click Next.
- Add a new update site by clicking on New Remote Site.
- Enter the following name and URL and click OK:
- Name: TPTP Update site
- URL: http://eclipse.org/tptp/updates/site.xml
- Click Finish.
- In the "Search Results" dialog box, select the features to install.
Then click Next.
- Select TPTP 4.2.0
- Unselect the BIRT and Web profiling packages
- In the "Feature License" dialog box, accept the license and click Next.
- In the "Installation" dialog box, verify the features to be installed and change install location if necessary. Then click Finish.
- After you click Finish, you will be presented a confirmation about a digital signature. Click Install All.
- When done, restart your workbench.
bin/
directory of the Agent Controller and
run SetConfig.bat
.
bin/
directory,
start the Agent Controller with ./ACServer.exe
.
The New Java Profiler works with the New Technology Agent Controller. The client should be configured to connect to the New Technology Agent Controller port. This is configured in the file "serviceConfig.xml" in the/config directory. The default client connection port number of the New Technology Agent Controller is 10006. To configure the hostname, navigate to the Preferences menu ( Window > Preferences ) in the Eclipse Workbench and click on "Profiling and Logging". Change the "Agent Controller local port" to 10006. You will also need to select "Host" under "Profiling and Logging" to add a localhost entry with port 10006. (fig 2.1)
Java Profiling with Instrumentation
.
org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException The process launcher seems to be inactive. Restart the Agent Controller and try again. org.eclipse.core.runtime.CoreException: The process launcher seems to be inactive. Restart the Agent Controller and try again. at org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherUtility.createCoreException(LauncherUtility.java:115) at org.eclipse.tptp.trace.ui.internal.launcher.core.LauncherUtility.createCoreException(LauncherUtility.java:123) at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.handleError(TIDelegateHelper.java:278) at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.launchProcess(TIDelegateHelper.java:264) at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIDelegateHelper.launch(TIDelegateHelper.java:173) at org.eclipse.tptp.platform.jvmti.client.internal.launcher.TIJavaLauncherDelegate.launch(TIJavaLauncherDelegate.java:37) at org.eclipse.tptp.trace.ui.provisional.launcher.PrimaryLaunchDelegate.run(PrimaryLaunchDelegate.java:249) at java.lang.Thread.run(Thread.java:595)
The JVMTI agent org.eclipse.tptp.jvmti is not available. Make sure that the agent's libraries are available and that it is configured properly
See Re: jvmti agent
It looks like the javaprofiler.all_platforms-TPTP-4.2.0.2.zip
file should not be extracted in the Agent Controller home directory, it
does not put the files in the plugin directory, instead it created a
tptp
directory that has platform specific files in it.
In the Agent Controller directory, either
plugins
bin
directory,
rerun SetConfig.bat
and restart ACServer
In JDK1.3, try
java -Xrunhprof:help
run()
method in ptolemy.actor.Manager so that
System.out.println(new Date()).getTime())
is called
at the start and the end of the run()
method.
You may also need to include the following at the top with the other import statements.
import java.util.Date;
http://help.netscape.com/kb/consumer/19970907-1.html
says
To troubleshoot your Java applets in UNIX environment, you can start Communicator with the "-java" switch. #netscape -java Usage: -java [-options] class where options include: -help print out this message -version print out the build version -v -verbose turn on verbose mode -debug enable remote JAVA debugging -noasyncgc don't allow asynchronous garbage collection -verbosegc print a message when garbage collection occurs -noclassgc disable class garbage collection -cs -checksource check if source is newer when loading classes -ss<number> set the maximum native stack size for any thread -oss<number> set the maximum Java stack size for any thread -ms<number> set the initial Java heap size -mx<number> set the maximum Java heap size -D<name>=<value> set a system property -classpath <directories separated by ':'> list directories in which to look for classes -prof[:<file>] output profiling data to ./java.prof or ./<file> -verify verify all classes when read in -verifyremote verify classes read in over the network [default] -noverify do not verify any class
And
http://help.netscape.com/kb/consumer/19970907-2.html
You can automatically startup the Java Virtual Machine as you launch Communicator. This will prevent Communicator from restarting the Java Virtual Machine each time you browse pages that have Java applets or audio files played by the liveaudio plugin. The command to use is : "C:\Program Files\Netscape\Communicator\Program\netscape.exe" -start_java You can edit the properties of your start icon of the Communicator to add the option. You can also start the messenger (or other component) the same way by : "C:\Program Files\Netscape\Communicator\Program\netscape.exe" -start_java -mail Note: This doesn't seem to work on NT3.51
Java has a garbage collector, which helps, but memory leaks are still possible. Usually, an object is marked as being eligible for GC when it goes out of scope. Or, if the value of the object is null, then it may be GC'd. However, an object will not be garbage collected if the object has references to it. This is how we get memory leaks.
We can ask that the garbage collector be run with
System.gc();For example, we do this in the code generator after building the large AST that represents the java.lang and ptolemy.kernel classes.
Finalization is what happens before an object is GC'd. We
can force the system to run the finalize
method
on all objects that are waiting to be finalized with:
System.runFinalization();For further information, see Java Tutorial Page about Garbage Collection and IBM page about memory leaks
java
command takes non-standard
commands like -Xmxsize
to set the maximum stack
size. For example, under Cygwin, to run with a 256 megabyte heap size:
export JAVAFLAGS=-Xmx256m $PTII/bin/vergilTo see what other
-X
commands are available, run
java -X
To generate the profile, do c:/Program\ Files/java/jdk1.5.0_05/bin/java -Xmx256M "-Dptolemy.ptII.dir=c:/cxh/ptII" -Xrunhprof:heap=all,depth=30 -classpath "c:\cxh\ptII;c:\cxh\ptII\lib\diva.jar" ptolemy.vergil.VergilApplication To run the HP JMeter tool:
java -Xmx256m -jar $PTII/vendors/hpjmeter/HPjmeter.jarThen open up the
java.prof.txt
JMeter reported a syntax error, I then had to edit v.hprof.txt and move two bogus lines:
ROOT 50000105 (kind=became, id=200000, trace=300000) ROOT 50000187 (kind= , id=200003, trace=300000) HEAP DUMP BEGIN (4250 objects, 298272 bytes) Tue Jun 08 11:23:54 2004
HEAP DUMP BEGIN (4250 objects, 298272 bytes) Tue Jun 08 11:23:54 2004 ROOT 50000105 (kind=, id=200000, trace=300000) ROOT 50000187 (kind= , id=200003, trace=300000)
java.io.IOException: Stack trace not found for serial # 0 at hat.parser.HprofReader.getStackTraceFromSerial(HprofReader.java:611) at hat.parser.HprofReader.readArray(HprofReader.java:777)
See the JDC Book that discusses Heap Analysis Tool for downloads and further information.
Generate a hprof file:
java -Xrunhprof:file=vergil.hprof,format=b -classpath $PTII/lib/diva.jar\;$PTII/ptolemy/vergil/vergil.jar\;$PTII/ptolemy/ptolemy.jar\;$PTII ptolemy.vergil.VergilApplication
Run HAT: java -classpath hat.zip\;$PTII/lib/diva.jar\;$PTII/ptolemy/vergil/vergil.jar\;$PTII/ptolemy/ptolemy.jar\;$PTII -mx100m hat.Main vergil.hprof
http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html
http://download.oracle.com/javase/6/docs/technotes/tools/index.html#jconsole
JAVAFLAGS
property:
export JAVAFLAGS=-Dcom.sun.management.jmxremote
$PTII/bin/vergil &
jconsole
jconsole
Last Updated: $Date: 2014-12-01 19:28:52 -0800 (Mon, 01 Dec 2014) $