Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Issue 2995803002: [vm] Implement more efficient CAS in simarm/simarm64 modes (Closed)

Created:
3 years, 4 months ago by alexmarkov
Modified:
3 years, 4 months ago
Reviewers:
zra, rmacnak, siva
CC:
reviews_dartlang.org, zra, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

[vm] Implement more efficient CAS in simarm/simarm64 modes When running on the simulator for arm/arm64, compare-and-swap operations used in VM were synchronized with simulator using mutex. It heavily impacts performance when doing parallel marking due to high contention (see #30317). This synchronization was implemented in order to make simulated LDREX/STREX instructions aware of CAS performed in VM. This CL drops this synchronization between VM and simulator: CAS operations in VM become regular, and simulator remembers value loaded with load-exclusive and performs CAS when doing store-exclusive to catch any concurrent modifications. Speeds up gen_snapshot of flutter benchmark complex_layout from 9.2s to 8.0s on my MacBook. R=asiva@google.com, rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/db26c8934799de6205b1c9c9dc498d8fc58a0d07

Patch Set 1 #

Patch Set 2 : Relax assertions for unit test which does clrex between ldrex and strex #

Total comments: 5

Patch Set 3 : Correct comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -334 lines) Patch
M runtime/vm/atomic.h View 1 2 3 chunks +0 lines, -25 lines 0 comments Download
M runtime/vm/atomic_android.h View 2 chunks +0 lines, -2 lines 0 comments Download
M runtime/vm/atomic_fuchsia.h View 2 chunks +0 lines, -2 lines 0 comments Download
M runtime/vm/atomic_linux.h View 2 chunks +0 lines, -2 lines 0 comments Download
M runtime/vm/atomic_macos.h View 2 chunks +0 lines, -2 lines 0 comments Download
D runtime/vm/atomic_simulator.h View 1 chunk +0 lines, -31 lines 0 comments Download
M runtime/vm/simulator_arm.h View 1 2 2 chunks +7 lines, -34 lines 0 comments Download
M runtime/vm/simulator_arm.cc View 1 3 chunks +18 lines, -92 lines 0 comments Download
M runtime/vm/simulator_arm64.h View 1 2 3 chunks +7 lines, -34 lines 0 comments Download
M runtime/vm/simulator_arm64.cc View 1 3 chunks +33 lines, -109 lines 0 comments Download
M runtime/vm/vm_sources.gypi View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 8 (3 generated)
alexmarkov
3 years, 4 months ago (2017-08-11 23:36:08 UTC) #3
rmacnak
LGTM https://codereview.chromium.org/2995803002/diff/20001/runtime/vm/atomic.h File runtime/vm/atomic.h (right): https://codereview.chromium.org/2995803002/diff/20001/runtime/vm/atomic.h#newcode19 runtime/vm/atomic.h:19: // NOTE: Not to be used for any ...
3 years, 4 months ago (2017-08-11 23:44:46 UTC) #4
siva
lgtm https://codereview.chromium.org/2995803002/diff/20001/runtime/vm/simulator_arm.h File runtime/vm/simulator_arm.h (right): https://codereview.chromium.org/2995803002/diff/20001/runtime/vm/simulator_arm.h#newcode215 runtime/vm/simulator_arm.h:215: // changes. On 2017/08/11 23:44:46, rmacnak wrote: > ...
3 years, 4 months ago (2017-08-11 23:58:44 UTC) #5
alexmarkov
https://codereview.chromium.org/2995803002/diff/20001/runtime/vm/atomic.h File runtime/vm/atomic.h (right): https://codereview.chromium.org/2995803002/diff/20001/runtime/vm/atomic.h#newcode19 runtime/vm/atomic.h:19: // NOTE: Not to be used for any atomic ...
3 years, 4 months ago (2017-08-12 00:34:55 UTC) #6
alexmarkov
3 years, 4 months ago (2017-08-12 00:36:16 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
db26c8934799de6205b1c9c9dc498d8fc58a0d07 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698