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

Unified Diff: src/heap-profiler.h

Issue 136643008: A64: Synchronize with r18256. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap-inl.h ('k') | src/heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-profiler.h
diff --git a/src/heap-profiler.h b/src/heap-profiler.h
index f2e8100f5da2f27dbbc2ea114938f69d012cf02f..3dd5b4d0e7d031034836f90c163a824236cb7924 100644
--- a/src/heap-profiler.h
+++ b/src/heap-profiler.h
@@ -30,12 +30,12 @@
#include "heap-snapshot-generator-inl.h"
#include "isolate.h"
+#include "smart-pointers.h"
namespace v8 {
namespace internal {
class HeapSnapshot;
-class HeapSnapshotsCollection;
class HeapProfiler {
public:
@@ -53,18 +53,22 @@ class HeapProfiler {
v8::ActivityControl* control,
v8::HeapProfiler::ObjectNameResolver* resolver);
- void StartHeapObjectsTracking();
+ void StartHeapObjectsTracking(bool track_allocations);
void StopHeapObjectsTracking();
+ AllocationTracker* allocation_tracker() { return *allocation_tracker_; }
+ HeapObjectsMap* heap_object_map() { return *ids_; }
+ StringsStorage* names() { return *names_; }
SnapshotObjectId PushHeapObjectsStats(OutputStream* stream);
int GetSnapshotsCount();
HeapSnapshot* GetSnapshot(int index);
SnapshotObjectId GetSnapshotObjectId(Handle<Object> obj);
void DeleteAllSnapshots();
+ void RemoveSnapshot(HeapSnapshot* snapshot);
void ObjectMoveEvent(Address from, Address to, int size);
- void NewObjectEvent(Address addr, int size);
+ void AllocationEvent(Address addr, int size);
void UpdateObjectSizeEvent(Address addr, int size);
@@ -73,30 +77,24 @@ class HeapProfiler {
v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id,
Object** wrapper);
- INLINE(bool is_profiling()) {
- return snapshots_->is_tracking_objects();
- }
-
void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
- bool is_tracking_allocations() {
- return is_tracking_allocations_;
- }
-
- void StartHeapAllocationsRecording();
- void StopHeapAllocationsRecording();
+ bool is_tracking_object_moves() const { return is_tracking_object_moves_; }
+ bool is_tracking_allocations() { return !allocation_tracker_.is_empty(); }
- int FindUntrackedObjects() {
- return snapshots_->FindUntrackedObjects();
- }
+ Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id);
private:
- Heap* heap() const { return snapshots_->heap(); }
+ Heap* heap() const { return ids_->heap(); }
- HeapSnapshotsCollection* snapshots_;
+ // Mapping from HeapObject addresses to objects' uids.
+ SmartPointer<HeapObjectsMap> ids_;
+ List<HeapSnapshot*> snapshots_;
+ SmartPointer<StringsStorage> names_;
unsigned next_snapshot_uid_;
List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_;
- bool is_tracking_allocations_;
+ SmartPointer<AllocationTracker> allocation_tracker_;
+ bool is_tracking_object_moves_;
};
} } // namespace v8::internal
« no previous file with comments | « src/heap-inl.h ('k') | src/heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698