Commit 1408ec2
committed
Do not set setStatus and monitorRunDependencies for wasm tests
emscripten generates the following code,
```
if (Module["setStatus"]) {
Module["setStatus"]("Running...");
setTimeout(() => {
setTimeout(() => Module["setStatus"](""), 1);
doRun();
}, 1);
} else {
doRun();
}
```
And this code is ran in the first iteration of wasm benchmarks since it
includes setup code. This causes a problem since it has artificially
inserted setTimeout with 1ms.
1. It can insert 1ms wait time artificially. This is not so great since
it reduces CPU pstate randomly, causing weird perf cliff depending on
CPU's powner management instead of JS engine's quality.
2. The spec requires setTimeout to have some throttling mechanism. So we
can hit some artificial large delay more than 1ms based on how many
nestings we did before (https://webkit.org/blog/13083/speedometer-2-1/)
This patch removes setStatus and monitorRunDependencies so that we will not
use this `setTimeout` code path generated by emscripten. This is already done
for SpiderMonkey shell. So we expand it for the other engines as well.
Close #1181 parent 6a9c126 commit 1408ec2
1 file changed
Lines changed: 2 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1271 | 1271 | | |
1272 | 1272 | | |
1273 | 1273 | | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | | - | |
| 1274 | + | |
1282 | 1275 | | |
1283 | 1276 | | |
1284 | 1277 | | |
1285 | 1278 | | |
1286 | 1279 | | |
1287 | 1280 | | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | 1281 | | |
1297 | 1282 | | |
1298 | 1283 | | |
| |||
1413 | 1398 | | |
1414 | 1399 | | |
1415 | 1400 | | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
| 1401 | + | |
1424 | 1402 | | |
1425 | 1403 | | |
1426 | 1404 | | |
| |||
1451 | 1429 | | |
1452 | 1430 | | |
1453 | 1431 | | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | 1432 | | |
1458 | 1433 | | |
1459 | 1434 | | |
| |||
0 commit comments