This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Some objects allocated via reflection are not recorded | ||
---|---|---|---|
Product: | profiler | Reporter: | Alexander Kouznetsov <mrkam> |
Component: | Base | Assignee: | Tomas Hurka <thurka> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Alexander Kouznetsov
2007-10-01 09:44:22 UTC
Sample application: http://www.netbeans.org/nonav/issues/showattachment.cgi/49733/Main.java The problem is caused by so called "Inflation" mechanism. Reflection uses native code for first few invocations (default threshold is 15) and than switches to artificially generated classes to create new instances. Class.newInstance() caches default constructor and therefore you see only 16 instances. it works fine on other cases, since the java.lang.reflect.Constructor is not reused and therefore there is no inflation. Lowering priority to P3, since this is not common case. Since inflation threshold can be controlled by system property sun.reflect.inflationThreshold, there is easy workaround - run application with -Dsun.reflect.inflationThreshold=1000000 Fixed in trunk. |