Hitachi

uCosminexus Application Server Maintenance and Migration Guide


5.5.2 Mapping between thread dump and trace based performance analysis file

Moreover, when slowdown or hang-up occurs in a J2EE application, you can investigate the locations where the errors occurred by correlating the thread dump with trace based performance analysis.

To correlate the thread dump with trace based performance analysis, use the thread ID output to the trace based performance analysis file with the nativeID (OS level thread ID) of the thread information output to the thread dump. To specify the corresponding trace based performance analysis file from the thread dump:

  1. Collect the thread dump and trace based performance analysis file.

    For details on the collection methods of thread dump, see 4.7 JavaVM thread dump. For details on the collection methods of the trace based performance analysis file, see 7.3.1 How to collect a trace based performance analysis file.

  2. Select the thread dump and trace based performance analysis file to be used.

    Based on the time when the thread dump and trace based performance analysis file are output, select the thread dump and trace based performance analysis file to be used for investigation. For details on the output time, see the following information:

    Thread dump

    Date and time output at the end of the file name and file.

    The following is an example showing the date and time output at the end of a file:

     ...
     ...
    Full thread dump completed. Fri Jul 21 19:22:47 2006
    Trace based performance analysis file

    Time and Time(msec/usec/nsec)

    The following figure shows the Time and Time (msec/usec/nsec) of the trace based performance analysis file.

    [Figure]

  3. Convert nid (hexadecimal) and jid (hexadecimal) of thread dump to decimal.

    • In Windows and AIX

      Convert the thread dump nid (hexadecimal) to decimal value.

       ...
       ...
      "VBJ ThreadPool Worker" daemon prio=5 jid=0x00054f93 tid=0x04cef380 nid=0x1124 in Object.wait() [0x0632f000..0x0632fd18]
       stack=[0x06330000..0x062f5000..0x062f1000..0x062f0000] 
       [user cpu time=0ms, kernel cpu time=15ms] [blocked count=1, waited count=29]
      at java.lang.Object.wait(Native Method)
       ...
       ...

      1124(Hexadecimal)=4388(Decimal)

    • In Linux

      Convert the thread dump nid (hexadecimal) to decimal value.

       ...
       ...
      "main" prio=1 jid=0x00006d75 tid=0x00201d70 nid=0x1e51 waiting on condition [0x00000000..0xbfe80488] stack=[0xbfe87000..0xbfc8c000..0xbfc88000..0xbfc87000] [user cpu time=1320ms, kernel cpu time=4280ms] [blocked count=5, waited count=4]
       ...
       ...

      6d75(Hexadecimal) = 28021 (Decimal)

  4. Search the row in which the value (Decimal) of Thread(hashcode) in the trace based performance analysis file matches with the value converted to decimal by procedure 3., and specify the trace information.

    • In Windows and AIX

      Search the line where value of Thread (Thread ID) is matching with the value converted to decimals.

      [Figure]

    • In Linux

      Search the line where value of hashcode (Hashcode) is matching with the value converted to decimals.

      [Figure]