Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index e96044532115b42e71c674384537a634f0eb377e..dc03367259a49502d57c7f17045d99d1635a6dc1 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -13,6 +13,7 @@ |
#include "src/bootstrapper.h" |
#include "src/codegen.h" |
#include "src/compilation-cache.h" |
+#include "src/compiler/pipeline.h" |
#include "src/cpu-profiler.h" |
#include "src/debug.h" |
#include "src/deoptimizer.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,12 @@ void Isolate::Deinit() { |
delete runtime_profiler_; |
runtime_profiler_ = NULL; |
} |
+ |
+ if (basic_block_profiler_ != NULL) { |
+ delete basic_block_profiler_; |
+ basic_block_profiler_ = NULL; |
+ } |
+ |
heap_.TearDown(); |
logger_->TearDown(); |
@@ -2363,6 +2371,14 @@ void Isolate::CountUsage(v8::Isolate::UseCounterFeature feature) { |
} |
+compiler::BasicBlockProfiler* Isolate::GetBasicBlockProfiler() { |
+ if (basic_block_profiler_ == NULL) { |
+ basic_block_profiler_ = new compiler::BasicBlockProfiler(); |
+ } |
+ return basic_block_profiler_; |
+} |
+ |
+ |
bool StackLimitCheck::JsHasOverflowed() const { |
StackGuard* stack_guard = isolate_->stack_guard(); |
#ifdef USE_SIMULATOR |