Changeset 191602 in webkit
- Timestamp:
- Oct 26, 2015, 2:45:59 PM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/JavaScriptCore/ChangeLog ¶
r191594 r191602 1 2015-10-26 Mark Lam <mark.lam@apple.com> 2 3 Add logging to warn about under-estimated FTL inline cache sizes. 4 https://bugs.webkit.org/show_bug.cgi?id=150570 5 6 Reviewed by Geoffrey Garen. 7 8 Added 2 options: 9 1. JSC_dumpFailedICSizing - dumps an error message if the FTL encounters IC size 10 estimates that are less than the actual needed code size. 11 12 This option is useful for when we add a new IC and want to compute an 13 estimated size for the IC. To do this: 14 1. Build jsc for the target port with a very small IC size (enough to 15 store the jump instruction needed for the out of line fallback 16 implementation). 17 2. Implement a test suite with scenarios that exercise all the code paths in 18 the IC generator. 19 3. Run jsc with JSC_dumpFailedICSizing=true on the test suite. 20 4. The max value reported by the dumps will be the worst case size needed to 21 store the IC. We should use this value for our estimate. 22 5. Update the IC's estimated size and rebuild jsc. 23 6. Re-run (3) and confirm that there are no more error messages about the 24 IC sizing. 25 26 2. JSC_assertICSizing - same as JSC_dumpFailedICSizing except that it also 27 crashes the VM each time it encounters an inadequate IC size estimate. 28 29 This option is useful for regression testing to ensure that our estimates 30 do not regress. 31 32 * ftl/FTLCompile.cpp: 33 (JSC::FTL::generateInlineIfPossibleOutOfLineIfNot): 34 * runtime/Options.h: 35 1 36 2015-10-26 Saam barati <sbarati@apple.com> 2 37 -
TabularUnified trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp ¶
r191394 r191602 170 170 } 171 171 172 if (Options::assertICSizing() || Options::dumpFailedICSizing()) { 173 static size_t maxSize = 0; 174 if (maxSize < actualCodeSize) 175 maxSize = actualCodeSize; 176 dataLogF("ALERT: Under-estimated FTL Inline Cache Size for %s: estimated %zu, actual %zu, max %zu\n", codeDescription, sizeOfInlineCode, actualCodeSize, maxSize); 177 if (Options::assertICSizing()) 178 CRASH(); 179 } 180 172 181 // If there isn't enough space in the provided inline code area, allocate out of line 173 182 // executable memory to link the provided code. Place a jump at the beginning of the -
TabularUnified trunk/Source/JavaScriptCore/runtime/Options.h ¶
r191426 r191602 281 281 v(unsigned, reoptimizationRetryCounterMax, 0, nullptr) \ 282 282 \ 283 v(bool, assertICSizing, false, "crash if estimated IC sizes are inadequate") \ 284 v(bool, dumpFailedICSizing, false, "dumps a log entry if estimated IC sizes are inadequate") \ 285 \ 283 286 v(unsigned, minimumOptimizationDelay, 1, nullptr) \ 284 287 v(unsigned, maximumOptimizationDelay, 5, nullptr) \
Note:
See TracChangeset
for help on using the changeset viewer.