Follow the instructions below to start the profiler in your web browser.
Note: if you are using JDK 1.2, make sure to install /reinstall
OptimizeIt in a directory which path does not contain any space (' ').
This is necessary because the Java plugin control panel does not support
spaces in the Java Run Time Parameters field.
From the Start menu, select the Program menu and then select
the Java Plug-In Control panel
In the Basic section, make sure that Enable Java Plug-In
option is selected. It is also recommended to select the option Show
Java Console.
If you are using JDK 1.1, type -DOI=1 -noclassgc in the Java
Run Time Parameters field.
If you are using JDK 1.2.2, type -DOI=1 -Xrunoii -Xnoclassgc -DOPTITDIR=<OptItDir>
in
the Java Run Time Parameters field, where <OptItDir>
is the directory where OptimizeIt has been installed on your machine. (ex:
C:\OptimizeIt302D)
Note: make sure not to add extra spaces between the different parameters
specified in the Java Run Time Parameters. It could cause the plugin
to ignore some parameters and OptimizeIt would not run correctly.
In the Advanced section, make sure the selected vm is the one you
need. Also unselect the option Enable Just In Time Compiler.
When done, press the Apply button and close the control panel.
In order to start your applet with the Java Plug-In, you need to change
your HTML file to use the <OBJECT> tag or the <EMBED>
tag.
The Java
Plug-In HTML specification explains how to do this. JavaSoft also provides
a tool
to convert html files to use the Java Plug-In.
2) Configuring your computer
To profile an applet in your web browser, you need to modify the system
CLASSPATH
to add OptimizeIt classes and modify the system PATH to add OptimizeIt
native code. Here is how to do this:
Opening the environment settings
From the start menu, select Settings/Control Panel.
In the control panel, double click on the System icon.
In the system property window, select the Environment tab.
Changing the PATH environment variable to include OptimizeIt native
code.
In the top section, select the row starting with Path.
Click on the Value text field. Use the right arrow key to scroll
to the end of the text.
Type ;<OptItDir>\lib, where <OptItDir>
is the directory where OptimizeIt has been installed on your machine. (ex:
C:\OptimizeIt302D)
Click on the Set button.
Changing the CLASSPATH environment variable to include OptimizeIt
classes.
In the User variables list, select the CLASSPATH environment
variable. If this variable does not exist yet, click on the first row in
the list and type CLASSPATH in the Variable field,
then select the value and delete all characters to reset the value.
In the Value field, insert in front of the current value <OptItDir>\lib\optit.jar
where <OptItDir> is the directory where OptimizeIt has
been installed on your machine. (ex: C:\OptimizeIt302D)
Click on the Set button.
After changing PATH and CLASSPATH, you need to restart your
web browser.
3) Starting OptimizeIt audit system
The following applet starts OptimizeIt audit system. Once OptimizeIt's
audit system is running you can attach with OptimizeIt and profile all
applets running in your web browser.
If the applet below does not start or is invisible, make sure that:
you have properly installed JavaSoft's Java Plug-In (step 1 above)
you have properly changed your CLASSPATH environment variable. (step
2.3 above).
Click on the the Start audit system button below to start OptimizeIt's
audit system.
Change the port number if the default port number is already used on your
machine.
Disable the memory profiler if you only want to focus on CPU/Time usage.
Enable audit API, if you want to profile a subset of your application and
your code calls enableCPUProfiler() or/and enableMemoryProfiler().
Important notes:
Some web browsers destroy applets almost immediately after switching to
another page. Create a new browser window to load your applet and keep
this page visible.
With Internet Explorer, you should only create a new browser using the
menu File->New->Window in Internet Explorer. Creating a new browser from
another location (from the shortcut on the desktop, from the start menu...)
leads to the creation of a new virtual machine where the audit system has
not been started and which is therefore not profiled.
4) Attaching from OptimizeIt
Start OptimizeIt
Close the info panel and the Edit settings window by pressing the
OK
button.
From the Program menu, select Attach...
Change the port number if you have changed it in the applet
Press the attach button
After attaching, OptimizeIt displays performance data for all applets running
in the web browser with the Java Plug-In. Use the web browser to start
your applet and begin the profiling session.
Each time you restart the web browser, you need to come back to this
page to start the profiler.
5) Starting OptimizeIt profiler from your Java code
While the applet on this page is convenient to start profiling quickly,
you may want to automatically start OptimizeIt's profiler with your applet.
That way, you don't have to go to this page to start the profiler before
starting your applet.
Starting OptimizeIt profiler can be easily done by using OptimizeIt's
API. OptimizeIt's API is documented in OptimizeIt user manual, chapter
9. The following code demonstrates how to start the profiler from your
applet's init method.
Once OptimizeIt's profiler is running, you can attach to the virtual machine
from OptimizeIt.
Copyright (c) 1997, 1998, 1999, 2000 Intuitive Systems
Inc. All rights reserved. Specifications subject to change without notice. OptimizeIt is a trademark of Intuitive Systems, Inc. Java and all Java-based trademarks and logos are trademarks
or registered trademarks of Sun Microsystems, Inc. All other brand names
and products are trademarks or registered trademarks of their respective
holders.