Jinsight Guided Tour
Table & Call Tree Views
 Execution View

Many of the Jinsight views, at any given time, depict a particular point in the execution; you cannot reverse them to see things at past points.  The Execution view is different in this regard:  it shows communication among objects as a function of time.

Start Jinsight afresh, this time to view the trace named Hang.
 

To restart Jinsight with the Hang trace:
  1. Choose Start => Programs => Jinsight2.0 => Jinsight Visualizer.
  2. Choose Workspace Window => File => Open Trace File....  An "Open trace..." dialog box will appear.
  3. Go to the traces subdirectory.
  4. Double-click on Hang.trc.
To see the complete execution in the Execution view:
  1. Press Workspace Window => Load.
  2. Wait until the end of the trace is reached (i.e., when all trace events have been read, as indicated by the Workspace Window).
  3. Choose Workspace Window => Views => Execution.

You will see five vertical lanes, the left four representing threads.  Each thread's name appears at the top of the corresponding lane: from left to right, they are GC, Thread2, Thread_1, and main. Inside each of these lanes is a high-level visualization of the thread's execution.  The rightmost lane marks execution time, which progresses downward in the view.

Fly over each lane with the cursor.  The status line at the bottom of the view shows details about the thread currently underneath the cursor.

Each thread lane contains colored stripes, except for GC.  Each stripe represents an object in the midst of executing a method; flying over a stripe will identify the object and its class, among other things.  The stripes are colored by class. They cascade from left to right within a lane as one object calls another, which calls another, and so forth. Thus the number of stripes at a given point in time (corresponding to a point on the view's vertical axis) indicates the thread's stack depth at that point.  You can see that the main thread spends most of its time many levels deep in method calls.  A stripe's length reflects the time it took for the corresponding method to execute. Long stripes reveal long-running methods.

Initially, the view depicts the entire execution of every thread, meaning only the grossest features are visible.
 

To see more detail:
  1. Left-click-and-hold just above and to the left of the leftmost stripe, which is in the Thread2 lane.
  2. Holding down the left button, drag the mouse to create a varying rectangle.  Drag until the rectangle encompasses the leftmost five stripes horizontally.  (Don't worry about encompassing them vertically.)
  1. Release the left button.

Now you see more detail—specifically, how part of how java/lang/Thread.run works. The view shows the sequence of messages starting from the initial call to run, which subsequently calls run on another object.  In turn, run induces a class initialization, which involves a call to println—and so on. Flying over the various elements of the view will display information about those elements in the status line.

The implications of the call to println are not all visible currently.  While it's possible to zoom and scroll this view to make it easier to study, it's generally more convenient to view the method of interest separately in either the Execution Pattern View  or the Call Tree View.  You'll be able to peruse all other calls to/by this method easily, no matter how widely dispersed about the view they may be.

Before you can study println in other views, however, you must select it.
 

To select println:
  • Left-click on println.

println and everything it calls now appear against a yellow background, signifying their selection.  Let's examine the consequences of making a selection in this way by looking again at the full execution.
 

To view the entire execution again:
  • Press the Home key.

You've returned the Execution view to its original zoom factor and scroll position.  You'll also note that there are not one but several selected areas in the view—areas with yellow backgrounds. Each one reveals a different call to println. Thus in this case selecting a method or object had the effect of selecting it everywhere, both within a view and in other open views. (Alternatively, it is possible in this view to select a single invocation of a method, by instead right-clicking on the method name.)

Before we look at println in the Execution Pattern View, let's look at one more feature of the Execution view. As you gain experience using this view, you'll notice repetitive call patterns arising from for loops and other iterative constructs. They produce the same sequence of calls over and over again, cluttering the visualization.

You can reduce the clutter by telling the Execution view to hide a repetitive sequence.
 

To hide a repetitive sequence in the current execution:
  1. Right-click on a bar representing an object as shown below:
  1. Choose Detect Repetition.

Jinsight detects 100 repetitive calls from object java/lang/Integer.55 and elides them:

We're done with the Execution view for now, but you might want to take a closer look at the elided area. If so, come back to this view after you've finished the Guided Tour.  Then you can explore the elided area by zooming in on it (left-click-drag).

Now let's look at println in the Execution Pattern View.


Table and Call Tree Views
Jinsight Home