Bug 163617

Summary: Add JSC option to show time spent in each optimization phase
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, sbarati
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Michael Saboff 2016-10-18 13:41:32 PDT
This option would provide more detail than the reportXXXCompileTimes options.  It would show the times for each phase of DFG / FTL compilation.
Comment 1 Michael Saboff 2016-10-18 13:53:26 PDT
Created attachment 291981 [details]
Patch
Comment 2 Mark Lam 2016-10-18 13:56:48 PDT
Comment on attachment 291981 [details]
Patch

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

> Source/JavaScriptCore/dfg/DFGPhase.h:82
> +        before = monotonicallyIncreasingTimeMS();

Given that the DFG can run on a separate JIT thread concurrently, should you be using currentCPUTime() instead?
Comment 3 Saam Barati 2016-10-18 13:57:26 PDT
Comment on attachment 291981 [details]
Patch

r=me
Comment 4 Michael Saboff 2016-10-18 14:04:07 PDT
(In reply to comment #2)
> Comment on attachment 291981 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=291981&action=review
> 
> > Source/JavaScriptCore/dfg/DFGPhase.h:82
> > +        before = monotonicallyIncreasingTimeMS();
> 
> Given that the DFG can run on a separate JIT thread concurrently, should you
> be using currentCPUTime() instead?

All of the other time stats for the compiler tiers use monotonicallyIncreasingTime().  Given that the compilation threads "should" run without being preempted, I think we're fine.
Comment 5 WebKit Commit Bot 2016-10-18 14:31:40 PDT
Comment on attachment 291981 [details]
Patch

Clearing flags on attachment: 291981

Committed r207491: <http://trac.webkit.org/changeset/207491>
Comment 6 WebKit Commit Bot 2016-10-18 14:31:45 PDT
All reviewed patches have been landed.  Closing bug.