Using the Eclipse profiler, I am interested in number of allocated instances of classes from java.lang (for instance String
). I also want to know stuff like number of calls to String.equals()
etc.
I use the "Object Allocations" tab and I shows all classes in my application and a count, but there is no mention of any standard java classes.
For instance, this silly code shows up in the Object Allocations tab as 1000 Foo
, 7 byte[]
, 4 char[]
and 2 int[]
. Nothing else.
public static void main(String[] args)
{
Object obj[] = new Object[1000];
for (int i = 0; i < 1000; i++) {
new Foo(); // Some custom class
obj[i] = new StringBuffer("foo" + i);
}
System.out.println (obj[30]);
}
It seems the profiler simply ignores everything that is in any of the java.* packages. The same applies to Execution Statistics as well.
Do I need to enable instrumentation for the core java classes or is there some setting I am missing here?