Closed Bug 894441 Opened 11 years ago Closed 11 years ago

GC log does not include weak map key information

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It has been a while since I looked at this, so I don't quite recall which marking path is involved here, but it looks like the GC heap dumping is not recording the key:

0x4393c020 B WeakMap 46ebffd0
> 0x4391a6a0 B type
> 0x43932c10 B shape
> 0x474d69d0 B WeakMap entry
> 0x47469040 B WeakMap entry
> 0x4770d9a0 G WeakMap entry
> 0x47766b50 G WeakMap entry
> 0x47481b80 B WeakMap entry

B2G seems to use many weak maps, so this could become important.

I'm not sure the best way to fix this.  The easiest short term fix may be for me to finally finish bug 692226 to add these to the CC log, then with an AllTraces log you could look up the keys in the CC log.
I think it should be easy to fix this. We need to set dtrc.eagerlyTraceWeakMaps = TraceWeakMapKeysValues in DumpHeapComplete right after initializing the tracer.
Attached patch v0: trivialSplinter Review
I was waiting for a build so I figured I'd whip this up.
Attachment #776714 - Flags: review?(wmccloskey)
Attachment #776714 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/d9f49a1a6e0d
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: