If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

GC::gclog calls heap->DumpMemoryInfo() unpredictably

VERIFIED FIXED

Status

Tamarin
Garbage Collection (mmGC)
VERIFIED FIXED
8 years ago
8 years ago

People

(Reporter: Steven Johnson, Assigned: Steven Johnson)

Tracking

unspecified
Bug Flags:
flashplayer-qrb +

Details

Attachments

(1 attachment, 1 obsolete attachment)

736 bytes, patch
Tommy Reilly
: review+
Lars T Hansen
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
GC::gclog calls heap->DumpMemoryInfo() in order to log gross stats any time anything interesting happens. It uses a global to prevent recursion, but neglects to clear it properly every time, resulting in output that is sensitive to timing, since some triggers are time-based (eg Sweep) and some triggers are processing-time based (eg ZCTReap). This manifests in memory profiling that is erratic. Enclosed is a patch that does what I presume this code intends to do (namely, call DumpMemoryInfo() every top-level call to gclog).
(Assignee)

Comment 1

8 years ago
Created attachment 395974 [details] [diff] [review]
Patch
Assignee: nobody → stejohns
Attachment #395974 - Flags: superreview?(edwsmith)
Attachment #395974 - Flags: review?(treilly)
(Assignee)

Comment 2

8 years ago
Hmm, didn't know about https://bugzilla.mozilla.org/show_bug.cgi?id=495443 when I wrote this. Still, the observed bugginess applies...

Updated

8 years ago
Flags: flashplayer-qrb?

Updated

8 years ago
Attachment #395974 - Flags: superreview?(edwsmith) → superreview?(lhansen)
(Assignee)

Comment 3

8 years ago
Created attachment 396241 [details] [diff] [review]
Patch #2

Same as previous patch, but don't do memory dumps during gc teardown (destroying==true); it appears that some as-yet-unexplained oddities of mprotect() [on Leopard, anyway] can cause private pages to be brought back resident, skewing our measured memory numbers upwards. It's worth figuring out what's going on, but as a temporary band-aid, skipping memstats during gc teardown seems like a plausible fix...
Attachment #395974 - Attachment is obsolete: true
Attachment #396241 - Flags: superreview?(lhansen)
Attachment #396241 - Flags: review?(treilly)
Attachment #395974 - Flags: superreview?(lhansen)
Attachment #395974 - Flags: review?(treilly)

Updated

8 years ago
Attachment #396241 - Flags: superreview?(lhansen) → superreview+

Updated

8 years ago
Status: NEW → ASSIGNED
Flags: flashplayer-qrb? → flashplayer-qrb+

Updated

8 years ago
Attachment #396241 - Flags: review?(treilly) → review+
(Assignee)

Comment 4

8 years ago
pushed to redux as changeset:   2408:f0042ab548d9
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Comment 5

8 years ago
Resolved fixed engineering / work item that has been pushed.  Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.