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.

Bug 71792 - Object allocation via reflection is not recorded
Summary: Object allocation via reflection is not recorded
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
: 62476 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-24 10:34 UTC by Maros Sandor
Modified: 2007-10-01 10:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Maros Sandor 2006-01-24 10:34:02 UTC
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 ehucka 2006-05-30 12:23:10 UTC
This issue blocks profiling of frameworks driven beans in j2ee applications e.g.
JSF. They are all created by X.class.newInstance().
Comment 2 Tomas Hurka 2006-06-19 09:07:32 UTC
We need to use JVMTI to get this information.
Comment 3 Tomas Hurka 2007-07-13 15:21:45 UTC
Fixed in trunk.
Comment 4 Tomas Hurka 2007-08-08 08:34:18 UTC
*** Issue 62476 has been marked as a duplicate of this issue. ***
Comment 5 Alexander Kouznetsov 2007-09-28 12:50:19 UTC
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 Alexander Kouznetsov 2007-09-28 12:51:31 UTC
Created attachment 49733 [details]
Sample Application
Comment 7 Tomas Hurka 2007-09-28 18:22:11 UTC
This it different type of bug, since objects allocation via reflection are recorded. Please file separate issue. 
Comment 8 Alexander Kouznetsov 2007-10-01 09:46:12 UTC
Filed separate issue 117264.
Please provide the steps on how to verify this issue.
Comment 9 Alexander Kouznetsov 2007-10-01 09:56:01 UTC
msandor, could you please verify this issue?
Comment 10 Tomas Hurka 2007-10-01 10:24:17 UTC
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 Alexander Kouznetsov 2007-10-01 10:37:42 UTC
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)