OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 INLINE(static bool ObjectsMatch(void* key1, void* key2)) { | 648 INLINE(static bool ObjectsMatch(void* key1, void* key2)) { |
649 return key1 == key2; | 649 return key1 == key2; |
650 } | 650 } |
651 | 651 |
652 INLINE(static uint32_t ObjectHash(const void* key)) { | 652 INLINE(static uint32_t ObjectHash(const void* key)) { |
653 return ComputeIntegerHash( | 653 return ComputeIntegerHash( |
654 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(key)), | 654 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(key)), |
655 v8::internal::kZeroHashSeed); | 655 v8::internal::kZeroHashSeed); |
656 } | 656 } |
657 | 657 |
658 HeapSnapshot* CreateFakeSnapshot(); | |
659 int GetStringId(const char* s); | 658 int GetStringId(const char* s); |
660 int entry_index(HeapEntry* e) { return e->index() * kNodeFieldsCount; } | 659 int entry_index(HeapEntry* e) { return e->index() * kNodeFieldsCount; } |
661 void SerializeEdge(HeapGraphEdge* edge, bool first_edge); | 660 void SerializeEdge(HeapGraphEdge* edge, bool first_edge); |
662 void SerializeEdges(); | 661 void SerializeEdges(); |
663 void SerializeImpl(); | 662 void SerializeImpl(); |
664 void SerializeNode(HeapEntry* entry); | 663 void SerializeNode(HeapEntry* entry); |
665 void SerializeNodes(); | 664 void SerializeNodes(); |
666 void SerializeSnapshot(); | 665 void SerializeSnapshot(); |
667 void SerializeString(const unsigned char* s); | 666 void SerializeString(const unsigned char* s); |
668 void SerializeStrings(); | 667 void SerializeStrings(); |
(...skipping 12 matching lines...) Expand all Loading... |
681 friend class HeapSnapshotJSONSerializerIterator; | 680 friend class HeapSnapshotJSONSerializerIterator; |
682 | 681 |
683 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 682 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
684 }; | 683 }; |
685 | 684 |
686 | 685 |
687 } } // namespace v8::internal | 686 } } // namespace v8::internal |
688 | 687 |
689 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ | 688 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ |
690 | 689 |
OLD | NEW |