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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 HeapEntry* entry) { | 97 HeapEntry* entry) { |
98 HeapGraphEdge edge(type, index, this->index(), entry->index()); | 98 HeapGraphEdge edge(type, index, this->index(), entry->index()); |
99 snapshot_->edges().Add(edge); | 99 snapshot_->edges().Add(edge); |
100 ++children_count_; | 100 ++children_count_; |
101 } | 101 } |
102 | 102 |
103 | 103 |
104 void HeapEntry::Print( | 104 void HeapEntry::Print( |
105 const char* prefix, const char* edge_name, int max_depth, int indent) { | 105 const char* prefix, const char* edge_name, int max_depth, int indent) { |
106 STATIC_CHECK(sizeof(unsigned) == sizeof(id())); | 106 STATIC_CHECK(sizeof(unsigned) == sizeof(id())); |
107 OS::Print("%6"V8PRIuPTR" @%6u %*c %s%s: ", | 107 OS::Print("%6" V8PRIuPTR " @%6u %*c %s%s: ", |
108 self_size(), id(), indent, ' ', prefix, edge_name); | 108 self_size(), id(), indent, ' ', prefix, edge_name); |
109 if (type() != kString) { | 109 if (type() != kString) { |
110 OS::Print("%s %.40s\n", TypeAsString(), name_); | 110 OS::Print("%s %.40s\n", TypeAsString(), name_); |
111 } else { | 111 } else { |
112 OS::Print("\""); | 112 OS::Print("\""); |
113 const char* c = name_; | 113 const char* c = name_; |
114 while (*c && (c - name_) <= 40) { | 114 while (*c && (c - name_) <= 40) { |
115 if (*c != '\n') | 115 if (*c != '\n') |
116 OS::Print("%c", *c); | 116 OS::Print("%c", *c); |
117 else | 117 else |
(...skipping 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3064 writer_->AddString("\"<dummy>\""); | 3064 writer_->AddString("\"<dummy>\""); |
3065 for (int i = 1; i < sorted_strings.length(); ++i) { | 3065 for (int i = 1; i < sorted_strings.length(); ++i) { |
3066 writer_->AddCharacter(','); | 3066 writer_->AddCharacter(','); |
3067 SerializeString(sorted_strings[i]); | 3067 SerializeString(sorted_strings[i]); |
3068 if (writer_->aborted()) return; | 3068 if (writer_->aborted()) return; |
3069 } | 3069 } |
3070 } | 3070 } |
3071 | 3071 |
3072 | 3072 |
3073 } } // namespace v8::internal | 3073 } } // namespace v8::internal |
OLD | NEW |