Bug 96708 - Remove the Zapped BlockState
Summary: Remove the Zapped BlockState
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-13 17:04 PDT by Mark Hahnenberg
Modified: 2012-09-14 00:06 PDT (History)
2 users (show)

See Also:


Attachments
Patch (13.11 KB, patch)
2012-09-13 17:23 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2012-09-13 17:04:34 PDT
The Zapped block state is rather confusing. It indicates that a block is in one of two different states that we can't tell the difference between:

1) I have run all destructors of things that are zapped, and I have not allocated any more objects. This block is ready for reclaiming if you so choose.
2) I have run all the destructors of things that are zapped, but I have allocated more stuff since then, so it is not safe to reclaim this block.

This state adds a lot of complexity to our state transition model for MarkedBlocks. We should get rid of it. We can replace this state by making sure mark bits represent all of the liveness information we need when running our conservative stack scan. Instead of zapping the free list when canonicalizing cell liveness data prior to a conservative scan, we can instead mark all objects in the block except for those in the free list. This should incur no performance penalty since we're doing it on a very small O(1) number of blocks at the beginning of the collection. 

For the time being we still need to use zapping to determine whether we have run an object's destructor or not.
Comment 1 Mark Hahnenberg 2012-09-13 17:23:02 PDT
Created attachment 164009 [details]
Patch
Comment 2 Geoffrey Garen 2012-09-13 18:29:17 PDT
Comment on attachment 164009 [details]
Patch

r=me
Comment 3 WebKit Review Bot 2012-09-14 00:06:01 PDT
Comment on attachment 164009 [details]
Patch

Clearing flags on attachment: 164009

Committed r128563: <http://trac.webkit.org/changeset/128563>
Comment 4 WebKit Review Bot 2012-09-14 00:06:04 PDT
All reviewed patches have been landed.  Closing bug.