| Index: src/profiler/profile-generator.h
|
| diff --git a/src/profiler/profile-generator.h b/src/profiler/profile-generator.h
|
| index 079413a8cd59c184aff8636e177f3630d264f8f1..47a73f191a13ce8db0142c26bf9305f50e7b2c1b 100644
|
| --- a/src/profiler/profile-generator.h
|
| +++ b/src/profiler/profile-generator.h
|
| @@ -156,6 +156,7 @@ class ProfileNode {
|
| const std::vector<CpuProfileDeoptInfo>& deopt_infos() const {
|
| return deopt_infos_;
|
| }
|
| + Isolate* isolate() const;
|
|
|
| void Print(int indent);
|
|
|
| @@ -186,7 +187,7 @@ class ProfileNode {
|
|
|
| class ProfileTree {
|
| public:
|
| - ProfileTree();
|
| + explicit ProfileTree(Isolate* isolate);
|
| ~ProfileTree();
|
|
|
| ProfileNode* AddPathFromEnd(
|
| @@ -200,6 +201,8 @@ class ProfileTree {
|
| root_->Print(0);
|
| }
|
|
|
| + Isolate* isolate() const { return isolate_; }
|
| +
|
| private:
|
| template <typename Callback>
|
| void TraverseDepthFirst(Callback* callback);
|
| @@ -207,6 +210,7 @@ class ProfileTree {
|
| CodeEntry root_entry_;
|
| unsigned next_node_id_;
|
| ProfileNode* root_;
|
| + Isolate* isolate_;
|
|
|
| unsigned next_function_id_;
|
| HashMap function_ids_;
|
| @@ -217,7 +221,7 @@ class ProfileTree {
|
|
|
| class CpuProfile {
|
| public:
|
| - CpuProfile(const char* title, bool record_samples);
|
| + CpuProfile(Isolate* isolate, const char* title, bool record_samples);
|
|
|
| // Add pc -> ... -> main() call path to the profile.
|
| void AddPath(base::TimeTicks timestamp, const Vector<CodeEntry*>& path,
|
| @@ -339,6 +343,8 @@ class CpuProfilesCollection {
|
| List<CodeEntry*> code_entries_;
|
| List<CpuProfile*> finished_profiles_;
|
|
|
| + Isolate* isolate_;
|
| +
|
| // Accessed by VM thread and profile generator thread.
|
| List<CpuProfile*> current_profiles_;
|
| base::Semaphore current_profiles_semaphore_;
|
|
|