Bug 143349 - Add Options::dumpSourceAtDFGTime()
Summary: Add Options::dumpSourceAtDFGTime()
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 Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-02 15:27 PDT by Mark Lam
Modified: 2015-04-02 15:48 PDT (History)
5 users (show)

See Also:


Attachments
the patch. (5.23 KB, patch)
2015-04-02 15:34 PDT, Mark Lam
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2015-04-02 15:27:16 PDT
Sometimes, we will want to see the JSC source code that we're compiling, and it would be nice to be able to do this without having to jump thru a lot of hoops.  So, let's add a Options::dumpSourceAtDFGTime() option just like we have a Options::dumpBytecodeAtDFGTime() option.
Comment 1 Mark Lam 2015-04-02 15:33:12 PDT
(In reply to comment #0)
> Sometimes, we will want to see the JSC source code ...

typo: ... want to see the JS source code ...
Comment 2 Mark Lam 2015-04-02 15:34:29 PDT
Created attachment 250014 [details]
the patch.
Comment 3 Michael Saboff 2015-04-02 15:41:36 PDT
Comment on attachment 250014 [details]
the patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=250014&action=review

r=me

> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3988
> +        dataLog("==== begin source ====\n");

Do we this this delimiter?

> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3990
> +        dataLog("\n==== end source ====\n\n");

ditto
Comment 4 Mark Lam 2015-04-02 15:43:40 PDT
(In reply to comment #3)
> Comment on attachment 250014 [details]
> the patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=250014&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3988
> > +        dataLog("==== begin source ====\n");
> 
> Do we this this delimiter?
> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3990
> > +        dataLog("\n==== end source ====\n\n");
> 
> ditto

It helps.  Consider the case where we actually compile eval or global code which don't have a { } around them.  Plus this is only debugging code.  So, let's go with these for now.
Comment 5 Mark Lam 2015-04-02 15:48:24 PDT
Thanks for the review.  Landed in r182294: <http://trac.webkit.org/r182294>.