Currently Heap::size() is O(sizeof(Heap)). This is too expensive to call during a collection. We should keep a count of visited and copied bytes as each collection progresses so as to avoid re-walking the Heap at the end of collection.
Created attachment 210827 [details]
Comment on attachment 210827 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=210827&action=review
> + // rather than all used (inluding dead) copied bytes, thus it's
Should be "including".
> + size_t m_totalBytesVisited;
> + size_t m_totalBytesCopied;
Let's initialize these in the Heap constructor.
Committed r155317: <http://trac.webkit.org/changeset/155317>