Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4255155

HPROF: runhprof:cpu=times is broken on Solaris2.7, use gethrvtime

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • 1.2.0
    • tools
    • sparc
    • solaris_2.6, solaris_7



      Name: clC74495 Date: 07/19/99


      This bug happens only under Solaris 2.7. I have reproduced on
      a 2 processor Ultra60 machine.

      java -Xrunhprof:cpu=times simple produces the following output:

      CPU TIME (ms) BEGIN (total = 0) Fri Jul 16 15:44:54 1999
      rank self accum count trace method
         1 NaN% NaN% 0 1 <empty trace>
         2 NaN% NaN% 0 2 java/security/AccessController.getStackAccessControlContext
         3 NaN% NaN% 0 4 java/lang/Compiler.initialize
         4 NaN% NaN% 0 3 java/lang/System.initProperties

      Notice all the NaN's .
      Diagnosis indicates that the Solaris gethrvtime function used by
      sysThreadCPUTime (used by hprof) always returns 0, leading to
      the divide by 0 in hprof_trace.c and the NaN error.
      (Review ID: 85708)
      ======================================================================

      Name: skT88420 Date: 10/06/99

      =20
      Ultra60, Solaris 7
      jdk1.2.2 and jdk1.3beta

      Creating a hprof profile with option cpu=3Dtimes produces a
      profile with lots of NaN% values


      TEST CASE:
      Start a jvm with runhprof:cpu=3Dtimes enabled, for example

      /opt/jdk1.3/bin/java -classic -Xrunhprof:cpu=3Dtimes,file=3D/tmp/profile.tx=
      t sun.applet.AppletViewer

      The end of /tmp/profile.txt looks like this:

      CPU TIME (ms) BEGIN (total =3D 0) Sat Oct 2 17:48:29 1999
      rank self accum count trace method
         1 NaN% NaN% 0 1 <empty trace>
         2 NaN% NaN% 0 2 java/security/AccessController.getStackAcc=
      essCo
      ntrolContext
         3 NaN% NaN% 0 3 java/lang/System.initProperties

      RELATED BUGS:
      4255155
      (Review ID: 96063)
      ======================================================================

            ohair Kelly Ohair (Inactive)
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: