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

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

Created:
3 years, 6 months ago by erikcorry
Modified:
3 years, 6 months ago
CC:
reviews_dartlang.org, 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/2912863006/ It fixes issues with the 32 bit compare-swap instruction on ARM64 and fixes a fragile tree shaking test that is sensitive to which private methods are in the core libraries. R=kustermann@google.com, vegorov@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/8378b8fdbf332c9bf2166abb960354bb92492480

Patch Set 1 #

Patch Set 2 : Fix fragile shaking test golden file #

Patch Set 3 : Fix wrong int width in ARM64 assembler test #

Patch Set 4 : Incorporate last minute code review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+501 lines, -151 lines) Patch
M pkg/front_end/testcases/shaker/empty_program.dart.shaker View 1 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 1 2 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_mips.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_arm64.cc View 1 chunk +17 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 2 chunks +14 lines, -1 line 0 comments Download
M runtime/vm/object.h View 3 chunks +8 lines, -12 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 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_mips.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 (2 generated)
erikcorry
3 years, 6 months ago (2017-06-22 11:06:26 UTC) #1
kustermann
lgtm
3 years, 6 months ago (2017-06-22 11:14:26 UTC) #3
Vyacheslav Egorov (Google)
lgtm
3 years, 6 months ago (2017-06-22 12:14:02 UTC) #4
erikcorry
Committed patchset #4 (id:60001) manually as 8378b8fdbf332c9bf2166abb960354bb92492480 (presubmit successful).
3 years, 6 months ago (2017-06-22 12:56:31 UTC) #6
aam
3 years, 6 months ago (2017-06-24 02:03:14 UTC) #7
Message was sent while issue was closed.
On 2017/06/22 12:56:31, erikcorry wrote:
> Committed patchset #4 (id:60001) manually as
> 8378b8fdbf332c9bf2166abb960354bb92492480 (presubmit successful).

Rolling flutter engine to this revision results in crash of flutter gallery
example on android device:
===
06-23 18:50:48.009  3695  3695 I flutter : [INFO:platform_view_android.cc(111)]
GL surface initialized.
06-23 18:50:48.013  2765  2765 I GamesBroadcastStub: Ignorning broadcast;
requires Play Games
06-23 18:50:48.035  3695  3737 F libc    : Fatal signal 11 (SIGSEGV), code 1,
fault addr 0x3 in tid 3737 (ui_thread)
06-23 18:50:48.045   920 28364 W BroadcastQueue: Background execution not
allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED
dat=package:io.flutter.examples.gallery flg=0x4000010 (has extras) } to
com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
06-23 18:50:48.069  2765  3709 D Wear_Controller: Received broadcast
action=android.intent.action.PACKAGE_ADDED and uri=io.flutter.examples.gallery
06-23 18:50:48.074  3742  3742 I crash_dump32: obtaining output fd from
tombstoned
06-23 18:50:48.075   740   740 I /system/bin/tombstoned: received crash request
for pid 3695
06-23 18:50:48.077  3742  3742 I crash_dump32: performing dump of process 3695
(target tid = 3737)
06-23 18:50:48.077  3742  3742 F DEBUG   : *** *** *** *** *** *** *** *** ***
*** *** *** *** *** *** ***
06-23 18:50:48.077  3742  3742 F DEBUG   : Build fingerprint:
'google/sailfish/sailfish:8.0.0/OPR1.170615.003/4107604:userdebug/dev-keys'
06-23 18:50:48.077  3742  3742 F DEBUG   : Revision: '0'
06-23 18:50:48.077  3742  3742 F DEBUG   : ABI: 'arm'
06-23 18:50:48.077  3742  3742 F DEBUG   : pid: 3695, tid: 3737, name: ui_thread
 >>> io.flutter.examples.gallery <<<
06-23 18:50:48.077  3742  3742 F DEBUG   : signal 11 (SIGSEGV), code 1
(SEGV_MAPERR), fault addr 0x3
06-23 18:50:48.077  3742  3742 F DEBUG   : Cause: null pointer dereference
06-23 18:50:48.077  3742  3742 F DEBUG   :     r0 c977a2a1  r1 00000000  r2
c977fb35  r3 00000000
06-23 18:50:48.077  3742  3742 F DEBUG   :     r4 dae0c839  r5 c9595fb1  r6
c9596559  r7 c98fe818
06-23 18:50:48.077  3742  3742 F DEBUG   :     r8 dae0cc3d  r9 c9595ef1  sl
c9ce3400  fp c98fe848
06-23 18:50:48.077  3742  3742 F DEBUG   :     ip cc56ab4c  sp c98fe818  lr
c95c12e8  pc c95c1838  cpsr a0000010
06-23 18:50:48.078  3742  3742 F DEBUG   : 
06-23 18:50:48.078  3742  3742 F DEBUG   : backtrace:
06-23 18:50:48.078  3742  3742 F DEBUG   :     #00 pc 00001838 
<anonymous:c95c0000>
06-23 18:50:48.078  3742  3742 F DEBUG   :     #01 pc 000012e4 
<anonymous:c95c0000>
06-23 18:50:48.094 28607 28607 V ApplicationReceiver:onReceive: 2017-06-24
01:50:48-null-Application install message is received ve
===
On previous CL 3078734ff7 flutter engine/gallery sample work fine.

Powered by Google App Engine
This is Rietveld 408576698