diff options
Diffstat (limited to 'deps/v8/src/basic-block-profiler.h')
-rw-r--r-- | deps/v8/src/basic-block-profiler.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/deps/v8/src/basic-block-profiler.h b/deps/v8/src/basic-block-profiler.h index c3c8b649dcc..975840e46e5 100644 --- a/deps/v8/src/basic-block-profiler.h +++ b/deps/v8/src/basic-block-profiler.h @@ -11,6 +11,7 @@ #include <vector> #include "src/base/macros.h" +#include "src/base/platform/mutex.h" #include "src/globals.h" namespace v8 { @@ -24,10 +25,10 @@ class BasicBlockProfiler { const uint32_t* counts() const { return &counts_[0]; } void SetCode(std::ostringstream* os); - void SetFunctionName(std::ostringstream* os); + void SetFunctionName(std::unique_ptr<char[]> name); void SetSchedule(std::ostringstream* os); - void SetBlockId(size_t offset, size_t block_id); - uint32_t* GetCounterAddress(size_t offset); + void SetBlockRpoNumber(size_t offset, int32_t block_rpo); + intptr_t GetCounterAddress(size_t offset); private: friend class BasicBlockProfiler; @@ -40,7 +41,7 @@ class BasicBlockProfiler { void ResetCounts(); const size_t n_blocks_; - std::vector<size_t> block_ids_; + std::vector<int32_t> block_rpo_numbers_; std::vector<uint32_t> counts_; std::string function_name_; std::string schedule_; @@ -53,6 +54,7 @@ class BasicBlockProfiler { BasicBlockProfiler(); ~BasicBlockProfiler(); + V8_EXPORT_PRIVATE static BasicBlockProfiler* Get(); Data* NewData(size_t n_blocks); void ResetCounts(); @@ -63,6 +65,7 @@ class BasicBlockProfiler { std::ostream& os, const BasicBlockProfiler& s); DataList data_list_; + base::Mutex data_list_mutex_; DISALLOW_COPY_AND_ASSIGN(BasicBlockProfiler); }; |