OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 CodeEntryInfo(CodeEntry* an_entry, unsigned a_size) | 250 CodeEntryInfo(CodeEntry* an_entry, unsigned a_size) |
251 : entry(an_entry), size(a_size) { } | 251 : entry(an_entry), size(a_size) { } |
252 CodeEntry* entry; | 252 CodeEntry* entry; |
253 unsigned size; | 253 unsigned size; |
254 }; | 254 }; |
255 | 255 |
256 struct CodeTreeConfig { | 256 struct CodeTreeConfig { |
257 typedef Address Key; | 257 typedef Address Key; |
258 typedef CodeEntryInfo Value; | 258 typedef CodeEntryInfo Value; |
259 static const Key kNoKey; | 259 static const Key kNoKey; |
260 static const Value kNoValue; | 260 static const Value NoValue() { return CodeEntryInfo(NULL, 0); } |
261 static int Compare(const Key& a, const Key& b) { | 261 static int Compare(const Key& a, const Key& b) { |
262 return a < b ? -1 : (a > b ? 1 : 0); | 262 return a < b ? -1 : (a > b ? 1 : 0); |
263 } | 263 } |
264 }; | 264 }; |
265 typedef SplayTree<CodeTreeConfig> CodeTree; | 265 typedef SplayTree<CodeTreeConfig> CodeTree; |
266 | 266 |
267 class CodeTreePrinter { | 267 class CodeTreePrinter { |
268 public: | 268 public: |
269 void Call(const Address& key, const CodeEntryInfo& value); | 269 void Call(const Address& key, const CodeEntryInfo& value); |
270 }; | 270 }; |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 | 1126 |
1127 friend class HeapSnapshotJSONSerializerEnumerator; | 1127 friend class HeapSnapshotJSONSerializerEnumerator; |
1128 friend class HeapSnapshotJSONSerializerIterator; | 1128 friend class HeapSnapshotJSONSerializerIterator; |
1129 | 1129 |
1130 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1130 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
1131 }; | 1131 }; |
1132 | 1132 |
1133 } } // namespace v8::internal | 1133 } } // namespace v8::internal |
1134 | 1134 |
1135 #endif // V8_PROFILE_GENERATOR_H_ | 1135 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |