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

Unified Diff: src/profile-generator.h

Issue 10128006: Show names for the strong roots in heap snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 | « no previous file | src/profile-generator.cc » ('j') | test/cctest/test-heap-profiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index 961cc8d1fcb61f2c9e4a0cf103f82d131219ad9f..13f3f17d70ada856e9dd2f7ee23a6aea8a3613aa 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -853,6 +853,15 @@ class HeapEntriesMap {
static HeapEntry* const kHeapEntryPlaceholder;
+ static uint32_t Hash(HeapThing thing) {
+ return ComputeIntegerHash(
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(thing)),
+ v8::internal::kZeroHashSeed);
+ }
+ static bool HeapThingsMatch(HeapThing key1, HeapThing key2) {
+ return key1 == key2;
+ }
+
private:
struct EntryInfo {
EntryInfo(HeapEntry* entry, HeapEntriesAllocator* allocator)
@@ -869,15 +878,6 @@ class HeapEntriesMap {
static inline void AllocateHeapEntryForMapEntry(HashMap::Entry* map_entry);
- static uint32_t Hash(HeapThing thing) {
- return ComputeIntegerHash(
- static_cast<uint32_t>(reinterpret_cast<uintptr_t>(thing)),
- v8::internal::kZeroHashSeed);
- }
- static bool HeapThingsMatch(HeapThing key1, HeapThing key2) {
- return key1 == key2;
- }
-
HashMap entries_;
int entries_count_;
int total_children_count_;
@@ -1025,6 +1025,7 @@ class V8HeapExplorer : public HeapEntriesAllocator {
void SetGcRootsReference(VisitorSynchronization::SyncTag tag);
void SetGcSubrootReference(
VisitorSynchronization::SyncTag tag, bool is_weak, Object* child);
+ const char* GetGcSubrootName(Object* object);
mnaganov (inactive) 2012/04/19 13:52:29 If it deals only with strong roots, perhaps call i
alexeif 2012/04/19 15:27:43 Done.
void SetObjectName(HeapObject* object);
void TagObject(Object* obj, const char* tag);
@@ -1039,6 +1040,7 @@ class V8HeapExplorer : public HeapEntriesAllocator {
SnapshottingProgressReportingInterface* progress_;
SnapshotFillerInterface* filler_;
HeapObjectsSet objects_tags_;
+ HashMap gc_subroot_names_;
mnaganov (inactive) 2012/04/19 13:52:29 Why are you using a generic HashMap? HeapObjectsSe
alexeif 2012/04/19 15:27:43 Done.
static HeapObject* const kGcRootsObject;
static HeapObject* const kFirstGcSubrootObject;
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | test/cctest/test-heap-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698