OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/clustered_snapshot.h" | 5 #include "vm/clustered_snapshot.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 | 1560 |
1561 void Trace(Serializer* s, RawObject* object) { | 1561 void Trace(Serializer* s, RawObject* object) { |
1562 RawCode* code = Code::RawCast(object); | 1562 RawCode* code = Code::RawCast(object); |
1563 objects_.Add(code); | 1563 objects_.Add(code); |
1564 | 1564 |
1565 s->Push(code->ptr()->object_pool_); | 1565 s->Push(code->ptr()->object_pool_); |
1566 s->Push(code->ptr()->owner_); | 1566 s->Push(code->ptr()->owner_); |
1567 s->Push(code->ptr()->exception_handlers_); | 1567 s->Push(code->ptr()->exception_handlers_); |
1568 s->Push(code->ptr()->pc_descriptors_); | 1568 s->Push(code->ptr()->pc_descriptors_); |
1569 s->Push(code->ptr()->stackmaps_); | 1569 s->Push(code->ptr()->stackmaps_); |
1570 s->Push(code->ptr()->inlined_id_to_function_); | 1570 if (!FLAG_dwarf_stack_traces) { |
1571 s->Push(code->ptr()->code_source_map_); | 1571 s->Push(code->ptr()->inlined_id_to_function_); |
| 1572 s->Push(code->ptr()->code_source_map_); |
| 1573 } |
1572 | 1574 |
1573 if (s->kind() == Snapshot::kAppJIT) { | 1575 if (s->kind() == Snapshot::kAppJIT) { |
1574 s->Push(code->ptr()->deopt_info_array_); | 1576 s->Push(code->ptr()->deopt_info_array_); |
1575 s->Push(code->ptr()->static_calls_target_table_); | 1577 s->Push(code->ptr()->static_calls_target_table_); |
1576 NOT_IN_PRODUCT(s->Push(code->ptr()->return_address_metadata_)); | 1578 NOT_IN_PRODUCT(s->Push(code->ptr()->return_address_metadata_)); |
1577 } | 1579 } |
1578 } | 1580 } |
1579 | 1581 |
1580 void WriteAlloc(Serializer* s) { | 1582 void WriteAlloc(Serializer* s) { |
1581 s->WriteCid(kCodeCid); | 1583 s->WriteCid(kCodeCid); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 text_offset = s->GetTextOffset(instr, code); | 1616 text_offset = s->GetTextOffset(instr, code); |
1615 } | 1617 } |
1616 s->Write<int32_t>(text_offset); | 1618 s->Write<int32_t>(text_offset); |
1617 } | 1619 } |
1618 | 1620 |
1619 s->WriteRef(code->ptr()->object_pool_); | 1621 s->WriteRef(code->ptr()->object_pool_); |
1620 s->WriteRef(code->ptr()->owner_); | 1622 s->WriteRef(code->ptr()->owner_); |
1621 s->WriteRef(code->ptr()->exception_handlers_); | 1623 s->WriteRef(code->ptr()->exception_handlers_); |
1622 s->WriteRef(code->ptr()->pc_descriptors_); | 1624 s->WriteRef(code->ptr()->pc_descriptors_); |
1623 s->WriteRef(code->ptr()->stackmaps_); | 1625 s->WriteRef(code->ptr()->stackmaps_); |
1624 s->WriteRef(code->ptr()->inlined_id_to_function_); | 1626 if (FLAG_dwarf_stack_traces) { |
1625 s->WriteRef(code->ptr()->code_source_map_); | 1627 s->WriteRef(Array::null()); |
| 1628 s->WriteRef(CodeSourceMap::null()); |
| 1629 } else { |
| 1630 s->WriteRef(code->ptr()->inlined_id_to_function_); |
| 1631 s->WriteRef(code->ptr()->code_source_map_); |
| 1632 } |
1626 | 1633 |
1627 if (s->kind() == Snapshot::kAppJIT) { | 1634 if (s->kind() == Snapshot::kAppJIT) { |
1628 s->WriteRef(code->ptr()->deopt_info_array_); | 1635 s->WriteRef(code->ptr()->deopt_info_array_); |
1629 s->WriteRef(code->ptr()->static_calls_target_table_); | 1636 s->WriteRef(code->ptr()->static_calls_target_table_); |
1630 NOT_IN_PRODUCT(s->WriteRef(code->ptr()->return_address_metadata_)); | 1637 NOT_IN_PRODUCT(s->WriteRef(code->ptr()->return_address_metadata_)); |
1631 } | 1638 } |
1632 | 1639 |
1633 s->Write<int32_t>(code->ptr()->state_bits_); | 1640 s->Write<int32_t>(code->ptr()->state_bits_); |
1634 } | 1641 } |
1635 } | 1642 } |
(...skipping 3878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5514 thread_->isolate()->SetupImagePage(data_buffer_, | 5521 thread_->isolate()->SetupImagePage(data_buffer_, |
5515 /* is_executable */ false); | 5522 /* is_executable */ false); |
5516 } | 5523 } |
5517 | 5524 |
5518 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); | 5525 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); |
5519 | 5526 |
5520 return ApiError::null(); | 5527 return ApiError::null(); |
5521 } | 5528 } |
5522 | 5529 |
5523 } // namespace dart | 5530 } // namespace dart |
OLD | NEW |