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

Side by Side Diff: runtime/vm/snapshot.cc

Issue 1414083004: Output precompiled snapshot size. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: \ Created 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/snapshot.h" 5 #include "vm/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 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 1944
1945 1945
1946 void FullSnapshotWriter::WriteFullSnapshot() { 1946 void FullSnapshotWriter::WriteFullSnapshot() {
1947 if (vm_isolate_snapshot_buffer() != NULL) { 1947 if (vm_isolate_snapshot_buffer() != NULL) {
1948 WriteVmIsolateSnapshot(); 1948 WriteVmIsolateSnapshot();
1949 } 1949 }
1950 WriteIsolateFullSnapshot(); 1950 WriteIsolateFullSnapshot();
1951 if (snapshot_code_) { 1951 if (snapshot_code_) {
1952 instructions_writer_->WriteAssembly(); 1952 instructions_writer_->WriteAssembly();
1953 instructions_snapshot_size_ = instructions_writer_->BytesWritten(); 1953 instructions_snapshot_size_ = instructions_writer_->BytesWritten();
1954
1955 OS::Print("VMIsolate(CodeSize): %" Pd "\n", VmIsolateSnapshotSize());
1956 OS::Print("Isolate(CodeSize): %" Pd "\n", IsolateSnapshotSize());
1957 OS::Print("Instructions(CodeSize): %" Pd "\n",
1958 instructions_writer_->binary_size());
1959 intptr_t total = VmIsolateSnapshotSize() +
1960 IsolateSnapshotSize() +
1961 instructions_writer_->binary_size();
1962 OS::Print("Total(CodeSize): %" Pd "\n", total);
1954 } 1963 }
1955 } 1964 }
1956 1965
1957 1966
1958 PrecompiledSnapshotWriter::PrecompiledSnapshotWriter( 1967 PrecompiledSnapshotWriter::PrecompiledSnapshotWriter(
1959 uint8_t** vm_isolate_snapshot_buffer, 1968 uint8_t** vm_isolate_snapshot_buffer,
1960 uint8_t** isolate_snapshot_buffer, 1969 uint8_t** isolate_snapshot_buffer,
1961 uint8_t** instructions_snapshot_buffer, 1970 uint8_t** instructions_snapshot_buffer,
1962 ReAlloc alloc) 1971 ReAlloc alloc)
1963 : FullSnapshotWriter(vm_isolate_snapshot_buffer, 1972 : FullSnapshotWriter(vm_isolate_snapshot_buffer,
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 if (setjmp(*jump.Set()) == 0) { 2579 if (setjmp(*jump.Set()) == 0) {
2571 NoSafepointScope no_safepoint; 2580 NoSafepointScope no_safepoint;
2572 WriteObject(obj.raw()); 2581 WriteObject(obj.raw());
2573 } else { 2582 } else {
2574 ThrowException(exception_type(), exception_msg()); 2583 ThrowException(exception_type(), exception_msg());
2575 } 2584 }
2576 } 2585 }
2577 2586
2578 2587
2579 } // namespace dart 2588 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698