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

AsyncGetCallTrace() returns empty stacks with no apparent reason

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • vm-legacy
    • None
    • sparc
    • solaris_8



      Name: vgR10248 Date: 05/11/2004


      Steps to reproduce:

      % cat jsynprog.java
      class jsynprog
      {
       public static void main (String [] args)
      {
      sys_op(4);
      }

        public static void sys_op(int k) {
      long stime ;
      int jmax = 10000000;
      int imax = k;
      for (int i = 0; i < imax; i++) {
      for(int j=0; j<jmax; j++) {
      stime = System.currentTimeMillis();
      }
      }
        }
      }

      % java -version
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b32, mixed mode)

      % javac jsynprog.java

      % /set/mercury/dist/sparc-S2/bin/collect -j on java jsynprog
      Creating experiment database test.1.er ...

      % /set/mercury/dist/sparc-S2/bin/er_print -functions test.1.er | grep sys_op

       1.461 1.491 jsynprog.sys_op(int) <<=========== Java stack (CPU time is dramatically undercounted)

      % er_print -javamode off -functions test.1.er | grep sys_op

       1.461 21.535 jsynprog.sys_op(int)


      21.535 is an inclusive time of jsynprog.sys_op() method. That is a real CPU time which was spent within
      the System.currentTimeMillis() but oddity is in the fact that this time belongs to <no java callstack recorded>.
      What the reason of multiple emty java stacks being returning from AsyncGetCallTrace()?

      Reminding that the Performance Analyzer collector utility uses libcollector library which is used as a
      JVMTI agent in the case mentioned above.
      ======================================================================

            dcubed Daniel Daugherty
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: