Ignore:
Timestamp:
Feb 26, 2014, 12:13:22 PM (11 years ago)
Author:
[email protected]
Message:

Compilation policy management belongs in operationOptimize(), not the DFG Driver.
<https://webkit.org/b/129355>

Reviewed by Filip Pizlo.

By compilation policy, I mean the rules for determining whether to
compile, when to compile, when to attempt compilation again, etc. The
few of these policy decisions that were previously being made in the
DFG driver are now moved to operationOptimize() where we keep the rest
of the policy logic. Decisions that are based on the capabilities
supported by the DFG are moved to DFG capabiliityLevel().

I've run the following benchmarks:

  1. the collection of jsc benchmarks on the jsc executable vs. its baseline.
  2. Octane 2.0 in browser without the WebInspector.
  3. Octane 2.0 in browser with the WebInspector open and a breakpoint set somewhere where it won't break.

In all of these, the results came out to be a wash as expected.

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::isSupported):
(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
(JSC::DFG::mightInlineFunctionForCall):
(JSC::DFG::mightInlineFunctionForClosureCall):
(JSC::DFG::mightInlineFunctionForConstruct):

  • dfg/DFGCapabilities.h:
  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • jit/JITOperations.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGDriver.cpp

    r164207 r164734  
    3535#include "DFGThunks.h"
    3636#include "DFGWorklist.h"
    37 #include "Debugger.h"
    3837#include "JITCode.h"
    3938#include "JSCInlines.h"
     
    7069    ASSERT(!profiledDFGCodeBlock || profiledDFGCodeBlock->jitType() == JITCode::DFGJIT);
    7170   
    72     if (!Options::useDFGJIT() || !MacroAssembler::supportsFloatingPoint())
    73         return CompilationFailed;
    74 
    75     if (!Options::bytecodeRangeToDFGCompile().isInRange(codeBlock->instructionCount()))
    76         return CompilationFailed;
    77    
    78     if (vm.enabledProfiler())
    79         return CompilationInvalidated;
    80 
    81     Debugger* debugger = codeBlock->globalObject()->debugger();
    82     if (debugger && (debugger->isStepping() || codeBlock->baselineAlternative()->hasDebuggerRequests()))
    83         return CompilationInvalidated;
    84 
    8571    if (logCompilationChanges(mode))
    8672        dataLog("DFG(Driver) compiling ", *codeBlock, " with ", mode, ", number of instructions = ", codeBlock->instructionCount(), "\n");
Note: See TracChangeset for help on using the changeset viewer.