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 113125 - char[] array differences not listed in memory comparison window
Summary: char[] array differences not listed in memory comparison window
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Jiri Sedlacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-17 19:30 UTC by _ gsporar
Modified: 2007-09-04 22:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
profiler memory snapshot (17.99 KB, application/octet-stream)
2007-08-17 19:31 UTC, _ gsporar
Details
profiler memory snapshot (18.13 KB, application/octet-stream)
2007-08-17 19:31 UTC, _ gsporar
Details
sample memory snapshot (20.43 KB, application/octet-stream)
2007-09-04 22:30 UTC, _ gsporar
Details
sample memory snapshot (20.41 KB, application/octet-stream)
2007-09-04 22:31 UTC, _ gsporar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gsporar 2007-08-17 19:30:12 UTC
Using NetBeans 6 M10 running on JDK6u2 on Ubuntu 7.04.

When comparing two memory snapshots I noticed that both snapshots have 3 char[] objects.  The total number of bytes,
however, is different.  In one of the snapshots the total bytes is 96, in the other it is 104.  

I opened the Allocations Comparison window on these two snapshots and expected to see an entry for char[] but there is
no entry.
Comment 1 _ gsporar 2007-08-17 19:31:24 UTC
Created attachment 46814 [details]
profiler memory snapshot
Comment 2 _ gsporar 2007-08-17 19:31:58 UTC
Created attachment 46815 [details]
profiler memory snapshot
Comment 3 Jiri Sedlacek 2007-08-20 15:02:15 UTC
All classes with similar number of allocated instances in snapshots being compared are filtered-out by mistake in 
snapshots diff.
Comment 4 Jiri Sedlacek 2007-08-20 15:55:08 UTC
Fixed for Beta1.

Could you please verify also for "Record both object creation and garbage collection" memory profiling using your 
simple app?
Comment 5 _ gsporar 2007-09-04 22:26:44 UTC
>Could you please verify also for "Record both object creation and garbage collection" memory profiling using your 
simple app?

Looks like it is working in the daily build from 2007-09-03.

But now that the fix is in, I have some new questions.  Perhaps I should open a new IZ. :-)

I will attach two more snapshots.  When I compare them I see something I don't understand: some of the entries have zero
for both values.  For example, javax.swing.text.Segment.  In both snapshots the total bytes is 64 and the Objects
Allocated is 2 - so why is there an entry in the comparisons window?

Also, I don't really understand the entries for sun.java2d.pipe.Region.  The objects allocated value is non-zero, but
the bytes allocated value *is* zero.  How can those object instances take up no space?  Is the objects allocated value
taken from perm gen and sun.java2d.pipe.Region has been loaded multiple times into perm gen but when these snapshots
were taken there were no instances of it on the heap?  In other words, all object instances have been removed by GC from
the young and tenured generations but since perm gen gets GC'ed differently not all copies of the class itself got
removed?  Am I making any sense?  :-)

Comment 6 _ gsporar 2007-09-04 22:30:30 UTC
Created attachment 48099 [details]
sample memory snapshot
Comment 7 _ gsporar 2007-09-04 22:31:01 UTC
Created attachment 48100 [details]
sample memory snapshot