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 124164 - Deep size computed wrongly
Summary: Deep size computed wrongly
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 21:12 UTC by _ rkubacki
Modified: 2008-01-02 10:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
suggested patch (1.46 KB, patch)
2007-12-17 21:14 UTC, _ rkubacki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2007-12-17 21:12:17 UTC
Reachable size computed in analysis page does not follow references from arrays. For example Any object that holds
HashMap instance will have HM and HM$E[] attributed but all HM$E and referenced key and values are missing. As a result
it provides completely silly and confusing results.

I am afraid that retained size query has the same problem. Was there a change in implementation? The code for retained
set computation has a branch to follow array references but this is wrong now IMO.
Comment 1 _ rkubacki 2007-12-17 21:14:06 UTC
Created attachment 54341 [details]
suggested patch
Comment 2 _ rkubacki 2007-12-17 21:16:48 UTC
I'd even write you a test if there was some testing infrastructure (like mock heap model) to avoid this surprise in the
future.
Comment 3 Petr Nejedly 2007-12-18 00:34:48 UTC
Yes, I have realized this a week ago and even have a patch with compatible filtering code laying around.
I'll try to fix this before Christmas :-)
Comment 4 Petr Nejedly 2008-01-02 10:18:03 UTC
Christmas is gone, sorry for the late fix:
profiler/modules/main/src/org/netbeans/modules/profiler/heapwalk/memorylint/Walker.java,v1.2