Jinsight Frequently Asked Questions

Reference Manual
 

  1. How do I get the visualizer to run?
  2. Where is the documentation?
  3. Where are details about the newest features in Jinsight?
  4. How do I deal with a visualizer out-of-memory exception?
  5. How do I make a trace?
  6. How do I deal with large traces?
  7. What can I do if the instrumented JVM fails?
  8. What if jinsight_trace fails with 'Invalid class name' or 'No such file'?
  9. Why can't I find a trace after I run jinsight_trace?
  10. The visualizer gets a runtime exception: 'invalid version in header'. Why?
  11. What does a visualizer exception such as 'Corrupted Trace' mean?
  12. Why can't I see anything after I hit the Workspace Window's Load button?

  1. How do I get the visualizer to run?
  2. Download one of the Jinsight2.1 packages from IBM alphaWorks. Make sure the environment variables in the command file jinsight reflect your installation. In particular, check variables JINSIGHT_HOME and JAVA2_HOME. Then go to directory jinsight2.1, and invoke the command file:     jinsight

    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:

  3. Where is the documentation?
  4. The documentation is in HTML files in all of the download packages. It is in the directory jinsight2.1\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.
     

  5. Where is information about the newest features in Jinsight?
  6. Look at the Jinsight Release Notes. Additional details about recent visualizer features 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.
     

  7. How do I deal with a visualizer out-of-memory exception?
  8. In the command file jinsight_trace, use the -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:
     

    1. Set the maximum Java heap size by using the -Xmx option. At the same time, set the JINSIGHT_MAXHEAP variable in the jinsight command file, to cause the visualizer to continue running by stopping loading detailed trace information after consuming more than 80% of the specified memory limit. For example:
    2. java.exe  -Xmx230M  -DJINSIGHT_MAXHEAP=230M  jinsight.main.Jinsight  sample.trc
    3. Use filtering to further reduce the amount of information stored in the visualizer. For example,
      1.  
      2. Choose Workspace Window => File => Set Trace Filter...
      3. Check the entry on Do not save events of classes starting with:
      4. Type
      5.    java/  sun/     in the text area of the dialog
      6. Press OK.

      7.  
      Jinsight will now ignore details of how java/ and sun/ methods execute, assuming that information is relatively uninteresting to you. That will reduce Jinsight's memory consumption considerably.
       
  9. How do I make a trace?
  10. Use the command file jinsight_trace, to invoke your program and use Jinsight. For Jinsight2.1 (for Java 2), the instrumentation is a profiling agent using the JVMPI interface of Java 2. For Jinsight2.0 (for Java 1.1.8), the instrumentation is a replacement tracing VM that is installed in either directory n118p-2.0 (on Windows), or directory a118-2.0 (on AIX).

    Details:

  11. How do I deal with large traces?
  12. Read the section on creating traces. Control how much is traced by using one or more of the following:

    Details:

  13. What can I do if the instrumented JVM fails?
  14. The remarks here pertain to Jinsight 2.0, with its instrumented JVM.

    First try your program with the original uninstrumented JVM. Often renaming your DLLs may work if it is a load that is failing.

    Details:
     


  15. What if jinsight_trace fails with 'Invalid class name' or 'No such file'?
  16. 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.
     

  17. Why can't I find a trace after I run jinsight_trace?
  18. for Jinsight2.1: The default trace file name is trace.trc. You should ensure that you used the option -XrunjinsightPA on the Java 2 invocation (for example in the command file jinsight_trace, and that you employed one of the tracing controls (console command, env variable, API call) that would result in a trace being written.

    for Jinsight2.0: 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.

    for Jinsight2.0, to turn tracing on, you can use one of several methods:

    Any of the above methods should produce a trace file in the directory where jinsight_trace was run.
     

  19. The visualizer gets a runtime exception: 'invalid version in header'. Why?
  20. 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 profiling agent in Jinsight version 2.1 writes a trace with a header that indicates trace format version 4. The solution is to use the latest version of the visualizer (the Jinsight2.1 visualizer) to read traces.
     

  21. What does a visualizer exception such as 'Corrupted Trace' mean?
    1.  
    The trace is probably incomplete, because the application or the tracing activity did not end normally. The visualizer is unable to read the final incomplete event(s). This only affects the end of the trace; the trace up to that point can still be viewed.

    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:

      27% of 10855 events read
    If the number of events is not available because, for example, tracing ended abruptly, the Workspace Window shows only the number of events read so far:
      2000 events read

    To ensure a complete trace, terminate your program as follows: type Ctrl-Break, type q and press Enter.
     

  22. Why can't I see anything after I hit the Workspace Window's Load button?
  23. 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).
     


Reference Manual
Jinsight Home