Bug 129464 - Clean up Heap::collect and Heap::markRoots
Summary: Clean up Heap::collect and Heap::markRoots
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-27 16:46 PST by Mark Hahnenberg
Modified: 2014-03-04 21:51 PST (History)
1 user (show)

See Also:


Attachments
Patch (28.63 KB, patch)
2014-02-27 16:49 PST, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
Patch (1.35 KB, patch)
2014-02-28 09:35 PST, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2014-02-27 16:46:30 PST
These functions have built up a lot of cruft recently. We should do a bit of cleanup to make them easier to grok.
Comment 1 Mark Hahnenberg 2014-02-27 16:49:57 PST
Created attachment 225430 [details]
Patch
Comment 2 Geoffrey Garen 2014-02-27 18:46:49 PST
Comment on attachment 225430 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=225430&action=review

r=me

> Source/JavaScriptCore/heap/Heap.cpp:483
> +void Heap::markProtectedObjects(HeapRootVisitor& heapRootVisitor)

"visit"?

> Source/JavaScriptCore/heap/Heap.cpp:493
> +void Heap::markTempSortVectors(HeapRootVisitor& heapRootVisitor)

"visit"?

> Source/JavaScriptCore/heap/Heap.cpp:513
> +void Heap::markArgumentBuffers(HeapRootVisitor& visitor)

"visit"?

> Source/JavaScriptCore/heap/Heap.cpp:637
> +    SamplingRegion samplingRegion("Garbage Collection: Tracing");

"Marking"?
Comment 3 Mark Hahnenberg 2014-02-28 08:50:48 PST
Committed r164862: <http://trac.webkit.org/changeset/164862>
Comment 4 Mark Hahnenberg 2014-02-28 08:51:05 PST
Comment on attachment 225430 [details]
Patch

Clearing review flag.
Comment 5 Csaba Osztrogonác 2014-02-28 09:05:46 PST
Comment on attachment 225430 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=225430&action=review

> Source/JavaScriptCore/heap/Heap.cpp:667
> +#if ENABLE(GGC)
> +    Vector<const JSCell*> rememberedSet(m_slotVisitor.markStack().size());
> +    m_slotVisitor.markStack().fillVector(rememberedSet);
> +#endif

rememberedSet is defined inside ENABLE(GGC) guard ...

> Source/JavaScriptCore/heap/Heap.cpp:689
> +    clearRememberedSet(rememberedSet);

... but used outside. And it broke the !ENABLE(GGC) builds.
Comment 6 Mark Hahnenberg 2014-02-28 09:21:56 PST
(In reply to comment #5)
> (From update of attachment 225430 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=225430&action=review
> 
> > Source/JavaScriptCore/heap/Heap.cpp:667
> > +#if ENABLE(GGC)
> > +    Vector<const JSCell*> rememberedSet(m_slotVisitor.markStack().size());
> > +    m_slotVisitor.markStack().fillVector(rememberedSet);
> > +#endif
> 
> rememberedSet is defined inside ENABLE(GGC) guard ...
> 
> > Source/JavaScriptCore/heap/Heap.cpp:689
> > +    clearRememberedSet(rememberedSet);
> 
> ... but used outside. And it broke the !ENABLE(GGC) builds.

Good point, fix coming.
Comment 7 Mark Hahnenberg 2014-02-28 09:35:40 PST
Reopening to attach new patch.
Comment 8 Mark Hahnenberg 2014-02-28 09:35:49 PST
Created attachment 225473 [details]
Patch
Comment 9 Mark Hahnenberg 2014-02-28 09:38:53 PST
Comment on attachment 225473 [details]
Patch

Since this fixes a build, it doesn't need review but feel free to comment :-)
Comment 10 Mark Hahnenberg 2014-02-28 09:41:10 PST
Comment on attachment 225473 [details]
Patch

Bah, commit queue will take too long. Landed manually in r164864.
Comment 11 Mark Hahnenberg 2014-03-04 21:51:27 PST
Closing.