Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The “lock” identifier is calculated at runtime. It is based on the object name that is being locked (synchronized). It is possible to use the same object more than once during the same method. In that case, Precise for J2EE adds an index for each of the lock events, in order to enable the developer to distinguish between the two lock events.

For example:

Public void foo(){
     //run some code...
     Synchronized (myLockObject){// will be labeled as myLockObject+0
          //run some synchronized code...

     )
     //run some more code...
     // and then we need to have another synchronized block, locking the same object as before
     Synchronized (myLockObject){// will be labeled as my LockObject+1
          // run some more synchronized code...
     )

The Locks tab includes the following components:

Anchor
LockedMethodsundertheSelectedEntity
LockedMethodsundertheSelectedEntity
Locked Methods under the Selected Entity

  • Icon - indicates . Indicates the method type.
  • Name

    - displays

    . Displays the short name of the actual method that participated in a lock in the selected time frame. The long method name is shown in the ToolTip.

...

  • Info

    Clicking on a method name selects that method within the execution tree and refreshes the Activity workspace data for the selected method. The Activity workspace will open the Locks tab for the selected method.

  • Lock Impact- displays . Displays the relative percentage of the selected entity’s lock time, out of the instance’s summed response time.
  • Avg. Lock Time (Sec) - displays . Displays the average time the selected entity was locked.
  • Lock Acquisitions - displays . Displays the number of locks by the selected entity in the selected time frame.
  • Sum. Lock Times - displays . Displays the total time that the selected entity was locked in the selected time frame.

Anchor
MethodsSimultaneouslyLockedwiththeMethodSelectedAbove
MethodsSimultaneouslyLockedwiththeMethodSelectedAbove
Methods Simultaneously Locked with the Method Selected Above

When a method is selected in the Locked Methods under the Selected Entity table, this table displays all actual methods (and not a method in their call path) that participated in a lock with the method selected above.

...

  • Lock Impact- displays the relative percentage of the selected entity lock time, out of the instance’s summed response time.
  • Avg. Lock Time (Sec) - displays the average time the selected entity was locked.
  • Lock Acquisitions - displays the number of locks by the selected entity in the selected time frame.
  • Sum. Lock Times - displays the total time that the selected node was locked in the selected time frame.

Anchor
AvgLockTimeSecoftheMethodsSelectedintheTablesAbove
AvgLockTimeSecoftheMethodsSelectedintheTablesAbove
Avg. Lock Time (Sec) of the Methods Selected in the Tables Above

The Avg. Lock Time (Sec) of the Methods Selected in the Tables Above overtime bar graph shows an overtime view of the periods where the methods selected in the tables above acquired locks. This view enables you to understand the mutual locking relationship of the two methods - are they always locked at the same times (meaning, they lock each other only), is one locking (indicated by a short lock time) and other locked (indicated by a long lock time), and so on. Hovering at any point in the bar graph will display a ToolTip with the date and time of the time slice, the average lock time, and the number of locks.

...