RESOLVED FIXED 32103
Add zombies to JSC
https://bugs.webkit.org/show_bug.cgi?id=32103
Summary Add zombies to JSC
Oliver Hunt
Reported 2009-12-02 21:47:31 PST
While working on GC issues recently I found it useful to implement zombies in JSC. With a few assertions added it nailed the gc bugs i was hunting fairly quickly so i figure in the interests of saving people time in future it should get placed in trunk.
Attachments
Patch (13.08 KB, patch)
2009-12-02 21:53 PST, Oliver Hunt
barraclough: review+
Oliver Hunt
Comment 1 2009-12-02 21:53:58 PST
WebKit Review Bot
Comment 2 2009-12-02 21:57:09 PST
style-queue ran check-webkit-style on attachment 44209 [details] without any errors.
Gavin Barraclough
Comment 3 2009-12-02 22:17:41 PST
Comment on attachment 44209 [details] Patch > -#define COLLECT_ON_EVERY_ALLOCATION 0 > +#define COLLECT_ON_EVERY_ALLOCATION 1 Yeah, I don't think you mean that. I'm only guessing. > - imp->~JSCell(); > +#if ENABLE(JSC_ZOMBIES) > + if (!imp->isZombie()) { > + const ClassInfo* info = imp->classInfo(); > +#endif > + imp->~JSCell(); > +#if ENABLE(JSC_ZOMBIES) > + new (imp) JSZombie(info, JSZombie::leakedZombieStructure()); > + heap.numZombies++; > + } > +#endif Personally I think this might be a little nicer as: #if ENABLE(JSC_ZOMBIES) if (!imp->isZombie()) { const ClassInfo* info = imp->classInfo(); imp->~JSCell(); new (imp) JSZombie(info, JSZombie::leakedZombieStructure()); heap.numZombies++; } #else imp->~JSCell(); #endif BRRrrrraaaiiiiiinnnnzzzzzzzzzzzzzzzzzzzzz+
Oliver Hunt
Comment 4 2009-12-02 22:26:43 PST
Committed r51624
JSC Zombie
Comment 5 2009-12-02 22:57:16 PST
MMmoorrre BRRrrrraaaiiiiiinnnnzzzzzzzzzzzzzzzzzzzzz.
Geoffrey Garen
Comment 6 2009-12-03 12:38:42 PST
LOL
Note You need to log in before you can comment on or make changes to this bug.