Closed Bug 1164042 Opened 9 years ago Closed 9 years ago

Log weak map entries in DumpHeapComplete

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

DumpHeapComplete sort of records information about weak maps, but it is incomplete.  I think it would be best to do what the CC does and just record a complete list of (weak map, entry key, entry key delegate, entry value).
Pretty straight forward.  I've updated my parsing script to parse these, though it doesn't do anything with them yet.

It just dumps things like this into the log:

WeakMapEntry map=0x110ee50a0 key=0x110ee50d0 keyDelegate=0x0 value=0x11390bd00
WeakMapEntry map=0x110ee50a0 key=0x110ee5070 keyDelegate=0x0 value=0x11390be80

I didn't add a new ====== separator so that parsing a pre-weak map log is the same as parsing a new log that just doesn't have any weak maps in it.

Note that this disables logging of weak map entries in the main part of the log.
Attachment #8605969 - Flags: review?(terrence)
Comment on attachment 8605969 [details] [diff] [review]
Log weak map entries in DumpHeapComplete.

Review of attachment 8605969 [details] [diff] [review]:
-----------------------------------------------------------------

Great! I think this approach makes sense -- will be nice to see these edges in the logs.
Attachment #8605969 - Flags: review?(terrence) → review+
https://hg.mozilla.org/mozilla-central/rev/2937420a7633
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
I've updated the GC log find_roots.py script to properly deal with liveness that passes through weak maps.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: