Bug 77669 - Release build debugging should be easier
Summary: Release build debugging should be easier
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-02-02 12:45 PST by Filip Pizlo
Modified: 2012-02-06 17:35 PST (History)
0 users

See Also:


Attachments
the patch (26.26 KB, patch)
2012-02-02 12:47 PST, Filip Pizlo
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>