Bug 77669

Summary: Release build debugging should be easier
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch barraclough: review+

Description Filip Pizlo 2012-02-02 12:45:13 PST
JavaScriptCore has loads of #ifndef NDEBUG guards for helper methods that print the internal representation (bytecode, DFG, JSValue).  While this saves some space in release binaries, it also makes it really hard to do meaningful debugging while in release mode.  Not to mention it adds more preprocessor noise.  It would be better if we just let the various debugging helpers compiled in always, so we can always call them even when in a release build.
Comment 1 Filip Pizlo 2012-02-02 12:47:54 PST
Created attachment 125163 [details]
the patch

No performance impact.  0.8% increase in the size of the JavaScriptCore framework.
Comment 2 Gavin Barraclough 2012-02-02 12:54:04 PST
Comment on attachment 125163 [details]
the patch

It would be great at some point if we can harden the code so that that debugOffset cannot be abused in a way that would introduce bugs.
Comment 3 Filip Pizlo 2012-02-02 13:50:19 PST
Landed in http://trac.webkit.org/changeset/106590
Comment 4 Filip Pizlo 2012-02-06 17:35:29 PST
<rdar://problem/10817157>