| 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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 } | 996 } |
| 997 | 997 |
| 998 INLINE(static uint32_t ObjectHash(const void* key)) { | 998 INLINE(static uint32_t ObjectHash(const void* key)) { |
| 999 return static_cast<int32_t>(reinterpret_cast<intptr_t>(key)); | 999 return static_cast<int32_t>(reinterpret_cast<intptr_t>(key)); |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 void EnumerateNodes(); | 1002 void EnumerateNodes(); |
| 1003 int GetNodeId(HeapEntry* entry); | 1003 int GetNodeId(HeapEntry* entry); |
| 1004 int GetStringId(const char* s); | 1004 int GetStringId(const char* s); |
| 1005 void SerializeEdge(HeapGraphEdge* edge); | 1005 void SerializeEdge(HeapGraphEdge* edge); |
| 1006 void SerializeImpl(); |
| 1006 void SerializeNode(HeapEntry* entry); | 1007 void SerializeNode(HeapEntry* entry); |
| 1007 void SerializeNodes(); | 1008 void SerializeNodes(); |
| 1008 void SerializeSnapshot(); | 1009 void SerializeSnapshot(); |
| 1009 void SerializeString(const unsigned char* s); | 1010 void SerializeString(const unsigned char* s); |
| 1010 void SerializeStrings(); | 1011 void SerializeStrings(); |
| 1011 void SortHashMap(HashMap* map, List<HashMap::Entry*>* sorted_entries); | 1012 void SortHashMap(HashMap* map, List<HashMap::Entry*>* sorted_entries); |
| 1012 | 1013 |
| 1013 HeapSnapshot* snapshot_; | 1014 HeapSnapshot* snapshot_; |
| 1014 HashMap nodes_; | 1015 HashMap nodes_; |
| 1015 HashMap strings_; | 1016 HashMap strings_; |
| 1016 int next_node_id_; | 1017 int next_node_id_; |
| 1017 int next_string_id_; | 1018 int next_string_id_; |
| 1018 OutputStreamWriter* writer_; | 1019 OutputStreamWriter* writer_; |
| 1019 | 1020 |
| 1020 friend class HeapSnapshotJSONSerializerEnumerator; | 1021 friend class HeapSnapshotJSONSerializerEnumerator; |
| 1021 friend class HeapSnapshotJSONSerializerIterator; | 1022 friend class HeapSnapshotJSONSerializerIterator; |
| 1022 | 1023 |
| 1023 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1024 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
| 1024 }; | 1025 }; |
| 1025 | 1026 |
| 1026 } } // namespace v8::internal | 1027 } } // namespace v8::internal |
| 1027 | 1028 |
| 1028 #endif // ENABLE_LOGGING_AND_PROFILING | 1029 #endif // ENABLE_LOGGING_AND_PROFILING |
| 1029 | 1030 |
| 1030 #endif // V8_PROFILE_GENERATOR_H_ | 1031 #endif // V8_PROFILE_GENERATOR_H_ |
| OLD | NEW |