Changeset 208925 in webkit
- Timestamp:
- Nov 19, 2016 9:39:25 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r208901 r208925 1 2016-11-19 Mark Lam <mark.lam@apple.com> 2 3 Add --timeoutMultiplier option to allow some tests more time to run. 4 https://bugs.webkit.org/show_bug.cgi?id=164951 5 6 Reviewed by Yusuke Suzuki. 7 8 Extended the timeout for these tests by 50% more because they run quite slow on 9 low-end machines. 10 11 * stress/op_div-ConstVar.js: 12 * stress/op_div-VarConst.js: 13 * stress/op_div-VarVar.js: 14 1 15 2016-11-18 Yusuke Suzuki <utatane.tea@gmail.com> 2 16 -
trunk/JSTests/stress/op_div-ConstVar.js
r206600 r208925 1 //@ runFTLNoCJIT 1 //@ runFTLNoCJIT("--timeoutMultiplier=1.5") 2 2 3 3 // If all goes well, this test module will terminate silently. If not, it will print -
trunk/JSTests/stress/op_div-VarConst.js
r206600 r208925 1 //@ runFTLNoCJIT 1 //@ runFTLNoCJIT("--timeoutMultiplier=1.5") 2 2 3 3 // If all goes well, this test module will terminate silently. If not, it will print -
trunk/JSTests/stress/op_div-VarVar.js
r206600 r208925 1 //@ runFTLNoCJIT 1 //@ runFTLNoCJIT("--timeoutMultiplier=1.5") 2 2 3 3 // If all goes well, this test module will terminate silently. If not, it will print -
trunk/Source/JavaScriptCore/ChangeLog
r208923 r208925 1 2016-11-19 Mark Lam <mark.lam@apple.com> 2 3 Add --timeoutMultiplier option to allow some tests more time to run. 4 https://bugs.webkit.org/show_bug.cgi?id=164951 5 6 Reviewed by Yusuke Suzuki. 7 8 * jsc.cpp: 9 (timeoutThreadMain): 10 - Modified to factor in a timeout multiplier that can adjust the timeout duration. 11 (startTimeoutThreadIfNeeded): 12 - Moved the code that starts the timeout thread here from main() so that we can 13 call it after command line args have been parsed instead. 14 (main): 15 - Deleted old timeout thread starting code. 16 (CommandLine::parseArguments): 17 - Added parsing of the --timeoutMultiplier option. 18 (jscmain): 19 - Start the timeout thread if needed after we've parsed the command line args. 20 1 21 2016-11-19 Mark Lam <mark.lam@apple.com> 2 22 -
trunk/Source/JavaScriptCore/jsc.cpp
r208782 r208925 2599 2599 2600 2600 static double s_desiredTimeout; 2601 static double s_timeoutMultiplier = 1.0; 2601 2602 2602 2603 static NO_RETURN_DUE_TO_CRASH void timeoutThreadMain(void*) 2603 2604 { 2604 auto timeout = std::chrono::microseconds(static_cast<std::chrono::microseconds::rep>(s_desiredTimeout * 1000000)); 2605 std::this_thread::sleep_for(timeout); 2606 2607 dataLog("Timed out after ", s_desiredTimeout, " seconds!\n"); 2605 Seconds timeoutDuration(s_desiredTimeout * s_timeoutMultiplier); 2606 sleep(timeoutDuration); 2607 dataLog("Timed out after ", timeoutDuration, " seconds!\n"); 2608 2608 CRASH(); 2609 } 2610 2611 static void startTimeoutThreadIfNeeded() 2612 { 2613 if (char* timeoutString = getenv("JSCTEST_timeout")) { 2614 if (sscanf(timeoutString, "%lf", &s_desiredTimeout) != 1) { 2615 dataLog("WARNING: timeout string is malformed, got ", timeoutString, 2616 " but expected a number. Not using a timeout.\n"); 2617 } else 2618 createThread(timeoutThreadMain, 0, "jsc Timeout Thread"); 2619 } 2609 2620 } 2610 2621 … … 2650 2661 // have a chance to parse options. 2651 2662 WTF::initializeThreading(); 2652 2653 if (char* timeoutString = getenv("JSCTEST_timeout")) {2654 if (sscanf(timeoutString, "%lf", &s_desiredTimeout) != 1) {2655 dataLog(2656 "WARNING: timeout string is malformed, got ", timeoutString,2657 " but expected a number. Not using a timeout.\n");2658 } else2659 createThread(timeoutThreadMain, 0, "jsc Timeout Thread");2660 }2661 2663 2662 2664 #if PLATFORM(IOS) … … 3011 3013 } 3012 3014 3015 static const char* timeoutMultiplierOptStr = "--timeoutMultiplier="; 3016 static const unsigned timeoutMultiplierOptStrLength = strlen(timeoutMultiplierOptStr); 3017 if (!strncmp(arg, timeoutMultiplierOptStr, timeoutMultiplierOptStrLength)) { 3018 const char* valueStr = &arg[timeoutMultiplierOptStrLength]; 3019 if (sscanf(valueStr, "%lf", &s_timeoutMultiplier) != 1) 3020 dataLog("WARNING: --timeoutMultiplier=", valueStr, " is invalid. Expects a numeric ratio.\n"); 3021 continue; 3022 } 3023 3013 3024 if (!strcmp(arg, "--test262-async")) { 3014 3025 test262AsyncTest = true; … … 3137 3148 WTF::initializeMainThread(); 3138 3149 JSC::initializeThreading(); 3150 startTimeoutThreadIfNeeded(); 3139 3151 3140 3152 VM* vm = &VM::create(LargeHeap).leakRef();
Note: See TracChangeset
for help on using the changeset viewer.