Changeset 179931 in webkit
- Timestamp:
- Feb 11, 2015, 9:11:22 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/run-javascriptcore-tests (modified) (4 diffs)
-
Scripts/run-jsc-stress-tests (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r179930 r179931 1 2015-02-11 Csaba Osztrogonác <ossy@webkit.org> 2 3 run-jsc-stress tests should detect the number of processors on the remote machine too 4 https://bugs.webkit.org/show_bug.cgi?id=141196 5 6 Reviewed by Darin Adler. 7 8 * Scripts/run-javascriptcore-tests: 9 (runJSCStressTests): Pass through the --child-processes argument. 10 * Scripts/run-jsc-stress-tests: Added determineNumberOfProcessors function 11 to detect the number of local and remote processors with the same algorithm. 12 Additionally introduced $numChildProcesses to emphasize it isn't necessarily 13 same as $numProcessors. 14 1 15 2015-02-11 Csaba Osztrogonác <ossy@webkit.org> 2 16 -
trunk/Tools/Scripts/run-javascriptcore-tests
r179479 r179931 48 48 my $extraTests; 49 49 my $jsDriverArgs; 50 my $childProcesses; 50 51 51 52 my $buildJSC = 1; … … 81 82 --remote= Run the JSC stress tests on the specified remote host. Implies --tarball. 82 83 --extra-tests= Path to a file containing extra tests 84 --child-processes= Specify the number of child processes. 83 85 84 86 EOF … … 94 96 'tarball!' => \$createTarball, 95 97 'remote=s' => \$remoteHost, 98 'child-processes=s' => \$childProcesses, 96 99 'help' => \$showHelp 97 100 ); … … 277 280 push(@jscStressDriverCmd, "--remote"); 278 281 push(@jscStressDriverCmd, $remoteHost); 282 } 283 284 if ($childProcesses) { 285 push(@jscStressDriverCmd, "--child-processes"); 286 push(@jscStressDriverCmd, $childProcesses); 279 287 } 280 288 -
trunk/Tools/Scripts/run-jsc-stress-tests
r179930 r179931 88 88 end 89 89 90 begin91 $numProcessors = `sysctl -n hw.activecpu 2>/dev/null`.to_i92 rescue93 $numProcessors = 094 end95 96 if $numProcessors == 097 $numProcessors = `nproc --all 2>/dev/null`.to_i98 end99 if $numProcessors == 0100 $numProcessors = 1101 end102 103 if ENV["WEBKIT_TEST_CHILD_PROCESSES"]104 $numProcessors = ENV["WEBKIT_TEST_CHILD_PROCESSES"].to_i105 end106 90 107 91 $jscPath = nil … … 200 184 $remoteUser, $remoteHost, $remotePort = uri.user, uri.host, uri.port 201 185 when '--child-processes' 202 $num Processors = arg.to_i186 $numChildProcesses = arg.to_i 203 187 when '--arch' 204 188 $architecture = arg … … 543 527 $didAddRunCommand = true 544 528 plan = Plan.new($benchmarkDirectory, command, baseOutputName(kind), outputHandler, errorHandler) 545 if $num Processors > 1 and $runCommandOptions[:isSlow]529 if $numChildProcesses > 1 and $runCommandOptions[:isSlow] 546 530 $runlist.unshift plan 547 531 else … … 1250 1234 end 1251 1235 1252 if $enableFTL and ENV["JSC_timeout"]1253 # Currently, using the FTL is a performance regression particularly in real1254 # (i.e. non-loopy) benchmarks. Account for this in the timeout.1255 ENV["JSC_timeout"] = (ENV["JSC_timeout"].to_i * 2).to_s1256 end1257 1258 if ENV["JSC_timeout"]1259 # In the worst case, the processors just interfere with each other.1260 # Increase the timeout proportionally to the number of processors.1261 ENV["JSC_timeout"] = (ENV["JSC_timeout"].to_i.to_f * Math.sqrt($numProcessors)).to_i.to_s1262 end1263 1236 1264 1237 puts … … 1297 1270 raise "#{$?}" unless $?.success? 1298 1271 result 1272 end 1273 1274 def runCommandOnTester(cmd) 1275 if $remote 1276 result = sshRead(cmd) 1277 else 1278 result = `#{cmd}` 1279 end 1280 end 1281 1282 def numberOfProcessors 1283 begin 1284 numProcessors = runCommandOnTester("sysctl -n hw.activecpu 2>/dev/null").to_i 1285 rescue 1286 numProcessors = 0 1287 end 1288 1289 if numProcessors == 0 1290 begin 1291 numProcessors = runCommandOnTester("nproc --all 2>/dev/null").to_i 1292 rescue 1293 numProcessors == 0 1294 end 1295 end 1296 1297 if numProcessors == 0 1298 numProcessors = 1 1299 end 1300 return numProcessors 1299 1301 end 1300 1302 … … 1390 1392 raise if $remote 1391 1393 Dir.chdir($runnerDir) { 1392 runAndMonitorTestRunnerCommand("make", "-j", $num Processors.to_s, "-s", "-f", "Makefile")1394 runAndMonitorTestRunnerCommand("make", "-j", $numChildProcesses.to_s, "-s", "-f", "Makefile") 1393 1395 } 1394 1396 end … … 1434 1436 $outputDir = $outputDir.realpath 1435 1437 $runnerDir = $outputDir + ".runner" 1438 1439 if !$numChildProcesses 1440 if ENV["WEBKIT_TEST_CHILD_PROCESSES"] 1441 $numChildProcesses = ENV["WEBKIT_TEST_CHILD_PROCESSES"].to_i 1442 else 1443 $numChildProcesses = numberOfProcessors 1444 end 1445 end 1446 1447 if $enableFTL and ENV["JSC_timeout"] 1448 # Currently, using the FTL is a performance regression particularly in real 1449 # (i.e. non-loopy) benchmarks. Account for this in the timeout. 1450 ENV["JSC_timeout"] = (ENV["JSC_timeout"].to_i * 2).to_s 1451 end 1452 1453 if ENV["JSC_timeout"] 1454 # In the worst case, the processors just interfere with each other. 1455 # Increase the timeout proportionally to the number of processors. 1456 ENV["JSC_timeout"] = (ENV["JSC_timeout"].to_i.to_f * Math.sqrt($numChildProcesses)).to_i.to_s 1457 end 1436 1458 1437 1459 def runBundle
Note:
See TracChangeset
for help on using the changeset viewer.