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

Issue 2965723002: VM: Reland Inline instance object hash code into object header on 64bit. (Closed)

Created:
3 years, 5 months ago by erikcorry
Modified:
3 years, 5 months ago
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

VM: Reland Inline instance object hash code into object header on 64bit. Inline instance object hash code into object header on 64 bit. 64 bit objects have 32 bits of free space in the header word. This is used for the hash code in string objects. We take it for the default hash code on all objects that don't override the hashCode getter. This is both faster and a memory reduction. Eg it makes the MegaHashCode part of the Megamorphic benchmark 6 times faster. This is a reland of https://codereview.chromium.org/2954453002/ which fixes an issue that made script snapshots generated on 64 bit platforms incompatible with 32 bit VMs. BUG= R=vegorov@google.com Committed: https://github.com/dart-lang/sdk/commit/955a4b6e711fc66a906b5e3d96c96d637ff45833

Patch Set 1 #

Patch Set 2 : Fix snapshot incompatibility that sank Flutter Gallery #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+517 lines, -147 lines) Patch
M pkg/front_end/testcases/shaker/empty_program.dart.shaker View 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/lib/object.cc View 1 chunk +9 lines, -1 line 0 comments Download
M runtime/lib/object_patch.dart View 2 chunks +7 lines, -8 lines 0 comments Download
M runtime/vm/assembler_arm.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/assembler_arm64.h View 2 chunks +9 lines, -6 lines 0 comments Download
M runtime/vm/assembler_arm64.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M runtime/vm/assembler_arm64_test.cc View 2 chunks +64 lines, -2 lines 0 comments Download
M runtime/vm/assembler_ia32.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/assembler_x64.h View 2 chunks +5 lines, -8 lines 0 comments Download
M runtime/vm/assembler_x64.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M runtime/vm/assembler_x64_test.cc View 3 chunks +43 lines, -2 lines 0 comments Download
M runtime/vm/become.h View 1 chunk +4 lines, -1 line 0 comments Download
M runtime/vm/become.cc View 2 chunks +5 lines, -1 line 0 comments Download
M runtime/vm/clustered_snapshot.cc View 1 chunk +4 lines, -1 line 0 comments Download
M runtime/vm/freelist.h View 1 chunk +4 lines, -1 line 0 comments Download
M runtime/vm/freelist.cc View 1 chunk +6 lines, -1 line 0 comments Download
M runtime/vm/heap.h View 3 chunks +10 lines, -1 line 0 comments Download
M runtime/vm/heap.cc View 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/intermediate_language_dbc.cc View 3 chunks +3 lines, -1 line 0 comments Download
M runtime/vm/intrinsifier.cc View 1 1 chunk +11 lines, -0 lines 2 comments Download
M runtime/vm/intrinsifier_arm.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_arm64.cc View 1 chunk +17 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_ia32.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 chunk +17 lines, -0 lines 0 comments Download
M runtime/vm/method_recognizer.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 3 chunks +8 lines, -12 lines 0 comments Download
M runtime/vm/object.cc View 12 chunks +92 lines, -24 lines 0 comments Download
M runtime/vm/profiler.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/raw_object.h View 17 chunks +56 lines, -31 lines 0 comments Download
M runtime/vm/raw_object.cc View 6 chunks +7 lines, -7 lines 0 comments Download
M runtime/vm/simulator_arm64.h View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/simulator_arm64.cc View 3 chunks +39 lines, -9 lines 0 comments Download
M runtime/vm/simulator_dbc.cc View 5 chunks +7 lines, -1 line 0 comments Download
M runtime/vm/snapshot.h View 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/snapshot.cc View 7 chunks +26 lines, -4 lines 0 comments Download
M runtime/vm/stub_code_arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/stub_code_arm64.cc View 3 chunks +7 lines, -4 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/stub_code_x64.cc View 2 chunks +9 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
erikcorry
PTAL
3 years, 5 months ago (2017-06-30 15:23:57 UTC) #3
Vyacheslav Egorov (Google)
lgtm https://codereview.chromium.org/2965723002/diff/20001/runtime/vm/intrinsifier.cc File runtime/vm/intrinsifier.cc (right): https://codereview.chromium.org/2965723002/diff/20001/runtime/vm/intrinsifier.cc#newcode231 runtime/vm/intrinsifier.cc:231: #if !defined(HASH_IN_OBJECT_HEADER) I think it is just okay ...
3 years, 5 months ago (2017-06-30 16:47:26 UTC) #4
erikcorry
https://codereview.chromium.org/2965723002/diff/20001/runtime/vm/intrinsifier.cc File runtime/vm/intrinsifier.cc (right): https://codereview.chromium.org/2965723002/diff/20001/runtime/vm/intrinsifier.cc#newcode231 runtime/vm/intrinsifier.cc:231: #if !defined(HASH_IN_OBJECT_HEADER) On 2017/06/30 16:47:26, Vyacheslav Egorov (Google) wrote: ...
3 years, 5 months ago (2017-06-30 20:00:09 UTC) #5
erikcorry
3 years, 5 months ago (2017-07-03 07:26:53 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
955a4b6e711fc66a906b5e3d96c96d637ff45833 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698