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 53611 - Add ability to obtain and traverse a heap dump of profiled application
Summary: Add ability to obtain and traverse a heap dump of profiled application
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
: 73073 (view as bug list)
Depends on:
Blocks: 89614
  Show dependency tree
 
Reported: 2005-01-18 18:08 UTC by haroldship
Modified: 2006-11-19 16:08 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description haroldship 2005-01-18 18:08:34 UTC
In JProfiler or Optimizeit, you can see references
to objects. This helps a lot in finding memory leaks.
Comment 1 iformanek 2005-01-19 09:35:02 UTC
Changing to Feature, and changing the summary to abroader description.

We are aware of this feature requirement and its importance, so far 
this is stopped waiting for further work on heap analysis inside the 
profiled application's VM.

The ability to get a heap dump (full or partial) of the profiled 
applciation would allow several useful features:
- ability to detect which objects prevent certain objects from being 
garbage collected (very important for certain types of memory leaks 
and memory management debugging)
- ability to see individual instances on the heap and their data
- ability to perform more extensive memory leaks detections

At this point, with the work on migrating to JDK 5.0, it is unclear 
whether we would be able to address this feature in the first release 
(to go out with NB 4.1)
Comment 2 iformanek 2005-01-20 10:42:38 UTC
Fixed typo in summary
Comment 3 mishadmitriev 2005-02-16 00:02:53 UTC
Planned for M7 release, but strictly on the "if time permits" basis.
Comment 4 mishadmitriev 2005-02-17 06:25:28 UTC
Lowering the priority due to the concurrent nature of this feature.
Comment 5 iformanek 2005-05-09 20:44:37 UTC
Will not be part of 1.0
Comment 6 iformanek 2005-09-16 12:06:23 UTC
Not in 1.0
Comment 7 iformanek 2005-12-12 14:58:56 UTC
A related idea from Glen Lewis:

I use a batch script (for Windoze) to seek out static fields in source
that might be collections.  A PMD rule would be better.  But even better
still would be a profiler view that:
-iterates all loaded class
-iterates their fields
-prints them with a status
-primitive, nearly-primitive, and Log fields would get "green" status
-Collection, Map, and array types would be "red" status
-else "yellow" status

Add to this the ability to iterate the field's references for a total
size, and this feature would be the bomb.

Glen Lewis

PS - here's the script I use.  It's not perfect and only looks at your
own source code - but I'm sure someone out there will like it!

---------- static.bat ---------
@echo off
setlocal

findstr /S /N /C:"static" *.java | (
findstr /C:";" | (
findstr /V /I /C:"test" | (
findstr /V /C:"Logger" | (
findstr /V /C:" String" | (
findstr /V /C:" Calendar " | (
findstr /V /C:" DatetimeFormat " | (
findstr /V /I /C:" boolean " | (
findstr /V /I /C:" int " | (
findstr /V /I /C:" long " | (
findstr /V /I /C:" throws " | (
findstr /V /I /C:" void " | (
findstr /V /I /C:" double " | (
findstr /V /I /C:" char " | (
findstr /V /I /C:" Integer " | (
findstr /V /R "^[ ]*//" | (
more ))))))))))))))))

Endlocal
Comment 8 Jiri Sedlacek 2006-02-27 22:50:25 UTC
*** Issue 73073 has been marked as a duplicate of this issue. ***
Comment 9 Jiri Sedlacek 2006-08-14 21:45:22 UTC
First version of HeapWalker for HPROF format (supported by Sun's JDKs) will be 
available in Profiler 6.0 M2 release (further improvements according to users 
feedback).