Closed Bug 626611 Opened 13 years ago Closed 6 years ago

Exact tracing for GCRoots

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Q1 12 - Brannan

People

(Reporter: lhansen, Unassigned)

References

Details

(Whiteboard: Tracking)

Attachments

(1 file, 1 obsolete file)

We should make it possible for GCRoots to trace themselves exactly for the same reason we've done it for other objects: reduced conservative retention, improved performance.

In particular, the annotation / marker generation system should work for roots, and roots in the VM and Player should be converted to use exact tracing.
GCRoots are used frequently in multiple inheritance settings in the Flash Player and it may be more natural with a function-pointer-based mechanism than a vtable-based mechanism.
Flags: flashplayer-bug-
Depends on: 632453
Attached patch Patch (obsolete) — Splinter Review
Straightforward system based on virtual methods on GCRoot.  Despite earlier remarks I opted to use a vtable since GCRoot has a vtable already.

Notable:

The gcTrace method does not take a cursor or return a 'completed' flag - we assume all exactly traced roots are small.  That's a simplification that may not be true right now.  But once we fix the stack case (bug #634651) it's going to be mostly true, and when we subsequently move the strings tables out of the AvmCore and PlayerAvmCore (bug #599818) then it will probably be entirely true.

I'm not completely happy with the API here because it forces the passing of the kExact flag into the constructor call chain (it's an argument to GCRoot::GCRoot).   That means that it's going to be error-prone to subclass an exactly traced root class without making that subclass exactly traced as well.  It's possible that the good old 'MMgc::setExact()' mechanism should come back to life to handle roots, instead.  It does not look like the trick we use for GC objects, with the kExact flag passed to the 'new' operator, will work, because that depends on storage external to the object in which to store the flag.
Attachment #513966 - Flags: feedback?(treilly)
Whiteboard: Tracking → Tracking has-patch
Comment on attachment 513966 [details] [diff] [review]
Patch

Looks simple enough
Attachment #513966 - Flags: feedback?(treilly) → feedback+
Depends on: 635660
No longer depends on: 599820
The boolean argument will become a present/absent GCExactFlag argument.

Also needed here is documentation updates.
Blocks: 642097
Attached patch Patch, v2Splinter Review
Attachment #513966 - Attachment is obsolete: true
Attachment #519617 - Flags: review?(treilly)
Attachment #519617 - Flags: review?(treilly) → review+
changeset: 6091:9c65f05cb0b0
user:      Lars T Hansen <lhansen@adobe.com>
summary:   Fix 626611 - Exact tracing for GCRoots: tracing system (r=treilly)

http://hg.mozilla.org/tamarin-redux/rev/9c65f05cb0b0
Patch pushed, this is just a tracker now.
Whiteboard: Tracking has-patch → Tracking
No longer blocks: 642097
Depends on: 642097
No longer depends on: 635660
Depends on: 642392
Depends on: 647182
Target Milestone: Q3 11 - Serrano → Q1 12 - Brannan
Assignee: lhansen → nobody
Status: ASSIGNED → NEW
Flags: flashplayer-qrb+
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: