Changeset 244811 in webkit for trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
- Timestamp:
- Apr 30, 2019, 4:37:27 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r244764 r244811 191 191 if (codeType() == FunctionCode) 192 192 out.print(specializationKind()); 193 out.print(", ", instruction Count());193 out.print(", ", instructionsSize()); 194 194 if (this->jitType() == JITType::BaselineJIT && m_shouldAlwaysBeInlined) 195 195 out.print(" (ShouldAlwaysBeInlined)"); … … 299 299 , m_steppingMode(SteppingModeDisabled) 300 300 , m_numBreakpoints(0) 301 , m_ instructionCount(other.m_instructionCount)301 , m_bytecodeCost(other.m_bytecodeCost) 302 302 , m_scopeRegister(other.m_scopeRegister) 303 303 , m_hash(other.m_hash) … … 525 525 for (const auto& instruction : instructionStream) { 526 526 OpcodeID opcodeID = instruction->opcodeID(); 527 m_ instructionCount += opcodeLengths[opcodeID];527 m_bytecodeCost += opcodeLengths[opcodeID]; 528 528 switch (opcodeID) { 529 529 LINK(OpHasIndexedProperty, arrayProfile) … … 2336 2336 const double d = 0.825914; 2337 2337 2338 double instructionCount = this->instructionCount();2339 2340 ASSERT( instructionCount); // Make sure this is called only after we have an instruction stream; otherwise it'll just return the value of d, which makes no sense.2341 2342 double result = d + a * sqrt( instructionCount + b) + c * instructionCount;2338 double bytecodeCost = this->bytecodeCost(); 2339 2340 ASSERT(bytecodeCost); // Make sure this is called only after we have an instruction stream; otherwise it'll just return the value of d, which makes no sense. 2341 2342 double result = d + a * sqrt(bytecodeCost + b) + c * bytecodeCost; 2343 2343 2344 2344 result *= codeTypeThresholdMultiplier(); … … 2346 2346 if (Options::verboseOSR()) { 2347 2347 dataLog( 2348 *this, ": instruction count is ", instructionCount,2348 *this, ": bytecode cost is ", bytecodeCost, 2349 2349 ", scaling execution counter by ", result, " * ", codeTypeThresholdMultiplier(), 2350 2350 "\n"); … … 2871 2871 return 0; 2872 2872 2873 double doubleResult = multiplier * instructionCount();2873 double doubleResult = multiplier * bytecodeCost(); 2874 2874 2875 2875 // Be even more paranoid: silently reject values that won't fit into a size_t. If
Note:
See TracChangeset
for help on using the changeset viewer.