OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // To avoid confusing people, let's put all these entries into | 115 // To avoid confusing people, let's put all these entries into |
116 // one bucket. | 116 // one bucket. |
117 case OTHER: | 117 case OTHER: |
118 case EXTERNAL: | 118 case EXTERNAL: |
119 return program_entry_; | 119 return program_entry_; |
120 default: return NULL; | 120 default: return NULL; |
121 } | 121 } |
122 } | 122 } |
123 | 123 |
124 | 124 |
| 125 #ifdef WIN32 |
| 126 inline uint64_t HeapEntry::id() { |
| 127 return *(reinterpret_cast<uint64_t*>(&id_)); |
| 128 } |
| 129 #else |
| 130 inline uint64_t HeapEntry::id() { |
| 131 return id_; |
| 132 } |
| 133 #endif |
| 134 |
| 135 |
125 template<class Visitor> | 136 template<class Visitor> |
126 void HeapEntriesMap::UpdateEntries(Visitor* visitor) { | 137 void HeapEntriesMap::UpdateEntries(Visitor* visitor) { |
127 for (HashMap::Entry* p = entries_.Start(); | 138 for (HashMap::Entry* p = entries_.Start(); |
128 p != NULL; | 139 p != NULL; |
129 p = entries_.Next(p)) { | 140 p = entries_.Next(p)) { |
130 EntryInfo* entry_info = reinterpret_cast<EntryInfo*>(p->value); | 141 EntryInfo* entry_info = reinterpret_cast<EntryInfo*>(p->value); |
131 entry_info->entry = visitor->GetEntry( | 142 entry_info->entry = visitor->GetEntry( |
132 reinterpret_cast<HeapObject*>(p->key), | 143 reinterpret_cast<HeapObject*>(p->key), |
133 entry_info->children_count, | 144 entry_info->children_count, |
134 entry_info->retainers_count); | 145 entry_info->retainers_count); |
135 entry_info->children_count = 0; | 146 entry_info->children_count = 0; |
136 entry_info->retainers_count = 0; | 147 entry_info->retainers_count = 0; |
137 } | 148 } |
138 } | 149 } |
139 | 150 |
140 } } // namespace v8::internal | 151 } } // namespace v8::internal |
141 | 152 |
142 #endif // ENABLE_LOGGING_AND_PROFILING | 153 #endif // ENABLE_LOGGING_AND_PROFILING |
143 | 154 |
144 #endif // V8_PROFILE_GENERATOR_INL_H_ | 155 #endif // V8_PROFILE_GENERATOR_INL_H_ |
OLD | NEW |