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

Unified Diff: src/heap.h

Issue 12832002: Parallel recompilation: fewer handle dereferences and tighter checks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/handles-inl.h ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 456e9d87a99871ade907de6656f8881d9f9792b5..b54b83a275cb64aed1b1b5f6c92f8f3e230832bb 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1822,14 +1822,27 @@ class Heap {
explicit RelocationLock(Heap* heap) : heap_(heap) {
if (FLAG_parallel_recompilation) {
heap_->relocation_mutex_->Lock();
+#ifdef DEBUG
+ heap_->relocation_mutex_locked_ = true;
+#endif // DEBUG
}
}
+
~RelocationLock() {
if (FLAG_parallel_recompilation) {
+#ifdef DEBUG
+ heap_->relocation_mutex_locked_ = false;
+#endif // DEBUG
heap_->relocation_mutex_->Unlock();
}
}
+#ifdef DEBUG
+ static bool IsLocked(Heap* heap) {
+ return heap->relocation_mutex_locked_;
+ }
+#endif // DEBUG
+
private:
Heap* heap_;
};
@@ -2304,6 +2317,9 @@ class Heap {
MemoryChunk* chunks_queued_for_free_;
Mutex* relocation_mutex_;
+#ifdef DEBUG
+ bool relocation_mutex_locked_;
+#endif // DEBUG;
friend class Factory;
friend class GCTracer;
« no previous file with comments | « src/handles-inl.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698