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

Cannot get profile data for MY classes, only classes in sun and java packages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.1
    • tools
    • None
    • x86
    • windows_nt



      Name: icT56964 Date: 05/28/97


      After running java -prof MyClass.java the .prof file does not contain timing data for any methods in MyClass. It only contains timing info for classes in the java and sun packages.

      I've created the following example to illustrate...
      I compiled this...
      public class MyClass {
      public static void main(String args[])
      {
      MyClass obj= new MyClass();
      obj.method1();
      obj.method2();
      obj.method2();
      }
      void method1() {
      method2();
      method3();
      }
      void method2() {
      method3();
      }
      void method3() {
      }
      }

      and when I run java with the -prof option I get this output (sorry, I know its hard to read but notice that there's not even a
      mention of "MyClass", what gives????)....

      count callee caller time
      3 java/io/FileDescriptor.initSystemFD(Ljava/io/FileDescriptor;I)Ljava/io/FileDescriptor; java/io/FileDescriptor.<clinit>()V 0
      1 java/lang/Thread.currentThread()Ljava/lang/Thread; java/lang/ThreadGroup.<init>(Ljava/lang/String;)V 0
      1 java/lang/System.initProperties(Ljava/util/Properties;)Ljava/util/Properties; java/lang/System.initializeSystemClass()V 241
      1 java/lang/System.setIn0(Ljava/io/InputStream;)V java/lang/System.initializeSystemClass()V 0
      1 java/lang/System.setOut0(Ljava/io/PrintStream;)V java/lang/System.initializeSystemClass()V 0
      1 java/lang/Class.forName(Ljava/lang/String;)Ljava/lang/Class;
      sun/io/CharToByteConverter.getConverter(Ljava/lang/String;)Lsun/io/CharToByteConverter; 20
      1 java/lang/Class.newInstance()Ljava/lang/Object;
      sun/io/CharToByteConverter.getConverter(Ljava/lang/String;)Lsun/io/CharToByteConverter; 0
      1 java/lang/Thread.currentThread()Ljava/lang/Thread;
      java/lang/Thread.init(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;)V 0
      1 java/lang/System.currentTimeMillis()J java/lang/System.nullInputStream()Ljava/io/InputStream; 50
      1 java/lang/Thread.setPriority0(I)V java/lang/Thread.setPriority(I)V 0
      1 java/lang/System.setErr0(Ljava/io/PrintStream;)V java/lang/System.initializeSystemClass()V 0
      1 java/lang/Class.getPrimitiveClass(Ljava/lang/String;)Ljava/lang/Class; java/lang/Character.<clinit>()V 0
      1 java/lang/System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V java/lang/String.<init>([C)V 0
      1 java/lang/System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V java/lang/String.getChars(II[CI)V 0
      1 java/lang/Class.getPrimitiveClass(Ljava/lang/String;)Ljava/lang/Class; java/lang/Integer.<clinit>()V 0
      1 java/lang/System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V java/lang/StringBuffer.ensureCapacity(I)V 0
      1 java/lang/System.currentTimeMillis()J java/lang/System.nullPrintStream()Ljava/io/PrintStream; 0
      handles_used: 992, handles_free: 26214, heap-used: 103144, heap-free: 735712
      sig count bytes indx
      [C 139 34774 5
      [B 7 27520 8
      *** tab[635] p=ccf8b8 cb=1053890 cnt=2 ac=0 al=0
      Ljava/io/BufferedWriter; 2 48
      *** tab[544] p=ccf308 cb=1050730 cnt=2 ac=0 al=0
      Ljava/io/OutputStreamWriter; 2 48
      *** tab[538] p=ccf2a8 cb=1050718 cnt=2 ac=0 al=0
      Ljava/io/BufferedOutputStream; 2 24
      *** tab[532] p=ccf248 cb=1050700 cnt=2 ac=0 al=0
      Ljava/io/PrintStream; 2 48
      *** tab[524] p=ccf1c8 cb=10506e0 cnt=1 ac=0 al=0
      Ljava/io/BufferedInputStream; 1 24
      *** tab[516] p=ccf148 cb=10506c0 cnt=2 ac=0 al=0
      Ljava/io/FileOutputStream; 2 8
      *** tab[508] p=ccf0c8 cb=10506a0 cnt=1 ac=0 al=0
      Ljava/io/FileDescriptor; 1 4
      *** tab[502] p=ccf068 cb=1050688 cnt=1 ac=0 al=0
      Ljava/io/FileInputStream; 1 4
      *** tab[204] p=ccddc8 cb=10501e0 cnt=201 ac=2 al=1002
      Ljava/util/HashtableEntry; 201 3216
        [Ljava/util/HashtableEntry; 2 4008
      *** tab[196] p=ccdd48 cb=10501c0 cnt=1 ac=0 al=0
      Ljava/util/Hashtable; 1 16
      *** tab[194] p=ccdd28 cb=10501b8 cnt=1 ac=0 al=0
      Ljava/util/Properties; 1 20
      *** tab[128] p=ccd908 cb=10500b0 cnt=2 ac=1 al=4
      Ljava/lang/ThreadGroup; 2 80
        [Ljava/lang/ThreadGroup; 1 16
      *** tab[90] p=ccd6a8 cb=1050018 cnt=598 ac=0 al=0
      Ljava/lang/String; 598 7176
      *** tab[85] p=ccd658 cb=1052ff8 cnt=22 ac=0 al=0
      Ljava/util/Locale; 22 352
      *** tab[84] p=ccd648 cb=1050000 cnt=3 ac=2 al=8
      Ljava/lang/Thread; 3 132
        [Ljava/lang/Thread; 2 32



      company - early morning software , email - ###@###.###
      ======================================================================

            tlindholsunw Timothy Lindholm (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: