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

AsyncGetCallTrace() returns empty stacks with no apparent reason

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: vm-legacy
    • Labels:
      None
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_8

      Description



      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.
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dcubed Daniel Daugherty
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: