| Index: src/profile-generator.cc
|
| ===================================================================
|
| --- src/profile-generator.cc (revision 5492)
|
| +++ src/profile-generator.cc (working copy)
|
| @@ -120,11 +120,9 @@
|
|
|
|
|
| const char* CodeEntry::kEmptyNamePrefix = "";
|
| -unsigned CodeEntry::next_call_uid_ = 1;
|
|
|
|
|
| void CodeEntry::CopyData(const CodeEntry& source) {
|
| - call_uid_ = source.call_uid_;
|
| tag_ = source.tag_;
|
| name_prefix_ = source.name_prefix_;
|
| name_ = source.name_;
|
| @@ -133,6 +131,26 @@
|
| }
|
|
|
|
|
| +uint32_t CodeEntry::GetCallUid() const {
|
| + uint32_t hash = ComputeIntegerHash(tag_);
|
| + hash ^= static_cast<int32_t>(reinterpret_cast<intptr_t>(name_prefix_));
|
| + hash ^= static_cast<int32_t>(reinterpret_cast<intptr_t>(name_));
|
| + hash ^= static_cast<int32_t>(reinterpret_cast<intptr_t>(resource_name_));
|
| + hash ^= static_cast<int32_t>(line_number_);
|
| + return hash;
|
| +}
|
| +
|
| +
|
| +bool CodeEntry::IsSameAs(CodeEntry* entry) const {
|
| + return this == entry
|
| + || (tag_ == entry->tag_
|
| + && name_prefix_ == entry->name_prefix_
|
| + && name_ == entry->name_
|
| + && resource_name_ == entry->resource_name_
|
| + && line_number_ == entry->line_number_);
|
| +}
|
| +
|
| +
|
| ProfileNode* ProfileNode::FindChild(CodeEntry* entry) {
|
| HashMap::Entry* map_entry =
|
| children_.Lookup(entry, CodeEntryHash(entry), false);
|
|
|