This content has been marked as final. Show 1 reply
CodeSleuth (and CodeAnalyst) both require the code being profiled to have been compiled (sometimes called jit'ed) before we can collect profile information.
So some code (for example most 'hello world' style snippets) will never be jitted because the code is just handled by the JVM's interpreter.
My guess is that this code is not being 'compiled' by the JVM, so you get no profile data for it.
BTW just adding Thread.sleep() to delay the code does not help. The Thread.sleep() will be handled very efficiently by the JVM and will not cause the caller to become compiled.
Try moving your code out to a function and call it say 1000 times. Sun's JVM should compile the code when this method gets 'hot'.
Some JVM's have command line flags to 'force compilation', you might be able to turn that on.