|
|
Created:
4 years ago by Clemens Hammacher Modified:
4 years ago CC:
v8-reviews_googlegroups.com Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[wasm] Make WasmRunner the central test structure
The WasmRunner now always holds a TestingModule, and allows to add
several functions to it. The prepares a change to always run wasm code
with a full module behind it, removing the special handling for "no wasm
instance" at runtime (http://crrev.com/2551053002).
This CL here also templatizes the WasmRunner such that the Call method must
be called with the same signature specified for the WasmRunner. This
already catched several mismatches there.
R=titzer@chromium.org, ahaas@chromium.org
BUG=v8:5620
Review-Url: https://codereview.chromium.org/2551043002
Cr-Original-Commit-Position: refs/heads/master@{#41728}
Committed: https://chromium.googlesource.com/v8/v8/+/2ff59062314e9b86bcc28dfaa53cedf2d98e3a13
Review-Url: https://codereview.chromium.org/2551043002
Cr-Commit-Position: refs/heads/master@{#41747}
Committed: https://chromium.googlesource.com/v8/v8/+/6709edd7f6347917300673733bda2447ef187c84
Patch Set 1 #Patch Set 2 : Fix simd lowering test #
Total comments: 6
Patch Set 3 : Address comments #Patch Set 4 : Rebase #Patch Set 5 : Fix gcc issue #
Total comments: 1
Patch Set 6 : Mark DoCall noinline #Patch Set 7 : Make return value volatile #Patch Set 8 : Avoid ternary operator #Patch Set 9 : Make DoCall return void #Patch Set 10 : Make DoCall return void - quickfix #Patch Set 11 : Make DoCall return void - quickfix #
Messages
Total messages: 66 (53 generated)
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_linux_dbg_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng/builds/17335) v8_linux_dbg_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng_triggered/b...)
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== [wasm] Make WasmRunner the central test structure The WasmRunner now always holds a TestingModule, and allows to add several functions to it. The prepares a change to always run wasm code with a full module behind it, removing the special handling for "no wasm instance" at runtime. This CL also templatizes the WasmRunner such that the Call method must be called with the same signature specified for the WasmRunner. This already catched several mismatches there. R=titzer@chromium.org BUG=v8:5620 ========== to ========== [wasm] Make WasmRunner the central test structure The WasmRunner now always holds a TestingModule, and allows to add several functions to it. The prepares a change to always run wasm code with a full module behind it, removing the special handling for "no wasm instance" at runtime (http://crrev.com/2551053002). This CL here also templatizes the WasmRunner such that the Call method must be called with the same signature specified for the WasmRunner. This already catched several mismatches there. R=titzer@chromium.org BUG=v8:5620 ==========
We indeed pay a bit for this in terms of compile time. This is the time for compiling all wasm object files in test/cctest (out/Test/obj/test/cctest/cctest/*wasm*): Before: ninja -C out/Test -j 1 71.35s user 3.55s system 100% cpu 1:14.28 total ninja -C out/Test -j 1 69.72s user 3.54s system 100% cpu 1:12.56 total ninja -C out/Test -j 1 70.33s user 3.22s system 101% cpu 1:12.77 total After: ninja -C out/Test -j 1 79.79s user 3.92s system 100% cpu 1:23.03 total ninja -C out/Test -j 1 76.72s user 3.46s system 100% cpu 1:19.45 total ninja -C out/Test -j 1 75.59s user 3.48s system 100% cpu 1:18.35 total
https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... File test/cctest/wasm/wasm-run-utils.h (right): https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... test/cctest/wasm/wasm-run-utils.h:352: std::array<MachineType, sizeof...(ParamTypes)> mach_types{ Can you factor this std::array creation into a method that just creates an array of machine types and passes that to a shared helper method (not templatized)? That should save a lot of space. https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... test/cctest/wasm/wasm-run-utils.h:549: class WasmRunner : public HandleAndZoneScope { Can you factor out a base class to avoid duplicating all of the code for each instantiation of this class? https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... test/cctest/wasm/wasm-run-utils.h:643: size_t return_count = ret_and_params[0] == MachineType::None() ? 0 : 1; Same here. Can you factor this out to be an entrypoint function that just creates the array of machine types and passes it to a shared helper routine?
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Woohoo, that changes brought down the avg. single-threaded compile time of wasm tests to 71.72 +- 0.9 seconds (cpu time; before this CL: 70.04 +- 1.52). Raw numbers: Before: ninja -C out/Test -j 1 72.21s user 3.82s system 100% cpu 1:15.34 total ninja -C out/Test -j 1 68.32s user 3.39s system 100% cpu 1:11.04 total ninja -C out/Test -j 1 69.50s user 3.71s system 100% cpu 1:12.51 total ninja -C out/Test -j 1 70.90s user 3.72s system 101% cpu 1:13.81 total ninja -C out/Test -j 1 69.27s user 3.37s system 100% cpu 1:11.95 total After: ninja -C out/Test -j 1 71.47s user 3.66s system 100% cpu 1:14.45 total ninja -C out/Test -j 1 71.95s user 3.59s system 101% cpu 1:14.78 total ninja -C out/Test -j 1 72.22s user 3.48s system 100% cpu 1:14.97 total ninja -C out/Test -j 1 72.63s user 3.63s system 100% cpu 1:15.55 total ninja -C out/Test -j 1 70.33s user 3.32s system 100% cpu 1:12.93 total https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... File test/cctest/wasm/wasm-run-utils.h (right): https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... test/cctest/wasm/wasm-run-utils.h:352: std::array<MachineType, sizeof...(ParamTypes)> mach_types{ On 2016/12/14 at 17:31:14, titzer wrote: > Can you factor this std::array creation into a method that just creates an array of machine types and passes that to a shared helper method (not templatized)? That should save a lot of space. Done. It turned out that also the ReturnType was only used in this Init function, so the whole WasmFunctionWrapper is un-templatized now, and there is only a very small templatized Init method. https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... test/cctest/wasm/wasm-run-utils.h:549: class WasmRunner : public HandleAndZoneScope { On 2016/12/14 at 17:31:14, titzer wrote: > Can you factor out a base class to avoid duplicating all of the code for each instantiation of this class? Done. https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... test/cctest/wasm/wasm-run-utils.h:643: size_t return_count = ret_and_params[0] == MachineType::None() ? 0 : 1; On 2016/12/14 at 17:31:14, titzer wrote: > Same here. Can you factor this out to be an entrypoint function that just creates the array of machine types and passes it to a shared helper routine? Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/12/14 20:41:38, Clemens Hammacher wrote: > Woohoo, that changes brought down the avg. single-threaded compile time of wasm > tests to 71.72 +- 0.9 seconds (cpu time; before this CL: 70.04 +- 1.52). > > Raw numbers: > Before: > ninja -C out/Test -j 1 72.21s user 3.82s system 100% cpu 1:15.34 total > ninja -C out/Test -j 1 68.32s user 3.39s system 100% cpu 1:11.04 total > ninja -C out/Test -j 1 69.50s user 3.71s system 100% cpu 1:12.51 total > ninja -C out/Test -j 1 70.90s user 3.72s system 101% cpu 1:13.81 total > ninja -C out/Test -j 1 69.27s user 3.37s system 100% cpu 1:11.95 total > > After: > ninja -C out/Test -j 1 71.47s user 3.66s system 100% cpu 1:14.45 total > ninja -C out/Test -j 1 71.95s user 3.59s system 101% cpu 1:14.78 total > ninja -C out/Test -j 1 72.22s user 3.48s system 100% cpu 1:14.97 total > ninja -C out/Test -j 1 72.63s user 3.63s system 100% cpu 1:15.55 total > ninja -C out/Test -j 1 70.33s user 3.32s system 100% cpu 1:12.93 total > > https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... > File test/cctest/wasm/wasm-run-utils.h (right): > > https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... > test/cctest/wasm/wasm-run-utils.h:352: std::array<MachineType, > sizeof...(ParamTypes)> mach_types{ > On 2016/12/14 at 17:31:14, titzer wrote: > > Can you factor this std::array creation into a method that just creates an > array of machine types and passes that to a shared helper method (not > templatized)? That should save a lot of space. > > Done. It turned out that also the ReturnType was only used in this Init > function, so the whole WasmFunctionWrapper is un-templatized now, and there is > only a very small templatized Init method. > > https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... > test/cctest/wasm/wasm-run-utils.h:549: class WasmRunner : public > HandleAndZoneScope { > On 2016/12/14 at 17:31:14, titzer wrote: > > Can you factor out a base class to avoid duplicating all of the code for each > instantiation of this class? > > Done. > > https://codereview.chromium.org/2551043002/diff/20001/test/cctest/wasm/wasm-r... > test/cctest/wasm/wasm-run-utils.h:643: size_t return_count = ret_and_params[0] > == MachineType::None() ? 0 : 1; > On 2016/12/14 at 17:31:14, titzer wrote: > > Same here. Can you factor this out to be an entrypoint function that just > creates the array of machine types and passes it to a shared helper routine? > > Done. LGTM, I really like this change now!
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/30671)
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [wasm] Make WasmRunner the central test structure The WasmRunner now always holds a TestingModule, and allows to add several functions to it. The prepares a change to always run wasm code with a full module behind it, removing the special handling for "no wasm instance" at runtime (http://crrev.com/2551053002). This CL here also templatizes the WasmRunner such that the Call method must be called with the same signature specified for the WasmRunner. This already catched several mismatches there. R=titzer@chromium.org BUG=v8:5620 ========== to ========== [wasm] Make WasmRunner the central test structure The WasmRunner now always holds a TestingModule, and allows to add several functions to it. The prepares a change to always run wasm code with a full module behind it, removing the special handling for "no wasm instance" at runtime (http://crrev.com/2551053002). This CL here also templatizes the WasmRunner such that the Call method must be called with the same signature specified for the WasmRunner. This already catched several mismatches there. R=titzer@chromium.org, ahaas@chromium.org BUG=v8:5620 ==========
clemensh@chromium.org changed reviewers: + ahaas@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_android_arm_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/...) v8_linux_gcc_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/bu...)
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
> LGTM, I really like this change now! Cool, me too :) +ahaas, since I needed to rebase on the setjmp/longjmp change, and changed that a bit now to avoid having templatized static fields. Andreas, PTAL at the related changed towards the end of wasm-run-utils.h.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm with nit https://codereview.chromium.org/2551043002/diff/80001/test/cctest/wasm/wasm-r... File test/cctest/wasm/wasm-run-utils.h (right): https://codereview.chromium.org/2551043002/diff/80001/test/cctest/wasm/wasm-r... test/cctest/wasm/wasm-run-utils.h:616: int idx = 0; I think it would be cleaner if you used FunctionSig::Builder here to build the function signature.
The CQ bit was checked by ahaas@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from titzer@chromium.org Link to the patchset: https://codereview.chromium.org/2551043002/#ps80001 (title: "Fix gcc issue")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 80001, "attempt_start_ts": 1481816139244740, "parent_rev": "c911517f0d763be4c556ebe8743382e363a0310d", "commit_rev": "2ff59062314e9b86bcc28dfaa53cedf2d98e3a13"}
Message was sent while issue was closed.
Description was changed from ========== [wasm] Make WasmRunner the central test structure The WasmRunner now always holds a TestingModule, and allows to add several functions to it. The prepares a change to always run wasm code with a full module behind it, removing the special handling for "no wasm instance" at runtime (http://crrev.com/2551053002). This CL here also templatizes the WasmRunner such that the Call method must be called with the same signature specified for the WasmRunner. This already catched several mismatches there. R=titzer@chromium.org, ahaas@chromium.org BUG=v8:5620 ========== to ========== [wasm] Make WasmRunner the central test structure The WasmRunner now always holds a TestingModule, and allows to add several functions to it. The prepares a change to always run wasm code with a full module behind it, removing the special handling for "no wasm instance" at runtime (http://crrev.com/2551053002). This CL here also templatizes the WasmRunner such that the Call method must be called with the same signature specified for the WasmRunner. This already catched several mismatches there. R=titzer@chromium.org, ahaas@chromium.org BUG=v8:5620 Review-Url: https://codereview.chromium.org/2551043002 Cr-Commit-Position: refs/heads/master@{#41728} Committed: https://chromium.googlesource.com/v8/v8/+/2ff59062314e9b86bcc28dfaa53cedf2d98... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/v8/v8/+/2ff59062314e9b86bcc28dfaa53cedf2d98...
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2583543002/ by clemensh@chromium.org. The reason for reverting is: Win64 dbg failures.
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_linux_mips64el_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mips64el_compile_r...)
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by clemensh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
The CQ bit was checked by clemensh@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from titzer@chromium.org Link to the patchset: https://codereview.chromium.org/2551043002/#ps200001 (title: "Make DoCall return void - quickfix")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 200001, "attempt_start_ts": 1481883072436270, "parent_rev": "4bd0cbdd5f9fe7fab8ddd4f39e1a14ba206d5248", "commit_rev": "6709edd7f6347917300673733bda2447ef187c84"}
Message was sent while issue was closed.
Description was changed from ========== [wasm] Make WasmRunner the central test structure The WasmRunner now always holds a TestingModule, and allows to add several functions to it. The prepares a change to always run wasm code with a full module behind it, removing the special handling for "no wasm instance" at runtime (http://crrev.com/2551053002). This CL here also templatizes the WasmRunner such that the Call method must be called with the same signature specified for the WasmRunner. This already catched several mismatches there. R=titzer@chromium.org, ahaas@chromium.org BUG=v8:5620 Review-Url: https://codereview.chromium.org/2551043002 Cr-Commit-Position: refs/heads/master@{#41728} Committed: https://chromium.googlesource.com/v8/v8/+/2ff59062314e9b86bcc28dfaa53cedf2d98... ========== to ========== [wasm] Make WasmRunner the central test structure The WasmRunner now always holds a TestingModule, and allows to add several functions to it. The prepares a change to always run wasm code with a full module behind it, removing the special handling for "no wasm instance" at runtime (http://crrev.com/2551053002). This CL here also templatizes the WasmRunner such that the Call method must be called with the same signature specified for the WasmRunner. This already catched several mismatches there. R=titzer@chromium.org, ahaas@chromium.org BUG=v8:5620 Review-Url: https://codereview.chromium.org/2551043002 Cr-Original-Commit-Position: refs/heads/master@{#41728} Committed: https://chromium.googlesource.com/v8/v8/+/2ff59062314e9b86bcc28dfaa53cedf2d98... Review-Url: https://codereview.chromium.org/2551043002 Cr-Commit-Position: refs/heads/master@{#41747} Committed: https://chromium.googlesource.com/v8/v8/+/6709edd7f6347917300673733bda2447ef1... ==========
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as https://chromium.googlesource.com/v8/v8/+/6709edd7f6347917300673733bda2447ef1... |