
|
|
Once you've installed Jinsight, by running the installation program you download from IBM alphaWorks, click on the entry Jinsight Visualizer in the Jinsight2.0 Program Folder. This should bring up the Jinsight workspace window, where you choose File and Open Trace File, and then select the trace you want to visualize. For a sample trace, open the directory traces, pick the Hang.trc file, and click on Open. Then push the Load button on the workspace window.
Details:
The documentation is in HTML files in the download package.
The installation provides a program folder for the directory jinsight2.0 and also HTML documentation in the directory jinsight2.0\docs.
The documentation provides an executive summary, a quick start with installation details,
a guided tour, a how-to guide, a reference manual,
FAQs, and release notes.
Look at the Jinsight Release Notes.
Additional details can be found in the guided tour, for example, under Table View, Call Tree View, and Navigation, and Slices and Workspaces.
Further details are in the reference manual, for example, under
Call Tree View,
Table View, and
Slices and Workspaces.
In the command file jinsight_trace, use the -mx or -Xmx Java option to set the maximum Java heap size, and use the JINSIGHT_MAXHEAP variable to continue (by not loading detailed trace information) when nearing the memory limit. For extremely large traces, you can also set trace filtering in the visualizer, which can filter out trace events by package name or by stack depth during trace loading.
Details:
java.exe -mx230M -DJINSIGHT_MAXHEAP=230M jinsight.main.Jinsight sample.trc
Use the command file jinsight_trace, which invokes the self-contained Jinsight instrumented tracing VM for JDK 1.1.8. The instrumented tracing VM is installed in either directory n118p-2.0 (on Windows), or directory a118-2.0 (on AIX).
Details:
set CLASSPATH=<path where your program is>
jinsight_trace -tracemethods yourProgram yourProgramArgsThis will begin writing the trace file yourprogram.trc. Note that using option -tracemethods can produce a very large trace if your program is long-running. (Try this first with the sample programs provided.)
Read the section on creating traces. Control how much is traced using one or more of following:
Details:
-tracepopulation trace object creation/collection -tracemethods trace all method enters/leavesYou can begin without either option, and later issue a trace command at the console prompt.
tm start tracing methods tp start tracing population events sm stop tracing methods sp stop tracing population events S stop tracing g force synchronous garbage collection dp dump object population dr dump object population and references ps print system state q quit program
(default) turn off tracing JINSIGHT_TRACE_METHODS turn on tracing methods JINSIGHT_TRACE_POPULATION turn on tracing object creation/collection
Runtime.getRuntime().traceMethodCalls(false) turn off tracing of methods Runtime.getRuntime().traceMethodCalls(true) turn on tracing of methods
First try your program with the original uninstrumented JVM. Often renaming your DLLs may work if it is a load that is failing.
Details:
Fatal error: 0 Assertion failed: !exceptionOccurred(EE()), file ..\..\..\..\src\win32\sun\windows\awt_Frame.cpp, line 155 abnormal program termination
It could be you haven't specified the right class name.
Another possibility is that
your complete CLASSPATH string contains spaces. For example, it might have the string
'Program Files...' in it. If it does, jinsight_trace will treat the remainder
of your CLASSPATH string as the program name you are trying to trace, and will fail.
The command file jinsight_trace should run the instrumented java_g.exe program (for Windows) or the instrumented java program (for AIX or OS/390), and should set the environment variable JINSIGHT to YES.
To turn tracing on, you can use one of several methods:
Runtime.getRuntime().traceMethodCalls(true)
Any of the above methods should produce a trace file
in the directory where jinsight_trace was run.
This probably means you are trying to read a newer trace format
but are using an older version of the Jinsight visualizer. For example,
the instrumented JVMs in Jinsight version 2.0 write traces with a header
that indicates trace format version 2. The solution is to use the latest
version of the visualizer to read traces.
This will likely be accompanied by the Workspace Window failing to show the total number of events. A properly completed trace normally records the total number of events. The Workspace Window uses this information to show progress as it loads the trace:
To ensure a complete trace, terminate your program as follows: type Ctrl-Break,
type q and press Enter.
No views are visible initially. You must open each view by choosing
it in the Workspace Window's Views menu (for example, choose Histogram=>Objects for
the Object Histogram view).
|
|