mirror of
https://github.com/dart-lang/sdk
synced 2024-07-20 04:55:43 +00:00
Move printing snapshot sizes behind a flag.
R=asiva@google.com Review URL: https://codereview.chromium.org/2504663003 .
This commit is contained in:
parent
8606013647
commit
7ea4a11146
|
@ -5307,21 +5307,29 @@ void FullSnapshotWriter::WriteFullSnapshot() {
|
|||
|
||||
WriteIsolateFullSnapshot(num_base_objects);
|
||||
|
||||
if (FLAG_print_snapshot_sizes) {
|
||||
OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize());
|
||||
OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize());
|
||||
}
|
||||
intptr_t total_size = VmIsolateSnapshotSize() + IsolateSnapshotSize();
|
||||
|
||||
if (Snapshot::IncludesCode(kind_)) {
|
||||
instructions_writer_->Write(
|
||||
*vm_isolate_snapshot_buffer_, vm_isolate_snapshot_size_,
|
||||
*isolate_snapshot_buffer_, isolate_snapshot_size_);
|
||||
|
||||
OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize());
|
||||
OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize());
|
||||
OS::Print("ReadOnlyData(CodeSize): %" Pd "\n",
|
||||
instructions_writer_->data_size());
|
||||
OS::Print("Instructions(CodeSize): %" Pd "\n",
|
||||
instructions_writer_->text_size());
|
||||
intptr_t total = VmIsolateSnapshotSize() + IsolateSnapshotSize() +
|
||||
instructions_writer_->data_size() +
|
||||
instructions_writer_->text_size();
|
||||
OS::Print("Total(CodeSize): %" Pd "\n", total);
|
||||
if (FLAG_print_snapshot_sizes) {
|
||||
OS::Print("ReadOnlyData(CodeSize): %" Pd "\n",
|
||||
instructions_writer_->data_size());
|
||||
OS::Print("Instructions(CodeSize): %" Pd "\n",
|
||||
instructions_writer_->text_size());
|
||||
}
|
||||
total_size +=
|
||||
instructions_writer_->data_size() + instructions_writer_->text_size();
|
||||
}
|
||||
|
||||
if (FLAG_print_snapshot_sizes) {
|
||||
OS::Print("Total(CodeSize): %" Pd "\n", total_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,6 +122,8 @@
|
|||
"Polymorphic calls with deoptimization / megamorphic call") \
|
||||
P(precompiled_mode, bool, false, "Precompilation compiler mode") \
|
||||
C(precompiled_runtime, true, false, bool, false, "Precompiled runtime mode") \
|
||||
R(print_snapshot_sizes, false, bool, false, \
|
||||
"Print sizes of generated snapshots.") \
|
||||
R(print_ssa_liveranges, false, bool, false, \
|
||||
"Print live ranges after allocation.") \
|
||||
C(print_stop_message, false, false, bool, false, "Print stop message.") \
|
||||
|
|
Loading…
Reference in a new issue