Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/profiler/heap-profiler.h

Issue 1474353002: Remove easy to remove calls to Isolate::Current() from api.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2009-2010 the V8 project authors. All rights reserved. 1 // Copyright 2009-2010 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PROFILER_HEAP_PROFILER_H_ 5 #ifndef V8_PROFILER_HEAP_PROFILER_H_
6 #define V8_PROFILER_HEAP_PROFILER_H_ 6 #define V8_PROFILER_HEAP_PROFILER_H_
7 7
8 #include "src/base/smart-pointers.h" 8 #include "src/base/smart-pointers.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/list.h" 10 #include "src/list.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); 59 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
60 60
61 bool is_tracking_object_moves() const { return is_tracking_object_moves_; } 61 bool is_tracking_object_moves() const { return is_tracking_object_moves_; }
62 bool is_tracking_allocations() const { 62 bool is_tracking_allocations() const {
63 return !allocation_tracker_.is_empty(); 63 return !allocation_tracker_.is_empty();
64 } 64 }
65 65
66 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); 66 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id);
67 void ClearHeapObjectMap(); 67 void ClearHeapObjectMap();
68 68
69 Isolate* isolate() const { return heap()->isolate(); }
70
69 private: 71 private:
70 Heap* heap() const; 72 Heap* heap() const;
71 73
72 // Mapping from HeapObject addresses to objects' uids. 74 // Mapping from HeapObject addresses to objects' uids.
73 base::SmartPointer<HeapObjectsMap> ids_; 75 base::SmartPointer<HeapObjectsMap> ids_;
74 List<HeapSnapshot*> snapshots_; 76 List<HeapSnapshot*> snapshots_;
75 base::SmartPointer<StringsStorage> names_; 77 base::SmartPointer<StringsStorage> names_;
76 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; 78 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_;
77 base::SmartPointer<AllocationTracker> allocation_tracker_; 79 base::SmartPointer<AllocationTracker> allocation_tracker_;
78 bool is_tracking_object_moves_; 80 bool is_tracking_object_moves_;
79 base::Mutex profiler_mutex_; 81 base::Mutex profiler_mutex_;
80 }; 82 };
81 83
82 } // namespace internal 84 } // namespace internal
83 } // namespace v8 85 } // namespace v8
84 86
85 #endif // V8_PROFILER_HEAP_PROFILER_H_ 87 #endif // V8_PROFILER_HEAP_PROFILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698