Reviewers: jarin,
Description:
Fix issues when changing FLAG_concurrent_recompilation after init.
[email protected]
BUG=356053
Please review this at https://codereview.chromium.org/210363005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+4, -13 lines):
M src/heap.h
M src/heap.cc
M src/runtime.cc
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index
e785629fa480423a04505eda1de855d2582696d2..870a04c19bc42150328269baeab72f634cff32a8
100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -154,7 +154,6 @@ Heap::Heap()
configured_(false),
external_string_table_(this),
chunks_queued_for_free_(NULL),
- relocation_mutex_(NULL),
gc_callbacks_depth_(0) {
// Allow build-time customization of the max semispace size. Building
// V8 with snapshots and a non-default max semispace size is much
@@ -6595,8 +6594,6 @@ bool Heap::SetUp() {
mark_compact_collector()->SetUp();
- if (FLAG_concurrent_recompilation) relocation_mutex_ = new Mutex;
-
return true;
}
@@ -6738,9 +6735,6 @@ void Heap::TearDown() {
incremental_marking()->TearDown();
isolate_->memory_allocator()->TearDown();
-
- delete relocation_mutex_;
- relocation_mutex_ = NULL;
}
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index
f6cd3ebe5454fc18245f6e34a07920d62fd908a6..931972baeb5ed0857770cb6d656ac1d0a92dd2a1
100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1906,16 +1906,12 @@ class Heap {
class RelocationLock {
public:
explicit RelocationLock(Heap* heap) : heap_(heap) {
- if (FLAG_concurrent_recompilation) {
- heap_->relocation_mutex_->Lock();
- }
+ heap_->relocation_mutex_.Lock();
}
~RelocationLock() {
- if (FLAG_concurrent_recompilation) {
- heap_->relocation_mutex_->Unlock();
- }
+ heap_->relocation_mutex_.Unlock();
}
private:
@@ -2518,7 +2514,7 @@ class Heap {
MemoryChunk* chunks_queued_for_free_;
- Mutex* relocation_mutex_;
+ Mutex relocation_mutex_;
int gc_callbacks_depth_;
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
8d98f272364b3d261d1b2e6ebc52e60d18f1bbd2..152baddefd42b1a66267eccabe1db543ff762358
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -8694,6 +8694,7 @@ RUNTIME_FUNCTION(MaybeObject*,
Runtime_GetOptimizationStatus) {
RUNTIME_FUNCTION(MaybeObject*, Runtime_UnblockConcurrentRecompilation) {
RUNTIME_ASSERT(FLAG_block_concurrent_recompilation);
+ RUNTIME_ASSERT(isolate->concurrent_recompilation_enabled());
isolate->optimizing_compiler_thread()->Unblock();
return isolate->heap()->undefined_value();
}
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.