File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -310,11 +310,17 @@ void ImageWriter::DumpInstructionsSizes() {
310
310
auto & owner = Object::Handle (zone);
311
311
auto & url = String::Handle (zone);
312
312
auto & name = String::Handle (zone);
313
+ intptr_t trampolines_total_size = 0 ;
313
314
314
315
JSONWriter js;
315
316
js.OpenArray ();
316
317
for (intptr_t i = 0 ; i < instructions_.length (); i++) {
317
318
auto & data = instructions_[i];
319
+ const bool is_trampoline = data.code_ == nullptr ;
320
+ if (is_trampoline) {
321
+ trampolines_total_size += data.trampoline_length ;
322
+ continue ;
323
+ }
318
324
owner = WeakSerializationReference::Unwrap (data.code_ ->owner ());
319
325
js.OpenObject ();
320
326
if (owner.IsFunction ()) {
@@ -337,6 +343,12 @@ void ImageWriter::DumpInstructionsSizes() {
337
343
js.PrintProperty (" s" , SizeInSnapshot (data.insns_ ->raw ()));
338
344
js.CloseObject ();
339
345
}
346
+ if (trampolines_total_size != 0 ) {
347
+ js.OpenObject ();
348
+ js.PrintProperty (" n" , " [Stub] Trampoline" );
349
+ js.PrintProperty (" s" , trampolines_total_size);
350
+ js.CloseObject ();
351
+ }
340
352
js.CloseArray ();
341
353
342
354
auto file_open = Dart::file_open_callback ();
You can’t perform that action at this time.
0 commit comments