MarkedSpace::capacity() iterates every block in MarkedSpace. Heap has m_totalBytesVisited, which is a good enough approximation of the size of MarkedSpace and it's O(1) so we should use it instead.
Created attachment 211079 [details] Patch
Created attachment 211123 [details] Patch
I was getting a small but persistent slow down on kraken with the first version, so I tried just keeping track as we add and remove MarkedBlocks from the MarkedSpace. This version didn't show any slowdown.
Comment on attachment 211123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=211123&action=review r=me > Source/JavaScriptCore/heap/MarkedSpace.h:135 > + size_t m_totalCapacity; I think "capacity" is a slightly better name here. We don't have a concept of "partial capacity" in this class.
Committed r155406: <http://trac.webkit.org/changeset/155406>