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

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

Issue 93843004: Add methods for finding object by its snapshot id and id for an object (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2009-2010 the V8 project authors. All rights reserved. 1 // Copyright 2009-2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, 80 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id,
81 Object** wrapper); 81 Object** wrapper);
82 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); 82 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
83 83
84 bool is_tracking_object_moves() const { return is_tracking_object_moves_; } 84 bool is_tracking_object_moves() const { return is_tracking_object_moves_; }
85 bool is_tracking_allocations() const { 85 bool is_tracking_allocations() const {
86 return !allocation_tracker_.is_empty(); 86 return !allocation_tracker_.is_empty();
87 } 87 }
88 88
89 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); 89 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id);
90 void ClearHeapObjectMap();
90 91
91 private: 92 private:
92 Heap* heap() const { return ids_->heap(); } 93 Heap* heap() const { return ids_->heap(); }
93 94
94 // Mapping from HeapObject addresses to objects' uids. 95 // Mapping from HeapObject addresses to objects' uids.
95 SmartPointer<HeapObjectsMap> ids_; 96 SmartPointer<HeapObjectsMap> ids_;
96 List<HeapSnapshot*> snapshots_; 97 List<HeapSnapshot*> snapshots_;
97 SmartPointer<StringsStorage> names_; 98 SmartPointer<StringsStorage> names_;
98 unsigned next_snapshot_uid_; 99 unsigned next_snapshot_uid_;
99 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; 100 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_;
100 SmartPointer<AllocationTracker> allocation_tracker_; 101 SmartPointer<AllocationTracker> allocation_tracker_;
101 bool is_tracking_object_moves_; 102 bool is_tracking_object_moves_;
102 }; 103 };
103 104
104 } } // namespace v8::internal 105 } } // namespace v8::internal
105 106
106 #endif // V8_HEAP_PROFILER_H_ 107 #endif // V8_HEAP_PROFILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698