Bug 163617 - Add JSC option to show time spent in each optimization phase
Summary: Add JSC option to show time spent in each optimization phase
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-18 13:41 PDT by Michael Saboff
Modified: 2016-10-18 14:31 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.97 KB, patch)
2016-10-18 13:53 PDT, Michael Saboff
no flags Details | Formatted Diff | Diff

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