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

Issue 2326483005: Shrink AOT snapshot size and memory usage. (Closed)

Created:
4 years, 3 months ago by rmacnak
Modified:
4 years, 3 months ago
Reviewers:
Florian Schneider, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Shrink AOT snapshot size and memory usage. - Conditionally remove fields of Code, Function and ICData that are not used in the AOT runtime. - Don't include RawClosureData.context_scope_ in AOT snapshots. - Remove parameter names not needed for method resolution. - Remove parameter types not needed for function type tests. - Deduplicate parameter name and parameter type lists. - Shrink and share the initial MegamorphicCache table. Flutter gallery (IsolateSnapshotReader event) snapshot size 2731129 -> 2199999 (-19.4%) initial heap 7899568 -> 5433176 (-31.2%) R=fschneider@google.com Committed: https://github.com/dart-lang/sdk/commit/47cc06ae66aa6788d795e0d3af6517aaa8f91084

Patch Set 1 #

Patch Set 2 : checkpoint #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : dedup param types and names #

Patch Set 6 : megamorphic buckets #

Patch Set 7 : . #

Total comments: 7

Patch Set 8 : . #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+457 lines, -112 lines) Patch
M runtime/observatory/lib/src/app/notification.dart View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M runtime/observatory/lib/src/elements/code_view.dart View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M runtime/observatory/lib/src/elements/function_view.dart View 1 2 3 4 5 6 1 chunk +23 lines, -12 lines 0 comments Download
M runtime/observatory/lib/src/elements/script_inset.dart View 1 2 3 4 5 6 3 chunks +7 lines, -1 line 0 comments Download
M runtime/observatory/lib/src/models/objects/notification.dart View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M runtime/platform/globals.h View 1 chunk +6 lines, -1 line 0 comments Download
M runtime/vm/clustered_snapshot.cc View 1 2 3 4 5 6 7 14 chunks +51 lines, -25 lines 0 comments Download
M runtime/vm/flag_list.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/gc_marker.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 7 14 chunks +134 lines, -4 lines 2 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 7 21 chunks +106 lines, -8 lines 0 comments Download
M runtime/vm/precompiler.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/precompiler.cc View 1 2 3 4 5 6 7 3 chunks +73 lines, -26 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 6 chunks +39 lines, -27 lines 0 comments Download
M runtime/vm/raw_object.cc View 1 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 4 chunks +6 lines, -2 lines 2 comments Download

Messages

Total messages: 13 (7 generated)
rmacnak
4 years, 3 months ago (2016-09-14 20:36:52 UTC) #6
Florian Schneider
https://codereview.chromium.org/2326483005/diff/120001/runtime/vm/clustered_snapshot.cc File runtime/vm/clustered_snapshot.cc (right): https://codereview.chromium.org/2326483005/diff/120001/runtime/vm/clustered_snapshot.cc#newcode546 runtime/vm/clustered_snapshot.cc:546: #if !defined(DART_PRECOMPILED_RUNTIME) The reading code will be needed at ...
4 years, 3 months ago (2016-09-14 21:32:52 UTC) #7
rmacnak
https://codereview.chromium.org/2326483005/diff/120001/runtime/vm/clustered_snapshot.cc File runtime/vm/clustered_snapshot.cc (right): https://codereview.chromium.org/2326483005/diff/120001/runtime/vm/clustered_snapshot.cc#newcode546 runtime/vm/clustered_snapshot.cc:546: #if !defined(DART_PRECOMPILED_RUNTIME) On 2016/09/14 21:32:52, Florian Schneider wrote: > ...
4 years, 3 months ago (2016-09-15 17:01:22 UTC) #8
Florian Schneider
LGTM https://codereview.chromium.org/2326483005/diff/140001/runtime/vm/object.h File runtime/vm/object.h (right): https://codereview.chromium.org/2326483005/diff/140001/runtime/vm/object.h#newcode4903 runtime/vm/object.h:4903: #if defined(DART_PRECOMPILED_RUNTIME) Is this used in AOT? UNREACHABLE ...
4 years, 3 months ago (2016-09-15 17:17:37 UTC) #9
rmacnak
Committed patchset #8 (id:140001) manually as 47cc06ae66aa6788d795e0d3af6517aaa8f91084 (presubmit successful).
4 years, 3 months ago (2016-09-15 22:06:48 UTC) #12
rmacnak
4 years, 3 months ago (2016-09-16 21:59:02 UTC) #13
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/2326483005/diff/140001/runtime/vm/obje...
File runtime/vm/object.h (right):

https://chromiumcodereview.appspot.com/2326483005/diff/140001/runtime/vm/obje...
runtime/vm/object.h:4903: #if defined(DART_PRECOMPILED_RUNTIME)
On 2016/09/15 17:17:37, Florian Schneider wrote:
> Is this used in AOT? UNREACHABLE as well?

From the profiler.

https://chromiumcodereview.appspot.com/2326483005/diff/140001/runtime/vm/raw_...
File runtime/vm/raw_object_snapshot.cc (right):

https://chromiumcodereview.appspot.com/2326483005/diff/140001/runtime/vm/raw_...
runtime/vm/raw_object_snapshot.cc:767: #if !defined(DART_PRECOMPILED_RUNTIME)
On 2016/09/15 17:17:37, Florian Schneider wrote:
> In a separate CL, it may be worth excluding the writer code not used for
> messages in precompiled runtime like you did for the clustered writer.
> 

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698