Bug 127567

Summary: Skip op_profiler callbacks if !VM::m_enabledProfiler
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ggaren, joepeck, mhahnenberg, msaboff, oliver, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the patch. ggaren: review+

Description Mark Lam 2014-01-24 10:43:15 PST
The profiler may not be always active (recording).  When it's not active (as in VM::m_enabledProfiler is null), then we might as well skip the op_profiler callbacks.  The callbacks themselves are already gated by a VM::enabledProfiler() check.  For the DFG, we'll turn the op_profiler handling into speculation checks and OSR exit to the baseline JIT if the profiler becomes active.
Comment 1 Mark Lam 2014-01-24 11:11:59 PST
Created attachment 222121 [details]
the patch.
Comment 2 Geoffrey Garen 2014-01-24 11:20:53 PST
Comment on attachment 222121 [details]
the patch.

r=me

Any speedup here?
Comment 3 Geoffrey Garen 2014-01-24 11:21:14 PST
Ah, I see: "This brings the Octane score up to ~3000 from ~2840."
Comment 4 Mark Lam 2014-01-24 13:20:18 PST
Thanks.  The patch has passed the layout tests.

Landed in r162718: <http://trac.webkit.org/r162718>.