Closed
Bug 127092
Opened 24 years ago
Closed 24 years ago
Heap Analysis instrumentation in code
Categories
(SeaMonkey :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: dp, Assigned: dp)
Details
(Keywords: memory-footprint)
Attachments
(1 file, 5 obsolete files)
|
1.86 KB,
patch
|
dp
:
review+
|
Details | Diff | Splinter Review |
Would be nice to have code in release builds to get heap statistics.
| Assignee | ||
Comment 1•24 years ago
|
||
Goals for instrumentation:
- Ultra light weight
- Non-interfering with any operation
- triggered explicitly
| Assignee | ||
Comment 2•24 years ago
|
||
The code is enalbed by setting
set MOZ_CFLAGS=MOZ_HEAP_STATISTICS
This is a compile time switch. Output is analyzed by perl script
mozilla/tools/footprint/heapmap.pl
| Assignee | ||
Comment 3•24 years ago
|
||
set MOZ_CFLAGS=-DMOZ_HEAP_STATISTICS
cd xpfe/appshell/src
make
| Assignee | ||
Updated•24 years ago
|
Attachment #70786 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•24 years ago
|
||
Dumps heap to c:\heapdump.txt when app gets the message MOZ_HeapDump
Attachment #70794 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•24 years ago
|
||
Protects against use of HeapWalk() and GetProcessHeaps() from win98 where they
dont exist.
Attachment #70981 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•24 years ago
|
||
Comment on attachment 70988 [details] [diff] [review]
Protecting agaist win98 (thanks Garrett)
r=blythe
Attachment #70988 -
Flags: review+
| Assignee | ||
Comment 7•24 years ago
|
||
rpotts/brendan : sr=?
mozilla/tools/footprint :
heapdump.cpp : sends the MOZ_HeapDump message to mozilla
heapmap.pl : perl script that analyzes the heap dump
I am hoping to get this into 0.9.9 USED heap and heap overhead would be the metrics
| Assignee | ||
Comment 8•24 years ago
|
||
Small heap allocator isn't showing up in heapwalk. On win2k, non-debug CRT
(MSVCRT) doesn't use small heap. MSVCDRT (debug CRT) seems to be using it for
win2k. Disabling this altogether for debug builds only.
Effect:
- Accurate heap numbers on win2k debug builds
- Win98 uses it. But we dont have heapwalk() on win98. So no accurate
measurement. And release builds will not be affected.
| Assignee | ||
Comment 9•24 years ago
|
||
Comment on attachment 71001 [details] [diff] [review]
Disabling small heap allocator for debug builds
r=blythe
Attachment #71001 -
Flags: review+
Updated•24 years ago
|
Attachment #71001 -
Flags: superreview+
Comment 10•24 years ago
|
||
Comment on attachment 71001 [details] [diff] [review]
Disabling small heap allocator for debug builds
sr=brendan@mozilla.org, but if rpotts wants to override me, I defer to him.
/be
| Assignee | ||
Comment 11•24 years ago
|
||
BTW, I have #if defined(DEBUG) && defined(XP_WIN32) around the #include
"malloc.h" in the second patch.
Comment 12•24 years ago
|
||
Comment on attachment 70988 [details] [diff] [review]
Protecting agaist win98 (thanks Garrett)
sr=brendan@mozilla.org, jwz would want you to spell out Mozilla, not use
MOZ_... -- write a letter!
/be
Attachment #70988 -
Flags: superreview+
| Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla1.0 → mozilla0.9.9
Comment 13•24 years ago
|
||
looks good to me -- go for it!
-- rick
Comment 14•24 years ago
|
||
Comment on attachment 70988 [details] [diff] [review]
Protecting agaist win98 (thanks Garrett)
a=shaver for 0.9.9.
Attachment #70988 -
Flags: approval+
Comment 15•24 years ago
|
||
Comment on attachment 71001 [details] [diff] [review]
Disabling small heap allocator for debug builds
a=shaver for 0.9.9
Attachment #71001 -
Flags: approval+
| Assignee | ||
Comment 16•24 years ago
|
||
Marking previous two patches obsolete as they are approved and checked in.
This new patch is derived from my greated understanding of the windows
allocator. HEAPs have multiple REGIONS in them which have blocks that are
either USED, FREE or UNCOMMITTED (just Vm and hasnt been mapped into physical
memory or swap). Getting this detail printed into the heapdump file.
Will modify perl analysis script : mozilla/tools/footprint/heapmap.pl to parse
this new format.
Attachment #70988 -
Attachment is obsolete: true
Attachment #71001 -
Attachment is obsolete: true
| Assignee | ||
Comment 17•24 years ago
|
||
shaver: can you just approve the patch. This is just a print format change in
code that only gets called for heapdump which no user will every encounter.
| Assignee | ||
Comment 18•24 years ago
|
||
Comment on attachment 71689 [details] [diff] [review]
Fine tuning the heapdump output
r=dp
Attachment #71689 -
Flags: review+
| Assignee | ||
Comment 19•24 years ago
|
||
Comment on attachment 71689 [details] [diff] [review]
Fine tuning the heapdump output
I meant r=blythe
| Assignee | ||
Comment 20•24 years ago
|
||
All instrumentation checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•