[Webkit-unassigned] [Bug 37025] Web Inspector: GC Run event should be added to Timeline Panel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 8 15:58:51 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37025





--- Comment #22 from jaimeyap at google.com  2010-04-08 15:58:50 PST ---
It does not happen very often, but I managed to reproduce. Here is a snippet of
the timeline record stream that demonstrates things coming out of order. Here
we get a data received event, followed by two small GCEvents, and then an
EvalScript event. The GC's here should be children of this EvalScript event,
but they are not. They are top level and are actually emitted before the
EvalScript event even though their timestamps indicate they come after:

{"data":{"identifier":22},"children":[],"type":16,"usedHeapSize":2962736,"totalHeapSize":5148672,"duration":1,"time":36294.000244140625,"sequence":1408}

{"data":{"usedHeapSizeDelta":1334504},"type":17,"usedHeapSize":8056076,"totalHeapSize":10981376,"duration":15,"time":36405.000244140625,"sequence":1409}

{"data":{"usedHeapSizeDelta":1058044},"type":17,"usedHeapSize":8064820,"totalHeapSize":10981376,"duration":2,"time":36423.000244140625,"sequence":1410}

{"data":{"url":"https://wave.google.com/a/google.com/static/F4CDD1840C43DA658FB4E6CC8625D245.cache.js","lineNumber":1},"children":[{"data":{"timerId":3,"timeout":50,"singleShot":false},"type":5,"usedHeapSize":6437768,"totalHeapSize":8245248,"time":36403.000244140625}],"type":10,"usedHeapSize":8070336,"totalHeapSize":10981376,"duration":131.999755859375,"time":36302.000244140625,"sequence":1411}

Out of order top level events are not so bad. But here we have some children of
an HTML parse node that displays the same out of orderness, thus violating the
self time property. We see a GCEvent come before an EvalScript event inside a
node, when this GCEvent should really be a child of the EvalScript event, not
its peer.:

"children":[

{"data":{},"children":[],"type":2,"usedHeapSize":11760936,"totalHeapSize":14364672,"duration":0,"time":36647.000244140625},


{"data":{"usedHeapSizeDelta":3969088},"type":17,"usedHeapSize":7986124,"totalHeapSize":17584128,"duration":21,"time":36649.000244140625},{"data":{"url":"https://wave.google.com/a/google.com/?pli=1","lineNumber":55},"children":[],"type":10,"usedHeapSize":7986264,"totalHeapSize":17584128,"duration":23.999755859375,"time":36647.000244140625}
]

I know how this happens. If ScriptGCEvent::gcEpilogueCallback() gets called
AFTER the correct node's parent has already closed and popped from the record
stack, then the GCEvents will incorrectly be attributed to the parent of the
node that they should have been attributed to.

I am not sure what guarantees you have about V8 calling you back in time. It
seems like sometimes it doesnt.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list