[Webkit-unassigned] [Bug 38420] Web Inspector: JSC should provide heap size info for Timeline panel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 13 10:28:45 PDT 2010


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





--- Comment #2 from Geoffrey Garen <ggaren at apple.com>  2010-05-13 10:28:45 PST ---
I think it's better not to traverse the heap. In the worst case, the heap traversal can be more expensive than the page load itself, so there's a big risk of measurement overhead ruining the timeline.

How about just using m_heap.usedBlocks * BLOCK_SIZE? That's a constant-time measurement of the size of the heap, which should be good enough for general measurement. (statistics() goes farther and gets exact counts of what's live and dead, but that's really only useful for debugging memory leaks in WebKit.)

There's no current accessor for m_heap.usedBlocks * BLOCK_SIZE, but it would be trivial to add one.

size_t Heap::size() // In bytes.
{
    return m_heap.usedBlocks * BLOCK_SIZE;
}

-- 
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