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.
======================================================================
- duplicates
-
JDK-4825640 AsyncGetCallTrace returns empty stacks during system.*() calls, other times
- Closed