Commit b5a6367a authored by fpizlo@apple.com's avatar fpizlo@apple.com

CodeBlock::m_executeCounter should be renamed to CodeBlock::m_jitExecuteCounter

https://bugs.webkit.org/show_bug.cgi?id=76144
<rdar://problem/10681711>

Rubber stamped by Gavin Barraclough.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::addressOfJITExecuteCounter):
(JSC::CodeBlock::offsetOfJITExecuteCounter):
(JSC::CodeBlock::jitExecuteCounter):
(JSC::CodeBlock::optimizeNextInvocation):
(JSC::CodeBlock::dontOptimizeAnytimeSoon):
(JSC::CodeBlock::optimizeAfterWarmUp):
(JSC::CodeBlock::optimizeAfterLongWarmUp):
(JSC::CodeBlock::optimizeSoon):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* jit/JIT.cpp:
(JSC::JIT::emitOptimizationCheck):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d4422ea0
2012-01-11 Filip Pizlo <fpizlo@apple.com>
CodeBlock::m_executeCounter should be renamed to CodeBlock::m_jitExecuteCounter
https://bugs.webkit.org/show_bug.cgi?id=76144
<rdar://problem/10681711>
Rubber stamped by Gavin Barraclough.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addressOfJITExecuteCounter):
(JSC::CodeBlock::offsetOfJITExecuteCounter):
(JSC::CodeBlock::jitExecuteCounter):
(JSC::CodeBlock::optimizeNextInvocation):
(JSC::CodeBlock::dontOptimizeAnytimeSoon):
(JSC::CodeBlock::optimizeAfterWarmUp):
(JSC::CodeBlock::optimizeAfterLongWarmUp):
(JSC::CodeBlock::optimizeSoon):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* jit/JIT.cpp:
(JSC::JIT::emitOptimizationCheck):
2012-01-11 Gavin Barraclough <barraclough@apple.com>
Merge 'Getter'/'Setter' attributes into 'Accessor'
......@@ -780,7 +780,7 @@ namespace JSC {
// Functions for controlling when tiered compilation kicks in. This
// controls both when the optimizing compiler is invoked and when OSR
// entry happens. Two triggers exist: the loop trigger and the return
// trigger. In either case, when an addition to m_executeCounter
// trigger. In either case, when an addition to m_jitExecuteCounter
// causes it to become non-negative, the optimizing compiler is
// invoked. This includes a fast check to see if this CodeBlock has
// already been optimized (i.e. replacement() returns a CodeBlock
......@@ -821,14 +821,14 @@ namespace JSC {
return Options::executionCounterValueForOptimizeAfterLongWarmUp << reoptimizationRetryCounter();
}
int32_t* addressOfExecuteCounter()
int32_t* addressOfJITExecuteCounter()
{
return &m_executeCounter;
return &m_jitExecuteCounter;
}
static ptrdiff_t offsetOfExecuteCounter() { return OBJECT_OFFSETOF(CodeBlock, m_executeCounter); }
static ptrdiff_t offsetOfJITExecuteCounter() { return OBJECT_OFFSETOF(CodeBlock, m_jitExecuteCounter); }
int32_t executeCounter() const { return m_executeCounter; }
int32_t jitExecuteCounter() const { return m_jitExecuteCounter; }
unsigned optimizationDelayCounter() const { return m_optimizationDelayCounter; }
......@@ -837,7 +837,7 @@ namespace JSC {
// expensive than executing baseline code.
void optimizeNextInvocation()
{
m_executeCounter = Options::executionCounterValueForOptimizeNextInvocation;
m_jitExecuteCounter = Options::executionCounterValueForOptimizeNextInvocation;
}
// Call this to prevent optimization from happening again. Note that
......@@ -847,7 +847,7 @@ namespace JSC {
// the future as well.
void dontOptimizeAnytimeSoon()
{
m_executeCounter = Options::executionCounterValueForDontOptimizeAnytimeSoon;
m_jitExecuteCounter = Options::executionCounterValueForDontOptimizeAnytimeSoon;
}
// Call this to reinitialize the counter to its starting state,
......@@ -858,14 +858,14 @@ namespace JSC {
// counter that this corresponds to is also available directly.
void optimizeAfterWarmUp()
{
m_executeCounter = counterValueForOptimizeAfterWarmUp();
m_jitExecuteCounter = counterValueForOptimizeAfterWarmUp();
}
// Call this to force an optimization trigger to fire only after
// a lot of warm-up.
void optimizeAfterLongWarmUp()
{
m_executeCounter = counterValueForOptimizeAfterLongWarmUp();
m_jitExecuteCounter = counterValueForOptimizeAfterLongWarmUp();
}
// Call this to cause an optimization trigger to fire soon, but
......@@ -888,7 +888,7 @@ namespace JSC {
// in the baseline code.
void optimizeSoon()
{
m_executeCounter = Options::executionCounterValueForOptimizeSoon << reoptimizationRetryCounter();
m_jitExecuteCounter = Options::executionCounterValueForOptimizeSoon << reoptimizationRetryCounter();
}
// The speculative JIT tracks its success rate, so that we can
......@@ -1130,7 +1130,7 @@ namespace JSC {
OwnPtr<CodeBlock> m_alternative;
int32_t m_executeCounter;
int32_t m_jitExecuteCounter;
uint32_t m_speculativeSuccessCounter;
uint32_t m_speculativeFailCounter;
uint8_t m_optimizationDelayCounter;
......
......@@ -579,13 +579,13 @@ void OSRExitCompiler::compileExit(const OSRExit& exit, SpeculationRecovery* reco
AssemblyHelpers::Jump lowFailRate = m_jit.branch32(AssemblyHelpers::BelowOrEqual, GPRInfo::regT2, GPRInfo::regT1);
// Reoptimize as soon as possible.
m_jit.store32(AssemblyHelpers::Imm32(Options::executionCounterValueForOptimizeNextInvocation), AssemblyHelpers::Address(GPRInfo::regT0, CodeBlock::offsetOfExecuteCounter()));
m_jit.store32(AssemblyHelpers::Imm32(Options::executionCounterValueForOptimizeNextInvocation), AssemblyHelpers::Address(GPRInfo::regT0, CodeBlock::offsetOfJITExecuteCounter()));
AssemblyHelpers::Jump doneAdjusting = m_jit.jump();
fewFails.link(&m_jit);
lowFailRate.link(&m_jit);
m_jit.store32(AssemblyHelpers::Imm32(m_jit.baselineCodeBlock()->counterValueForOptimizeAfterLongWarmUp()), AssemblyHelpers::Address(GPRInfo::regT0, CodeBlock::offsetOfExecuteCounter()));
m_jit.store32(AssemblyHelpers::Imm32(m_jit.baselineCodeBlock()->counterValueForOptimizeAfterLongWarmUp()), AssemblyHelpers::Address(GPRInfo::regT0, CodeBlock::offsetOfJITExecuteCounter()));
doneAdjusting.link(&m_jit);
......
......@@ -554,13 +554,13 @@ void OSRExitCompiler::compileExit(const OSRExit& exit, SpeculationRecovery* reco
AssemblyHelpers::Jump lowFailRate = m_jit.branch32(AssemblyHelpers::BelowOrEqual, GPRInfo::regT2, GPRInfo::regT1);
// Reoptimize as soon as possible.
m_jit.store32(AssemblyHelpers::Imm32(Options::executionCounterValueForOptimizeNextInvocation), AssemblyHelpers::Address(GPRInfo::regT0, CodeBlock::offsetOfExecuteCounter()));
m_jit.store32(AssemblyHelpers::Imm32(Options::executionCounterValueForOptimizeNextInvocation), AssemblyHelpers::Address(GPRInfo::regT0, CodeBlock::offsetOfJITExecuteCounter()));
AssemblyHelpers::Jump doneAdjusting = m_jit.jump();
fewFails.link(&m_jit);
lowFailRate.link(&m_jit);
m_jit.store32(AssemblyHelpers::Imm32(m_jit.baselineCodeBlock()->counterValueForOptimizeAfterLongWarmUp()), AssemblyHelpers::Address(GPRInfo::regT0, CodeBlock::offsetOfExecuteCounter()));
m_jit.store32(AssemblyHelpers::Imm32(m_jit.baselineCodeBlock()->counterValueForOptimizeAfterLongWarmUp()), AssemblyHelpers::Address(GPRInfo::regT0, CodeBlock::offsetOfJITExecuteCounter()));
doneAdjusting.link(&m_jit);
......
......@@ -99,7 +99,7 @@ void JIT::emitOptimizationCheck(OptimizationCheckKind kind)
if (!shouldEmitProfiling())
return;
Jump skipOptimize = branchAdd32(Signed, TrustedImm32(kind == LoopOptimizationCheck ? Options::executionCounterIncrementForLoop : Options::executionCounterIncrementForReturn), AbsoluteAddress(m_codeBlock->addressOfExecuteCounter()));
Jump skipOptimize = branchAdd32(Signed, TrustedImm32(kind == LoopOptimizationCheck ? Options::executionCounterIncrementForLoop : Options::executionCounterIncrementForReturn), AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter()));
JITStubCall stubCall(this, kind == LoopOptimizationCheck ? cti_optimize_from_loop : cti_optimize_from_ret);
if (kind == LoopOptimizationCheck)
stubCall.addArgument(Imm32(m_bytecodeOffset));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment