Reviewers: jarin,
Description:
Use acquire/release stores and loads when reading and writing the parallel
sweeping state of a page.
BUG=
Please review this at https://codereview.chromium.org/214543008/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+6, -6 lines):
M src/spaces.h
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index
05254d02437930ec745e548abff7415548b299bc..908e723827586d8af2bcfb3d798def1defab4539
100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -484,18 +484,18 @@ class MemoryChunk {
ParallelSweepingState parallel_sweeping() {
return static_cast<ParallelSweepingState>(
- NoBarrier_Load(¶llel_sweeping_));
+ Acquire_Load(¶llel_sweeping_));
}
void set_parallel_sweeping(ParallelSweepingState state) {
- NoBarrier_Store(¶llel_sweeping_, state);
+ Release_Store(¶llel_sweeping_, state);
}
bool TryParallelSweeping() {
- return NoBarrier_CompareAndSwap(¶llel_sweeping_,
- PARALLEL_SWEEPING_PENDING,
- PARALLEL_SWEEPING_IN_PROGRESS) ==
- PARALLEL_SWEEPING_PENDING;
+ return Acquire_CompareAndSwap(¶llel_sweeping_,
+ PARALLEL_SWEEPING_PENDING,
+ PARALLEL_SWEEPING_IN_PROGRESS) ==
+ PARALLEL_SWEEPING_PENDING;
}
// Manage live byte count (count of bytes known to be live,
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.