[Webkit-unassigned] [Bug 75812] JSC should be a triple-tier VM

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 24 19:49:23 PST 2012


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





--- Comment #41 from Filip Pizlo <fpizlo at apple.com>  2012-01-24 19:49:23 PST ---
(In reply to comment #38)
> (From update of attachment 123858 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=123858&action=review
> 
> > Source/JavaScriptCore/bytecode/CodeBlock.cpp:-62
> > -#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING)
> 
> This is enabling dumping in release builds? - I don't think we'll want all these strings in a release binary, this change should be reverted.

Should we really bothered by 824 bytes worth of strings and code?  The way C++ inlines template code like crazy, probably any change we make introduces that much.

Here's the size of a release build of the JavaScriptCore framework in ToT: 3578504 bytes
Here's the size of a release build with CodeBlock dumping compiled in: 3579328 bytes

So compiling in the dumping code leads to 824 bytes *total* increase in the framework size.  That's strings and code, combined.  Another way to put it is that it's a 0.02% increase - hardly noticable.

It's pretty much routine for me at this point to have to enable this dumping thingy in release builds when dealing with release-only crashes.  It's really annoying, and the NDEBUG checks are super annoying.  I agree with your comment below that we should strive to reduce the amount of #if madness in our code.

Are we really willing to have #if NDEBUG statements in a bunch of places to protect against having a 0.02% increase in code size?

> 
> > Source/JavaScriptCore/bytecode/CodeBlock.cpp:1535
> > +#if ENABLE(LLINT)    
> 
> I'm saddened to see yet another build flag – though this is clearly necessary until LLInt is ported to all platforms.
> 
> Looking toward the future, we may need to think about rationalizing down – typing together LLINT + JIT + DFG + MACRO_ASSEMBLER + YARR_JIT into a single brave-new-world-of-fast-JS-with-JITs switch.
> 
> > Source/JavaScriptCore/bytecode/CodeBlock.cpp:1754
> > +    if (!interpreter->enabled()) {
> 
> This confuses me a little - it looks like if LLInt is being used, interpreter->enabled() will be true, does LLInt not use the structure slots embedded within the instruction stream? – a comment here would probably be useful. :-)

interpreter->enabled() means that LLInt was compiled in but we ended up using the old interpreter instead, a mode that I still support because there's probably a

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