Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: src/extensions/statistics-extension.cc

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: reverted v8-debugger change Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | src/factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/extensions/statistics-extension.h" 5 #include "src/extensions/statistics-extension.h"
6 6
7 #include "src/counters.h" 7 #include "src/counters.h"
8 #include "src/heap/heap-inl.h" 8 #include "src/heap/heap-inl.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 args.GetReturnValue().Set(result); 141 args.GetReturnValue().Set(result);
142 142
143 HeapIterator iterator(reinterpret_cast<Isolate*>(args.GetIsolate())->heap()); 143 HeapIterator iterator(reinterpret_cast<Isolate*>(args.GetIsolate())->heap());
144 HeapObject* obj; 144 HeapObject* obj;
145 int reloc_info_total = 0; 145 int reloc_info_total = 0;
146 int source_position_table_total = 0; 146 int source_position_table_total = 0;
147 while ((obj = iterator.next()) != nullptr) { 147 while ((obj = iterator.next()) != nullptr) {
148 if (obj->IsCode()) { 148 if (obj->IsCode()) {
149 Code* code = Code::cast(obj); 149 Code* code = Code::cast(obj);
150 reloc_info_total += code->relocation_info()->Size(); 150 reloc_info_total += code->relocation_info()->Size();
151 ByteArray* source_position_table = code->source_position_table(); 151 ByteArray* source_position_table = code->SourcePositionTable();
152 if (source_position_table->length() > 0) { 152 if (source_position_table->length() > 0) {
153 source_position_table_total += code->source_position_table()->Size(); 153 source_position_table_total += code->SourcePositionTable()->Size();
154 } 154 }
155 } else if (obj->IsBytecodeArray()) { 155 } else if (obj->IsBytecodeArray()) {
156 source_position_table_total += 156 source_position_table_total +=
157 BytecodeArray::cast(obj)->source_position_table()->Size(); 157 BytecodeArray::cast(obj)->SourcePositionTable()->Size();
158 } 158 }
159 } 159 }
160 160
161 AddNumber(args.GetIsolate(), result, reloc_info_total, 161 AddNumber(args.GetIsolate(), result, reloc_info_total,
162 "reloc_info_total_size"); 162 "reloc_info_total_size");
163 AddNumber(args.GetIsolate(), result, source_position_table_total, 163 AddNumber(args.GetIsolate(), result, source_position_table_total,
164 "source_position_table_total_size"); 164 "source_position_table_total_size");
165 } 165 }
166 166
167 } // namespace internal 167 } // namespace internal
168 } // namespace v8 168 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698