Awesome stuff! As far as I see we currently don't need any fix up passes, as wrapper tracing cannot transparently handle containers, i.e., we never put them on the marking deque. In future this might change though, requiring an additional pass over the marking deque. Added this note to the document.
On Mon, Nov 28, 2016 at 11:43 AM Jochen Eisinger <joc...@chromium.org> wrote:the marking deque has pointers into to-be-marked oilpan objects, but I expect that those pointers would get updated on compaction.On Mon, Nov 28, 2016 at 11:38 AM Sigbjorn Finne <sigb...@opera.com> wrote:Den 11/28/2016 11:32, Jochen Eisinger skreiv:
> Wow, very exciting!
>
> I expect that this won't collide with the incremental marking of V8/Blink
> wrappers as it's done atomically?
>
That's one thing to make certain of; I don't think the object
compaction&movement here would be observable to that delayed marking,
but haven't followed the trace wrapper implementation CL-by-CL.
--sigbjorn
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
email to blink-dev+unsubscribe@chromium.org.
email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google
Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to blink-dev+unsubscribe@chromium.org.
--
Kentaro Hara, Tokyo, Japan
email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google
Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to blink-dev+...@chromium.org.
--
Kentaro Hara, Tokyo, Japan
email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google
Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to blink-dev+unsubscribe@chromium.org.
--
Kentaro Hara, Tokyo, Japan
--Kentaro Hara, Tokyo, Japan
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google
Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to blink-dev+unsubscribe@chromium.org.
--
Kentaro Hara, Tokyo, Japan
--
Kentaro Hara, Tokyo, Japan
--
You received this message because you are subscribed to the Google Groups
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to blink-dev+unsubscribe@chromium.org.
email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google
Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to blink-dev+...@chromium.org.
--
Kentaro Hara, Tokyo, Japan
--
Kentaro Hara, Tokyo, Japan
--
You received this message because you are subscribed to the Google Groups
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to blink-dev+...@chromium.org.
Are there any CPU workloads measured by UMA that we would expect to improve
with a less fragmented oilpan heap (i.e. better cache locality)?
email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google
Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to blink-dev+unsubscribe@chromium.org.
--
Kentaro Hara, Tokyo, Japan
--
Kentaro Hara, Tokyo, Japan
--
You received this message because you are subscribed to the Google Groups
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to blink-dev+unsubscribe@chromium.org.
// Makes a list of widgets and asynchronously frobnicates them. // // WTF::Vector promises that iterators remain valid unless the vector is mutated, // so this was previously legal code. It becomes illegal if compaction moves the // backing allocation. class Frobnicator : public GarbageCollected<Frobnicator> { public: Frobnicator() { // populate m_widgets with some widgets m_iterator = m_widgets.begin(); } void frobnicate() { for (; m_iterator != m_widgets.end(); ++m_iterator) { if (shouldYield()) { postTask(WTF::bind(&Frobnicator::frobnicate, WTF::makePersistent(this))); return; } (*m_iterator)->frobnicate(); } } private: bool shouldYield() const; HeapVector<Widget> m_widgets; HeapVector<Widget>::iterator m_iterator; };
Good point; we don't allow such unsafe iterators to be kept on heap objects following https://codereview.chromium.org/2588943002/
I agree that we should document it, but in general it is not allowed to hold a pointer to a middle of an object in Oilpan. It's unsafe anyway because the object won't be traced.
This is probably obvious, but I didn't see this in the design document, but this compaction will only happen when the GC is running in its "no pointers on stack" mode, right?On Thu, Jan 26, 2017 at 11:51 AM, Kentaro Hara <har...@chromium.org> wrote:I agree that we should document it, but in general it is not allowed to hold a pointer to a middle of an object in Oilpan. It's unsafe anyway because the object won't be traced.It's not safe if on the stack, or if paired with a pointer to the start of the object ;) FWIW I'm not aware of anywhere dom/ html/ do this.
This is probably obvious, but I didn't see this in the design document, but this compaction will only happen when the GC is running in its "no pointers on stack" mode, right?