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

Issue 8970004: Changes to create an application snapshot which can be layered on top (Closed)

Created:
9 years ago by siva
Modified:
9 years ago
Reviewers:
Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Changes to create an application snapshot which can be layered on top after an isolate is created and initialized. Added an option --use_script_snapshot which creates a snapshot of the specified script in an isolate, shuts that down and restarts on a new isolate and loads the script from the snapshot buffer and executes it. Committed: https://code.google.com/p/dart/source/detail?r=2609

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 8

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -144 lines) Patch
M bin/main.cc View 1 2 3 4 5 6 9 chunks +123 lines, -35 lines 0 comments Download
M include/dart_api.h View 1 2 3 4 5 6 2 chunks +3 lines, -6 lines 0 comments Download
M tests/vm/vm.status View 1 2 3 4 5 6 1 chunk +1 line, -4 lines 0 comments Download
M vm/dart_api_impl.cc View 1 2 3 4 5 6 5 chunks +12 lines, -8 lines 0 comments Download
M vm/raw_object_snapshot.cc View 1 2 3 4 5 6 43 chunks +132 lines, -64 lines 0 comments Download
M vm/snapshot.h View 1 2 3 4 5 6 3 chunks +5 lines, -2 lines 0 comments Download
M vm/snapshot.cc View 1 2 3 4 5 6 4 chunks +12 lines, -4 lines 0 comments Download
M vm/snapshot_test.cc View 1 2 3 4 5 6 3 chunks +58 lines, -21 lines 0 comments Download
M vm/timer.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
siva
9 years ago (2011-12-16 01:24:46 UTC) #1
siva
synched up to tot and added option --use_script_snapshot to be able to test the script ...
9 years ago (2011-12-16 21:44:41 UTC) #2
Ivan Posva
Please at least fix the Dart_CreateScriptSnapshot API and the flag handling in the binary. The ...
9 years ago (2011-12-19 21:32:42 UTC) #3
siva
9 years ago (2011-12-19 23:50:00 UTC) #4
Addressed review comments.

http://codereview.chromium.org/8970004/diff/2011/bin/main.cc
File bin/main.cc (right):

http://codereview.chromium.org/8970004/diff/2011/bin/main.cc#newcode76
bin/main.cc:76: { "--use_script_snapshot", ProcessSnapshotOption },
Added --compile_all to this list.
As discussed off-line we could potentially move these testing flags out of the
production binary and into the binary run_vm_tests. 

On 2011/12/19 21:32:42, Ivan Posva wrote:
> What about compile-all? In general we should figure out if we can pull these
> kind of testing flags out of the production binary.

http://codereview.chromium.org/8970004/diff/2011/bin/main.cc#newcode328
bin/main.cc:328: // Save the script snapshot as we are about to shutdown
isolate.
On 2011/12/19 21:32:42, Ivan Posva wrote:
> shutdown the isolate.

Done.

http://codereview.chromium.org/8970004/diff/2011/vm/dart_api_impl.cc
File vm/dart_api_impl.cc (right):

http://codereview.chromium.org/8970004/diff/2011/vm/dart_api_impl.cc#newcode639
vm/dart_api_impl.cc:639: DART_EXPORT Dart_Handle
Dart_CreateScriptSnapshot(Dart_Handle library,
On 2011/12/19 21:32:42, Ivan Posva wrote:
> As I mentioned in person already, I think passing the library here is
confusing
> as the isolate should already know which library refers is the root library
(aka
> script).

Done.

http://codereview.chromium.org/8970004/diff/2011/vm/raw_object_snapshot.cc
File vm/raw_object_snapshot.cc (right):

http://codereview.chromium.org/8970004/diff/2011/vm/raw_object_snapshot.cc#ne...
vm/raw_object_snapshot.cc:33: (kind == Snapshot::kScript &&
!RawObject::IsCreatedFromSnapshot(tags))) {
I would have to think about how this can be done by using information purely
from the writer. Let me do this in another CL.

On 2011/12/19 21:32:42, Ivan Posva wrote:
> I am wondering if there is a way to simplify the logic here. The snapshot
writer
> should be able to communicate in the tags which way to branch here is my
> expectation.

Powered by Google App Engine
This is Rietveld 408576698