cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 71792 - Object allocation via reflection is not recorded
: Object allocation via reflection is not recorded
Status: VERIFIED FIXED
: profiler
Base
: 5.5
: All All
: P2 (vote)
: 6.0
Assigned To:
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2006-01-24 10:34 by
Modified: 2007-10-01 10:37 (History)
Issue Type: DEFECT
:


Attachments
Sample Application (1.60 KB, text/plain)
2007-09-28 12:51, Alexander Kouznetsov
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2006-01-24 10:34:02
X.class.newInstance() type of object creation is not recorded by the profiler.
Allocation via the new operator is recorded just fine. This issue becomes more
relevant the bigger the application where reflection is used more often.
------- Comment #1 From 2006-05-30 12:23:10 -------
This issue blocks profiling of frameworks driven beans in j2ee applications
e.g.
JSF. They are all created by X.class.newInstance().
------- Comment #2 From 2006-06-19 09:07:32 -------
We need to use JVMTI to get this information.
------- Comment #3 From 2007-07-13 15:21:45 -------
Fixed in trunk.
------- Comment #4 From 2007-08-08 08:34:18 -------
*** Issue 62476 has been marked as a duplicate of this issue. ***
------- Comment #5 From 2007-09-28 12:50:19 -------
Failed to verify with
Product Version: NetBeans IDE Dev (Build 200709271200) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05 
System: SunOS version 5.10 running on x86; ISO646-US; en (nb)

When I perform allocation memory profiling (each 1 object allocation, no stack
traces) of attached application, it
creates 1000 Object instances, but profiler shows only 17.
------- Comment #6 From 2007-09-28 12:51:31 -------
Created an attachment (id=49733) [details]
Sample Application
------- Comment #7 From 2007-09-28 18:22:11 -------
This it different type of bug, since objects allocation via reflection are
recorded. Please file separate issue. 
------- Comment #8 From 2007-10-01 09:46:12 -------
Filed separate issue 117264.
Please provide the steps on how to verify this issue.
------- Comment #9 From 2007-10-01 09:56:01 -------
msandor, could you please verify this issue?
------- Comment #10 From 2007-10-01 10:24:17 -------
The fact that (at least) 16 instances was recorded is the proof that objects
allocated via reflection are recorded. Take a look at allocation stacktraces
not only 
for java.lang.Objct but for example java.lang.String and you will see that
objects allocated via reflection are recorded.
------- Comment #11 From 2007-10-01 10:37:42 -------
You're right, 16 objects out of 1000 were successfully recorded. Verified
according to this information.

Product Version: NetBeans IDE Dev (Build 200709271200) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05 
System: SunOS version 5.10 running on x86; ISO646-US; en (nb)