Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index c6a8b813beb74dac3f34f4c4759060922f6b5ff8..edc832629104b122a1061ef1ab7d83866a03ebe4 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -10,6 +10,7 @@ |
#include "src/base/platform/platform.h" |
#include "src/base/sys-info.h" |
#include "src/base/utils/random-number-generator.h" |
+#include "src/basic-block-profiler.h" |
#include "src/bootstrapper.h" |
#include "src/codegen.h" |
#include "src/compilation-cache.h" |
@@ -1516,7 +1517,8 @@ Isolate::Isolate() |
num_sweeper_threads_(0), |
stress_deopt_count_(0), |
next_optimization_id_(0), |
- use_counter_callback_(NULL) { |
+ use_counter_callback_(NULL), |
+ basic_block_profiler_(NULL) { |
{ |
base::LockGuard<base::Mutex> lock_guard(thread_data_table_mutex_.Pointer()); |
CHECK(thread_data_table_); |
@@ -1640,6 +1642,10 @@ void Isolate::Deinit() { |
delete runtime_profiler_; |
runtime_profiler_ = NULL; |
} |
+ |
+ delete basic_block_profiler_; |
+ basic_block_profiler_ = NULL; |
+ |
heap_.TearDown(); |
logger_->TearDown(); |
@@ -2363,6 +2369,14 @@ void Isolate::CountUsage(v8::Isolate::UseCounterFeature feature) { |
} |
+BasicBlockProfiler* Isolate::GetOrCreateBasicBlockProfiler() { |
+ if (basic_block_profiler_ == NULL) { |
+ basic_block_profiler_ = new BasicBlockProfiler(); |
+ } |
+ return basic_block_profiler_; |
+} |
+ |
+ |
bool StackLimitCheck::JsHasOverflowed() const { |
StackGuard* stack_guard = isolate_->stack_guard(); |
#ifdef USE_SIMULATOR |