- 18 Jan, 2019 1 commit
-
-
Andreas Haas authored
TBR=clemensh@chromium.org No-Try: true No-Presubmit: true No-Treechecks: true Bug: v8:8562 Change-Id: Ic44219287a1cc1047460b4ba7b95b8fb6e6e4b9a Reviewed-on: https://chromium-review.googlesource.com/c/1420757 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#58914}
-
- 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}
-
- 12 Nov, 2018 1 commit
-
-
Clemens Hammacher authored
gcc 4.8 fails to compile an {std::atomic::compare_exchange_strong} with {memory_order_acq_rel} with this error: error: invalid failure memory model for ‘__atomic_compare_exchange’ This makes our gcov bot fail: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20gcov%20coverage/16053 According to the documentation, giving a single {memory_order_acq_rel} is equivalent to specifying {memory_order_acq_rel} as success memory order and {memory_order_acquire} for failure. This CL refactors the code to do this explicitly. R=ulan@chromium.org CC=machenbach@chromium.org Bug: v8:8238 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel Change-Id: Idcc69ee4b4ac53edc4fd1aa28eac7377f08044ce Reviewed-on: https://chromium-review.googlesource.com/c/1329693Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57426}
-
- 09 Nov, 2018 5 commits
-
-
Clemens Hammacher authored
Implement similar functionality in the unit test which used this field. One test gets slightly weaker by this. R=mstarzinger@chromium.org Bug: v8:8238 Change-Id: I0b047ff54f08a4549a2f78af30e21296bb1ee63f Reviewed-on: https://chromium-review.googlesource.com/c/1327042 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#57403}
-
Clemens Hammacher authored
This extracts the lambda tasks to an own compilation unit and header file. Additionally, it addresses the TODO to avoid templates and just store the function to execute in an std::function. Third, it provides the same functionality for pure (non-cancellable non-idle) tasks. Last, it removes the "Lambda" part from the methods, because we can actually instantiate it with anything that is invocable (function pointer, lambda, functor, ...). R=ahaas@chromium.org Bug: v8:8238 Change-Id: I2f613f5b15ee208f215bbf74bd6d1d41889fd637 Reviewed-on: https://chromium-review.googlesource.com/c/1328923 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#57397}
-
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
-
-
Ross McIlroy authored
The memory pressure notification logic wasn't correct and given the current users of the compiler dispatcher aren't posting speculative tasks, it isn't particularly useful. After removing this, the abort logic can also be simplified significantly by removing the non-blocking abort logic. BUG=v8:8041 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: I584533b58fb717fdca46cc620822914d6bdb28b8 Reviewed-on: https://chromium-review.googlesource.com/c/1278495Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#56609}
-
- 04 Oct, 2018 1 commit
-
-
Clemens Hammacher authored
Often, tasks just need to call a single API method. By implementing such tasks via a lambda, we save a lot of boilerplate. Additionally, since lambdas are defined inside other function bodies, they have access to private methods, which sometimes allows for better encapsulation. This CL introduces {CancelableLambdaTask} and {CancelableIdleLambdaTask} and uses them to replace some custom tasks. More can be refactored later. R=ahaas@chromium.org Bug: v8:8238 Change-Id: I88bd2c9bd57ebc32d082528f2e4251d741a0d021 Reviewed-on: https://chromium-review.googlesource.com/c/1256773 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56367}
-
- 12 Jul, 2018 1 commit
-
-
Hannes Payer authored
Bug: chromium:842083 Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I9a8d8327bfbab95cf9bdddb096804b65270cdfed Reviewed-on: https://chromium-review.googlesource.com/1127944 Commit-Queue: Hannes Payer <hpayer@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#54388}
-
- 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}
-
- 05 Jan, 2017 1 commit
-
-
jochen authored
BUG=v8:5215 R=marja@chromium.org,vogelheim@chromium.org Review-Url: https://codereview.chromium.org/2608163006 Cr-Commit-Position: refs/heads/master@{#42084}
-
- 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}
-
- 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}
-
- 17 Oct, 2016 1 commit
-
-
jochen authored
R=machenbach@chromium.org,titzer@chromium.org,bmeurer@chromium.org,jgruber@chromium.org BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg,v8_mac_dbg;master.tryserver.chromium.android:android_arm64_dbg_recipe Review-Url: https://codereview.chromium.org/2416243002 Cr-Commit-Position: refs/heads/master@{#40350}
-
- 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}
-
- 09 May, 2016 1 commit
-
-
lpy authored
atomic-utils.h only uses functionality from base/, and also by moving it into base/, code outside of v8_base can benefit from it. BUG=v8:4991 LOG=n Review-Url: https://codereview.chromium.org/1954603002 Cr-Commit-Position: refs/heads/master@{#36114}
-
- 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}
-
- 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}
-