summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2016-12-15 13:12:59 -0800
committerHans Boehm <hboehm@google.com>2017-01-04 15:18:22 -0800
commitb3da36c182329f228b8c78d306a57fa11a6004ea (patch)
tree707233fdaf345eb0b8068cfde5a1bff4e16aab53 /compiler/optimizing/graph_visualizer.cc
parent1e33d05866bd5f146e2341712a1c06037e9d07a2 (diff)
Reduce the number of fences needed for monitors
Add the necessary CasWeakAcquire primitives for LockWords. Have MonitorEnter initially read the lockword using a memory_order_relaxed operation. In the unlikely case we need more, compensate with an explicit fence. In the uncontended case, install the thin lock with Acquire, rather than SequentiallyConsistent semantics. Have MonitorExit use a Release instead of SequentiallyConsistent CAS in the ReadBarrier case. Add TODO for the other case. Together, these should usually eliminate 3 fences (or acq/rel) per critical section. Have Install() only use Release ordering. Add TODO for inflation spinning, which looks to me like it could be improved appreciably. Drive-by fix: GetMaxSpinsBeforeThinLockInflation spelling Test: Build for several targets, boot, m art-test-host art-test-target Change-Id: I2cab09723252065f6365e4234ee3249c69ece888
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions