- 17 Jan, 2019 1 commit
-
-
Andreas Haas authored
At the moment, the whole WebAssembly compilation may run in a single background task. On a low-end device, this can mean that the background thread is busy for seconds and thereby blocks other tasks, see e.g. https://crbug.com/914757. With this CL we re-schedule compilation tasks after every 50ms. These 50ms are an arbitrary number. I don't want to introduce too much overhead, but since this is in the background we also don't have to make tasks super short. Tasks which are going to compile with TurboFan will be posted with lower priority. This change requires changes in the CancelableTaskManager. At the moment it is not possible that a background task posts a new task which is managed by the same task manager as itself. The problem is about how to deal with another thread which calls CancelAndWait concurrently. At the moment, if a new task gets posted after the call to CancelAndWait, then `CHECK(!canceled_)` in CancelableTaskManager::Register will fail. If we used a lock to synchronize the calls to CancelAndWait and Register, then there would be a deadlock, where the thread which calls CancelAndWait waits for the task which wants to call Register, but at the same time blocks that task by holding the lock. With the change here, posting a task after the call to CancelAndWait will just immediately cancel the new task. This matches the behavior you would get if CancelAndWait is called right after calling Register. Bug: chromium:914757 Change-Id: I6d57aba161db8a915ec0d745658e0c28d25219a8 Reviewed-on: https://chromium-review.googlesource.com/c/1411884 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#58898}
-
- 09 Nov, 2018 3 commits
-
-
Clemens Hammacher authored
This is a reland of 61d42c94. Switched to acquire/release memory order. Original change's description: > Use std::atomic in Cancelable > > Avoid deprecated base::AtomicValue, use std::atomic instead. > Plus minor drive-by cleanups. > > R=mstarzinger@chromium.org > > Bug: v8:8238 > Change-Id: I47a1f00e26a843b60380c50399eedc49d859830a > Reviewed-on: https://chromium-review.googlesource.com/c/1326463 > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57386} Bug: v8:8238 Change-Id: I992a49d29af68cfa45bfae1bfb8dba5b47f94b25 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/1329164 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#57394}
-
Clemens Hammacher authored
This reverts commit 61d42c94. Reason for revert: TSan failures: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20TSAN/23459 Original change's description: > Use std::atomic in Cancelable > > Avoid deprecated base::AtomicValue, use std::atomic instead. > Plus minor drive-by cleanups. > > R=mstarzinger@chromium.org > > Bug: v8:8238 > Change-Id: I47a1f00e26a843b60380c50399eedc49d859830a > Reviewed-on: https://chromium-review.googlesource.com/c/1326463 > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57386} TBR=ulan@chromium.org,mstarzinger@chromium.org,clemensh@chromium.org Change-Id: I96f269800eb9c26812050629f7f2c75096f3c858 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8238 Reviewed-on: https://chromium-review.googlesource.com/c/1329201Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57387}
-
Clemens Hammacher authored
Avoid deprecated base::AtomicValue, use std::atomic instead. Plus minor drive-by cleanups. R=mstarzinger@chromium.org Bug: v8:8238 Change-Id: I47a1f00e26a843b60380c50399eedc49d859830a Reviewed-on: https://chromium-review.googlesource.com/c/1326463 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#57386}
-
- 08 Nov, 2018 1 commit
-
-
Clemens Hammacher authored
It's too easy to implicitly cast it to bool, as we did in several tests. Also, move TryAbortResult out of CancelableTaskManager to avoid too much typing when referencing one of the enum values. R=mstarzinger@chromium.org Bug: v8:8238 Change-Id: Ia3fa8597428876217bc86f9b8b31c21ae4846fa1 Reviewed-on: https://chromium-review.googlesource.com/c/1326027 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#57363}
-
- 12 Oct, 2018 1 commit
-
-
Clemens Hammacher authored
LockGuard is mostly used with Mutex. Since both are defined outside the internal namespace, we often have to write {base::LockGuard<base::Mutex>}. This CL shortens this to {base::MutexGuard} across the code base R=mlippautz@chromium.org Bug: v8:8238 Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I020d5933b73aafb98c4b72e3bb2dfd07c979ba73 Reviewed-on: https://chromium-review.googlesource.com/c/1278796Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56612}
-
- 19 Mar, 2018 1 commit
-
-
Kim-Anh Tran authored
The compilation state of a native module is now extracted into its own datastructure. It reflects which functions are left to compile, and contains task managers to accomplish parallel and asynchronous compilation. Bug: Change-Id: I45308c7b32ba78e6c83f2d260990846a653bbd9c Reviewed-on: https://chromium-review.googlesource.com/958865 Commit-Queue: Kim-Anh Tran <kimanh@google.com> Reviewed-by: Ben Titzer <titzer@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#52013}
-
- 02 Aug, 2017 1 commit
-
-
Michael Lippautz authored
They were only limited to 32 bit when using the internal Hashmap. Since this has changed alreay some time ago, we can switch to 64 bit ids and check that we never overflow. Bug: Change-Id: Ia6c6d02d6b5e555c6941185a79427dc4aa2a1d62 Reviewed-on: https://chromium-review.googlesource.com/598229 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#47085}
-
- 26 May, 2017 1 commit
-
-
Andreas Haas authored
This CL removes the isolate_ property from the Cancelable class. The isolate is actually not used in the class itself, only in sub-classes which can store the isolate themselves. R=jochen@chromium.org, mlippautz@chromium.org Change-Id: If102fdea41b81fb3cb25782728f7fcbce9642815 Reviewed-on: https://chromium-review.googlesource.com/516704Reviewed-by: Jochen Eisinger <jochen@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#45535}
-
- 04 Jan, 2017 1 commit
-
-
jochen authored
BUG=v8:5215 R=marja@chromium.org,vogelheim@chromium.org Review-Url: https://codereview.chromium.org/2615603002 Cr-Commit-Position: refs/heads/master@{#42068}
-
- 03 Jan, 2017 3 commits
-
-
jochen authored
Original issue's description: > Use background tasks for the compiler dispatcher > > BUG=v8:5215 > R=marja@chromium.org,vogelheim@chromium.org > > Review-Url: https://codereview.chromium.org/2606263002 > Cr-Commit-Position: refs/heads/master@{#42035} > Committed: https://chromium.googlesource.com/v8/v8/+/7a1b3a7bebbef88e72c9f7747e1930f10ee10c80 BUG=v8:5215 TBR=marja@chromium.org,vogelheim@chromium.org,rmcilroy@chromium.org Review-Url: https://codereview.chromium.org/2613483002 Cr-Commit-Position: refs/heads/master@{#42040}
-
rmcilroy authored
Revert of Use background tasks for the compiler dispatcher (patchset #5 id:80001 of https://codereview.chromium.org/2606263002/ ) Reason for revert: Causes IgnitionCompilerDispatcherTest.FinishNowWithBackgroundTask to fail. https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20noi18n%20-%20debug/builds/11209 Original issue's description: > Use background tasks for the compiler dispatcher > > BUG=v8:5215 > R=marja@chromium.org,vogelheim@chromium.org > > Review-Url: https://codereview.chromium.org/2606263002 > Cr-Commit-Position: refs/heads/master@{#42035} > Committed: https://chromium.googlesource.com/v8/v8/+/7a1b3a7bebbef88e72c9f7747e1930f10ee10c80 TBR=marja@chromium.org,vogelheim@chromium.org,jochen@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5215 Review-Url: https://codereview.chromium.org/2614433002 Cr-Commit-Position: refs/heads/master@{#42037}
-
jochen authored
BUG=v8:5215 R=marja@chromium.org,vogelheim@chromium.org Review-Url: https://codereview.chromium.org/2606263002 Cr-Commit-Position: refs/heads/master@{#42035}
-
- 11 Nov, 2016 1 commit
-
-
ulan authored
BUG=v8:5614 Review-Url: https://codereview.chromium.org/2496913002 Cr-Commit-Position: refs/heads/master@{#40931}
-
- 27 Oct, 2016 1 commit
-
-
ulan authored
This reverts commit 35e4a03f. BUG= Review-Url: https://codereview.chromium.org/2454723002 Cr-Commit-Position: refs/heads/master@{#40614}
-
- 14 Oct, 2016 1 commit
-
-
ulan authored
BUG=chromium:654343 Review-Url: https://codereview.chromium.org/2419783004 Cr-Commit-Position: refs/heads/master@{#40305}
-
- 13 Oct, 2016 2 commits
-
-
ulan authored
Revert of [heap] Cancel tasks before tearing down the heap. (patchset #2 id:20001 of https://codereview.chromium.org/2413203004/ ) Reason for revert: Timeout on gc stress bot. Original issue's description: > [heap] Cancel tasks before tearing down the heap. > > BUG=chromium:654343 > > Committed: https://crrev.com/9365463d6f1fc11b2369fff63ca0ac825c61eae4 > Cr-Commit-Position: refs/heads/master@{#40272} TBR=mlippautz@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:654343 Review-Url: https://codereview.chromium.org/2414073002 Cr-Commit-Position: refs/heads/master@{#40279}
-
ulan authored
BUG=chromium:654343 Review-Url: https://codereview.chromium.org/2413203004 Cr-Commit-Position: refs/heads/master@{#40272}
-
- 10 May, 2016 1 commit
-
-
ulan authored
BUG= Review-Url: https://codereview.chromium.org/1963853004 Cr-Commit-Position: refs/heads/master@{#36142}
-
- 19 Nov, 2015 1 commit
-
-
mlippautz authored
Since {CancelAndWait} blocks on the tasks that are still present in the internal hashmap, we are not allowed to remove the task upon trying to cancel it using {TryAbort}. The previous implementation suffered from a bug where: 1) The task was created and handed over to the platform. 2) The task was started by the platform, setting it to running state. 3) We called {TryAbort}, effectively removing it from the manager, but failing to cancel (as it was already running) 4) All tasks finished running, indicating this with their own semaphore. 5) The platform was stuck (scheduling) before destroying the task. 6) Main thread finished its work, waiting for all the necessary tasks, and the isolate terminated. 7) The platform destroyed the task, calling the destructor, calling into an already freed isolate. BUG=chromium:524425 LOG=N Review URL: https://codereview.chromium.org/1460763004 Cr-Commit-Position: refs/heads/master@{#32118}
-
- 14 Nov, 2015 1 commit
-
-
mlippautz authored
This change binds each {Cancelable} task to a so-called {CancelableTaskManager}, which is then used to handle concurrent cancelation as well as synchronizing shutdown for already running tasks. Since ownership of tasks is transferred to the platform executing a task (destructor), handling in the manager uses integer ids. Note that this also mitigates (modulo integer size) the ABA problem. All handling of {Cancelable} tasks is now encapsulated into the corresponding manager, which is instantiated for each isolate. R=hpayer@chromium.org BUG=chromium:524425 LOG=N CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_arm64_gc_stress_dbg;tryserver.v8:v8_linux_gc_stress_dbg;tryserver.v8:v8_mac_gc_stress_dbg;tryserver.v8:v8_linux64_msan_rel;tryserver.v8:v8_linux64_tsan_rel;tryserver.v8:v8_mac64_asan_rel Review URL: https://codereview.chromium.org/1409993012 Cr-Commit-Position: refs/heads/master@{#31997}
-
- 01 Sep, 2015 1 commit
-
-
mstarzinger authored
This CL us a pure refactoring that makes an empty compilation unit including just "isolate.h" or "contexts.h" but not "objects-inl.h" compile without warnings or errors. This is needed to further reduce the header dependency tangle. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1322883002 Cr-Commit-Position: refs/heads/master@{#30500}
-
- 20 Aug, 2015 1 commit
-
-
mstarzinger authored
R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1285183010 Cr-Commit-Position: refs/heads/master@{#30263}
-
- 30 Jul, 2015 1 commit
-
-
ulan authored
BUG=chromium:490559 LOG=NO Review URL: https://codereview.chromium.org/1258923010 Cr-Commit-Position: refs/heads/master@{#29935}
-
- 20 Jul, 2015 1 commit
-
-
epertoso authored
R=jochen@chromium.org BUG=511204 LOG=y Review URL: https://codereview.chromium.org/1246603002 Cr-Commit-Position: refs/heads/master@{#29759}
-