Changeset 254714 in webkit for trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
- Timestamp:
- Jan 16, 2020, 3:24:38 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r254687 r254714 3685 3685 sanitizeStackForVM(codeBlock->vm()); 3686 3686 3687 if (Options::verboseOSR()) 3688 dataLog(*codeBlock, ": Entered reoptimize\n"); 3687 dataLogLnIf(Options::verboseOSR(), *codeBlock, ": Entered reoptimize"); 3689 3688 // We must be called with the baseline code block. 3690 3689 ASSERT(JITCode::isBaselineCode(codeBlock->jitType())); … … 3697 3696 CodeBlock* replacement = codeBlock->replacement(); 3698 3697 if (!replacement || replacement == codeBlock) { 3699 if (Options::verboseOSR()) 3700 dataLog(*codeBlock, ": Not reoptimizing because we've already been jettisoned.\n"); 3698 dataLogLnIf(Options::verboseOSR(), *codeBlock, ": Not reoptimizing because we've already been jettisoned."); 3701 3699 return; 3702 3700 } … … 3724 3722 3725 3723 if (!didExitABunch && !didGetStuckInLoop) { 3726 if (Options::verboseOSR()) 3727 dataLog(*codeBlock, ": Not reoptimizing ", *optimizedCodeBlock, " because it either didn't exit enough or didn't loop enough after exit.\n"); 3724 dataLogLnIf(Options::verboseOSR(), *codeBlock, ": Not reoptimizing ", *optimizedCodeBlock, " because it either didn't exit enough or didn't loop enough after exit."); 3728 3725 codeBlock->optimizeAfterLongWarmUp(); 3729 3726 return; … … 3743 3740 if (codeBlock->baselineVersion()->m_didFailFTLCompilation) { 3744 3741 CODEBLOCK_LOG_EVENT(codeBlock, "abortFTLCompile", ()); 3745 if (Options::verboseOSR()) 3746 dataLog("Deferring FTL-optimization of ", *codeBlock, " indefinitely because there was an FTL failure.\n"); 3742 dataLogLnIf(Options::verboseOSR(), "Deferring FTL-optimization of ", *codeBlock, " indefinitely because there was an FTL failure."); 3747 3743 jitCode->dontOptimizeAnytimeSoon(codeBlock); 3748 3744 return false; … … 3752 3748 && !jitCode->checkIfOptimizationThresholdReached(codeBlock)) { 3753 3749 CODEBLOCK_LOG_EVENT(codeBlock, "delayFTLCompile", ("counter = ", jitCode->tierUpCounter)); 3754 if (Options::verboseOSR()) 3755 dataLog("Choosing not to FTL-optimize ", *codeBlock, " yet.\n"); 3750 dataLogLnIf(Options::verboseOSR(), "Choosing not to FTL-optimize ", *codeBlock, " yet."); 3756 3751 return false; 3757 3752 } … … 3795 3790 // This means that we finished compiling, but failed somehow; in that case the 3796 3791 // thresholds will be set appropriately. 3797 if (Options::verboseOSR()) 3798 dataLog("Code block ", *codeBlock, " was compiled but it doesn't have an optimized replacement.\n"); 3792 dataLogLnIf(Options::verboseOSR(), "Code block ", *codeBlock, " was compiled but it doesn't have an optimized replacement."); 3799 3793 return; 3800 3794 } … … 3828 3822 JITCode* jitCode = codeBlock->jitCode()->dfg(); 3829 3823 3830 if (Options::verboseOSR()) { 3831 dataLog( 3832 *codeBlock, ": Entered triggerTierUpNow with executeCounter = ", 3833 jitCode->tierUpCounter, "\n"); 3834 } 3824 dataLogLnIf(Options::verboseOSR(), 3825 *codeBlock, ": Entered triggerTierUpNow with executeCounter = ", jitCode->tierUpCounter); 3835 3826 3836 3827 if (shouldTriggerFTLCompile(codeBlock, jitCode)) … … 3907 3898 unsigned streamIndex = iter->value; 3908 3899 if (CodeBlock* entryBlock = jitCode->osrEntryBlock()) { 3909 if (Options::verboseOSR()) 3910 dataLog("OSR entry: From ", RawPointer(jitCode), " got entry block ", RawPointer(entryBlock), "\n"); 3900 dataLogLnIf(Options::verboseOSR(), "OSR entry: From ", RawPointer(jitCode), " got entry block ", RawPointer(entryBlock)); 3911 3901 if (void* address = FTL::prepareOSREntry(vm, callFrame, codeBlock, entryBlock, originBytecodeIndex, streamIndex)) { 3912 3902 CODEBLOCK_LOG_EVENT(entryBlock, "osrEntry", ("at ", originBytecodeIndex)); … … 3920 3910 CODEBLOCK_LOG_EVENT(codeBlock, "delayFTLCompile", ("compiled and failed")); 3921 3911 // This means that compilation failed and we already set the thresholds. 3922 if (Options::verboseOSR()) 3923 dataLog("Code block ", *codeBlock, " was compiled but it doesn't have an optimized replacement.\n"); 3912 dataLogLnIf(Options::verboseOSR(), "Code block ", *codeBlock, " was compiled but it doesn't have an optimized replacement."); 3924 3913 return nullptr; 3925 3914 } … … 4006 3995 // This is where we ask the outer to loop to immediately compile itself if program 4007 3996 // control reaches it. 4008 if (Options::verboseOSR()) 4009 dataLog("Inner-loop ", originBytecodeIndex, " in ", *codeBlock, " setting parent loop ", osrEntryCandidate, "'s trigger and backing off.\n"); 3997 dataLogLnIf(Options::verboseOSR(), "Inner-loop ", originBytecodeIndex, " in ", *codeBlock, " setting parent loop ", osrEntryCandidate, "'s trigger and backing off."); 4010 3998 jitCode->tierUpEntryTriggers.set(osrEntryCandidate, JITCode::TriggerReason::StartCompilation); 4011 3999 return true; … … 4061 4049 // entry will succeed unless we ran out of stack. It's not clear what we should do. 4062 4050 // We signal to try again after a while if that happens. 4063 if (Options::verboseOSR()) 4064 dataLog("Immediate OSR entry: From ", RawPointer(jitCode), " got entry block ", RawPointer(jitCode->osrEntryBlock()), "\n"); 4051 dataLogLnIf(Options::verboseOSR(), "Immediate OSR entry: From ", RawPointer(jitCode), " got entry block ", RawPointer(jitCode->osrEntryBlock())); 4065 4052 4066 4053 void* address = FTL::prepareOSREntry(vm, callFrame, codeBlock, jitCode->osrEntryBlock(), originBytecodeIndex, streamIndex); … … 4082 4069 4083 4070 if (codeBlock->jitType() != JITType::DFGJIT) { 4084 dataLog ("Unexpected code block in DFG->FTL trigger tier up now in loop: ", *codeBlock, "\n");4071 dataLogLn("Unexpected code block in DFG->FTL trigger tier up now in loop: ", *codeBlock); 4085 4072 RELEASE_ASSERT_NOT_REACHED(); 4086 4073 } … … 4088 4075 JITCode* jitCode = codeBlock->jitCode()->dfg(); 4089 4076 4090 if (Options::verboseOSR()) { 4091 dataLog( 4092 *codeBlock, ": Entered triggerTierUpNowInLoop with executeCounter = ", 4093 jitCode->tierUpCounter, "\n"); 4094 } 4077 dataLogLnIf(Options::verboseOSR(), *codeBlock, ": Entered triggerTierUpNowInLoop with executeCounter = ", jitCode->tierUpCounter); 4095 4078 4096 4079 if (jitCode->tierUpInLoopHierarchy.contains(bytecodeIndex)) … … 4124 4107 JITCode* jitCode = codeBlock->jitCode()->dfg(); 4125 4108 4126 if (Options::verboseOSR()) { 4127 dataLog( 4128 *codeBlock, ": Entered triggerOSREntryNow with executeCounter = ", 4129 jitCode->tierUpCounter, "\n"); 4130 } 4109 dataLogLnIf(Options::verboseOSR(), *codeBlock, ": Entered triggerOSREntryNow with executeCounter = ", jitCode->tierUpCounter); 4131 4110 4132 4111 return tierUpCommon(vm, callFrame, bytecodeIndex, true);
Note:
See TracChangeset
for help on using the changeset viewer.