diff options
Diffstat (limited to 'deps/v8/src/profile-generator-inl.h')
-rw-r--r-- | deps/v8/src/profile-generator-inl.h | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/deps/v8/src/profile-generator-inl.h b/deps/v8/src/profile-generator-inl.h index cdfa9e2d71..8b5c1e21cb 100644 --- a/deps/v8/src/profile-generator-inl.h +++ b/deps/v8/src/profile-generator-inl.h @@ -105,24 +105,6 @@ void CodeMap::DeleteCode(Address addr) { } -template<class Visitor> -void HeapEntriesMap::UpdateEntries(Visitor* visitor) { - for (HashMap::Entry* p = entries_.Start(); - p != NULL; - p = entries_.Next(p)) { - if (!IsAlias(p->value)) { - EntryInfo* entry_info = reinterpret_cast<EntryInfo*>(p->value); - entry_info->entry = visitor->GetEntry( - reinterpret_cast<HeapObject*>(p->key), - entry_info->children_count, - entry_info->retainers_count); - entry_info->children_count = 0; - entry_info->retainers_count = 0; - } - } -} - - CodeEntry* ProfileGenerator::EntryForVMState(StateTag tag) { switch (tag) { case GC: @@ -139,6 +121,31 @@ CodeEntry* ProfileGenerator::EntryForVMState(StateTag tag) { } } + +inline uint64_t HeapEntry::id() { + union { + Id stored_id; + uint64_t returned_id; + } id_adaptor = {id_}; + return id_adaptor.returned_id; +} + + +template<class Visitor> +void HeapEntriesMap::UpdateEntries(Visitor* visitor) { + for (HashMap::Entry* p = entries_.Start(); + p != NULL; + p = entries_.Next(p)) { + EntryInfo* entry_info = reinterpret_cast<EntryInfo*>(p->value); + entry_info->entry = visitor->GetEntry( + reinterpret_cast<HeapObject*>(p->key), + entry_info->children_count, + entry_info->retainers_count); + entry_info->children_count = 0; + entry_info->retainers_count = 0; + } +} + } } // namespace v8::internal #endif // ENABLE_LOGGING_AND_PROFILING |