| 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;
|
|
|