Changeset 277370 in webkit
- Timestamp:
- May 12, 2021, 8:48:26 AM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 9 edited
-
ChangeLog (modified) (1 diff)
-
jit/JIT.cpp (modified) (2 diffs)
-
jit/JIT.h (modified) (1 diff)
-
jit/JITCall.cpp (modified) (4 diffs)
-
jit/JITCall32_64.cpp (modified) (4 diffs)
-
jit/JITInlines.h (modified) (1 diff)
-
jit/JITOperations.cpp (modified) (1 diff)
-
jit/SlowPathCall.h (modified) (2 diffs)
-
runtime/ScriptExecutable.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r277346 r277370 1 2021-05-12 Mark Lam <mark.lam@apple.com> 2 3 Remove dead code around ENABLE(OPCODE_SAMPLING) and ENABLE(CODEBLOCK_SAMPLING). 4 https://bugs.webkit.org/show_bug.cgi?id=225699 5 6 Reviewed by Tadeu Zagallo. 7 8 This code revolves around an Interpreter::sampler() method which returns a 9 SamplingTool*. Neither the Interpreter method nor the SamplingTool class exists 10 anymore. 11 12 * jit/JIT.cpp: 13 (JSC::JIT::privateCompileMainPass): 14 (JSC::JIT::compileWithoutLinking): 15 * jit/JIT.h: 16 * jit/JITCall.cpp: 17 (JSC::JIT::compileCallEval): 18 (JSC::JIT::compileCallEvalSlowCase): 19 (JSC::JIT::compileOpCall): 20 (JSC::JIT::compileOpCallSlowCase): 21 * jit/JITCall32_64.cpp: 22 (JSC::JIT::compileCallEval): 23 (JSC::JIT::compileCallEvalSlowCase): 24 (JSC::JIT::compileOpCall): 25 (JSC::JIT::compileOpCallSlowCase): 26 * jit/JITInlines.h: 27 (JSC::JIT::sampleInstruction): Deleted. 28 (JSC::JIT::sampleCodeBlock): Deleted. 29 * jit/JITOperations.cpp: 30 * jit/SlowPathCall.h: 31 (JSC::JITSlowPathCall::call): 32 * runtime/ScriptExecutable.h: 33 (JSC::ScriptExecutable::finishCreation): Deleted. 34 1 35 2021-05-11 Geoffrey Garen <ggaren@apple.com> 2 36 -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r277312 r277370 252 252 253 253 m_pcToCodeOriginMapBuilder.appendItem(label(), CodeOrigin(m_bytecodeIndex)); 254 255 #if ENABLE(OPCODE_SAMPLING)256 if (m_bytecodeIndex > 0) // Avoid the overhead of sampling op_enter twice.257 sampleInstruction(currentInstruction);258 #endif259 254 260 255 m_labels[m_bytecodeIndex.offset()] = label(); … … 748 743 Label beginLabel(this); 749 744 750 sampleCodeBlock(m_codeBlock);751 #if ENABLE(OPCODE_SAMPLING)752 sampleInstruction(m_codeBlock->instructions().begin());753 #endif754 755 745 int frameTopOffset = stackPointerOffsetFor(m_codeBlock) * sizeof(Register); 756 746 unsigned maxFrameSize = -frameTopOffset; -
trunk/Source/JavaScriptCore/jit/JIT.h
r277312 r277370 938 938 #endif 939 939 940 #if ENABLE(OPCODE_SAMPLING)941 void sampleInstruction(const Instruction*, bool = false);942 #endif943 944 #if ENABLE(CODEBLOCK_SAMPLING)945 void sampleCodeBlock(CodeBlock*);946 #else947 void sampleCodeBlock(CodeBlock*) {}948 #endif949 950 940 #if ENABLE(DFG_JIT) 951 941 bool canBeOptimized() { return m_canBeOptimized; } -
trunk/Source/JavaScriptCore/jit/JITCall.cpp
r270711 r277370 139 139 addSlowCase(branchIfEmpty(regT0)); 140 140 141 sampleCodeBlock(m_codeBlock);142 143 141 emitPutCallResult(bytecode); 144 142 … … 163 161 checkStackPointerAlignment(); 164 162 165 sampleCodeBlock(m_codeBlock);166 167 163 emitPutCallResult(bytecode); 168 164 } … … 259 255 checkStackPointerAlignment(); 260 256 261 sampleCodeBlock(m_codeBlock);262 263 257 emitPutCallResult(bytecode); 264 258 } … … 289 283 checkStackPointerAlignment(); 290 284 291 sampleCodeBlock(m_codeBlock);292 293 285 auto bytecode = instruction->as<Op>(); 294 286 emitPutCallResult(bytecode); -
trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp
r270711 r277370 240 240 addSlowCase(branchIfEmpty(regT1)); 241 241 242 sampleCodeBlock(m_codeBlock);243 244 242 emitPutCallResult(bytecode); 245 243 … … 265 263 checkStackPointerAlignment(); 266 264 267 sampleCodeBlock(m_codeBlock);268 269 265 emitPutCallResult(bytecode); 270 266 } … … 334 330 checkStackPointerAlignment(); 335 331 336 sampleCodeBlock(m_codeBlock);337 332 emitPutCallResult(bytecode); 338 333 } … … 365 360 addPtr(TrustedImm32(stackPointerOffsetFor(m_codeBlock) * sizeof(Register)), callFrameRegister, stackPointerRegister); 366 361 checkStackPointerAlignment(); 367 368 sampleCodeBlock(m_codeBlock);369 362 370 363 auto bytecode = instruction->as<Op>(); -
trunk/Source/JavaScriptCore/jit/JITInlines.h
r277312 r277370 272 272 #endif 273 273 274 #if ENABLE(OPCODE_SAMPLING)275 #if CPU(X86_64)276 ALWAYS_INLINE void JIT::sampleInstruction(const Instruction* instruction, bool inHostFunction)277 {278 move(TrustedImmPtr(m_interpreter->sampler()->sampleSlot()), X86Registers::ecx);279 storePtr(TrustedImmPtr(m_interpreter->sampler()->encodeSample(instruction, inHostFunction)), X86Registers::ecx);280 }281 #else282 ALWAYS_INLINE void JIT::sampleInstruction(const Instruction* instruction, bool inHostFunction)283 {284 storePtr(TrustedImmPtr(m_interpreter->sampler()->encodeSample(instruction, inHostFunction)), m_interpreter->sampler()->sampleSlot());285 }286 #endif287 #endif288 289 #if ENABLE(CODEBLOCK_SAMPLING)290 #if CPU(X86_64)291 ALWAYS_INLINE void JIT::sampleCodeBlock(CodeBlock* codeBlock)292 {293 move(TrustedImmPtr(m_interpreter->sampler()->codeBlockSlot()), X86Registers::ecx);294 storePtr(TrustedImmPtr(codeBlock), X86Registers::ecx);295 }296 #else297 ALWAYS_INLINE void JIT::sampleCodeBlock(CodeBlock* codeBlock)298 {299 storePtr(TrustedImmPtr(codeBlock), m_interpreter->sampler()->codeBlockSlot());300 }301 #endif302 #endif303 304 274 ALWAYS_INLINE bool JIT::isOperandConstantChar(VirtualRegister src) 305 275 { -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r277068 r277370 91 91 // sometimes gives us a signed pointer, and sometimes does not. 92 92 #define OUR_RETURN_ADDRESS removeCodePtrTag(__builtin_return_address(0)) 93 #endif94 95 #if ENABLE(OPCODE_SAMPLING)96 #define CTI_SAMPLER vm.interpreter->sampler()97 #else98 #define CTI_SAMPLER 099 93 #endif 100 94 -
trunk/Source/JavaScriptCore/jit/SlowPathCall.h
r268077 r277370 45 45 JIT::Call call() 46 46 { 47 #if ENABLE(OPCODE_SAMPLING)48 if (m_jit->m_bytecodeOffset != std::numeric_limits<unsigned>::max())49 m_jit->sampleInstruction(&m_jit->m_codeBlock->instructions()[m_jit->m_bytecodeOffset], true);50 #endif51 47 m_jit->updateTopCallFrame(); 52 48 #if CPU(X86_64) && OS(WINDOWS) … … 67 63 static_assert(JIT::regT1 == GPRInfo::returnValueGPR2); 68 64 #endif 69 70 #if ENABLE(OPCODE_SAMPLING)71 if (m_jit->m_bytecodeOffset != std::numeric_limits<unsigned>::max())72 m_jit->sampleInstruction(&m_jit->m_codeBlock->instructions()[m_jit->m_bytecodeOffset], false);73 #endif74 65 75 66 m_jit->exceptionCheck(); -
trunk/Source/JavaScriptCore/runtime/ScriptExecutable.h
r273931 r277370 131 131 ScriptExecutable(Structure*, VM&, const SourceCode&, bool isInStrictContext, DerivedContextType, bool isInArrowFunctionContext, bool isInsideOrdinaryFunction, EvalContextType, Intrinsic); 132 132 133 void finishCreation(VM& vm)134 {135 Base::finishCreation(vm);136 137 #if ENABLE(CODEBLOCK_SAMPLING)138 if (SamplingTool* sampler = vm.interpreter->sampler())139 sampler->notifyOfScope(vm, this);140 #endif141 }142 143 133 void recordParse(CodeFeatures features, bool hasCapturedVariables) 144 134 {
Note:
See TracChangeset
for help on using the changeset viewer.