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

Unified Diff: runtime/vm/clustered_snapshot.cc

Issue 2504663003: Move printing snapshot sizes behind a flag. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flag_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/clustered_snapshot.cc
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 396e6ad3417bfcc1034b7e71c4865912eef26542..d8ae13404bee5c821b87426e484f451040f63eaa 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -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);
}
}
« no previous file with comments | « no previous file | runtime/vm/flag_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698