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

Issue 848703002: Improve constant pool implementation in the assembler. (Closed)

Created:
5 years, 11 months ago by Florian Schneider
Modified:
5 years, 11 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Improve constant pool implementation in the assembler. Instead of using RawObject* as keys, use Object*. Using handles eliminates any assumption about the underlying GC implementation (e.g. requiring that old objects don't move). Remove special handling of null_object by making HashMap more generic and allowing the trait to specify the value used to indicate an empty element. The goal is to use one unified, efficient implementation of the constant pool on all architectures that require one (x64, arm64, mips). R=vegorov@google.com, zra@google.com Committed: https://code.google.com/p/dart/source/detail?r=42901

Patch Set 1 #

Total comments: 4

Patch Set 2 : port to ARM/MIPS/ARM64 #

Patch Set 3 : updated test status file #

Total comments: 4

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -123 lines) Patch
M runtime/vm/assembler.h View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
M runtime/vm/assembler_arm.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M runtime/vm/assembler_arm.cc View 1 2 3 4 5 1 chunk +7 lines, -4 lines 0 comments Download
M runtime/vm/assembler_arm64.h View 1 2 3 4 5 1 chunk +0 lines, -38 lines 0 comments Download
M runtime/vm/assembler_arm64.cc View 1 2 3 4 5 3 chunks +6 lines, -14 lines 1 comment Download
M runtime/vm/assembler_mips.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M runtime/vm/assembler_mips.cc View 1 2 3 4 5 1 chunk +7 lines, -4 lines 0 comments Download
M runtime/vm/assembler_x64.h View 1 2 3 4 5 1 chunk +0 lines, -38 lines 0 comments Download
M runtime/vm/assembler_x64.cc View 1 2 3 4 5 3 chunks +6 lines, -14 lines 0 comments Download
M runtime/vm/hash_map.h View 1 2 3 4 5 7 chunks +14 lines, -7 lines 0 comments Download
M tests/corelib/corelib.status View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
Florian Schneider
5 years, 11 months ago (2015-01-12 16:31:36 UTC) #2
Florian Schneider
+vegorov: Please take a look at changes to hash_map.h
5 years, 11 months ago (2015-01-12 16:32:33 UTC) #4
zra
https://codereview.chromium.org/848703002/diff/1/runtime/vm/assembler_x64.h File runtime/vm/assembler_x64.h (right): https://codereview.chromium.org/848703002/diff/1/runtime/vm/assembler_x64.h#newcode1038 runtime/vm/assembler_x64.h:1038: ? key : &Object::ZoneHandle(key->raw())), I'm not sure I understand ...
5 years, 11 months ago (2015-01-12 17:34:00 UTC) #5
Florian Schneider
I'll go ahead and port this to ARM, MIPS and ARM64. https://codereview.chromium.org/848703002/diff/1/runtime/vm/assembler_x64.h File runtime/vm/assembler_x64.h (right): ...
5 years, 11 months ago (2015-01-13 09:54:19 UTC) #6
Vyacheslav Egorov (Google)
hash_map LGTM with comments. try to kill NoValue https://codereview.chromium.org/848703002/diff/40001/runtime/vm/assembler.h File runtime/vm/assembler.h (right): https://codereview.chromium.org/848703002/diff/40001/runtime/vm/assembler.h#newcode217 runtime/vm/assembler.h:217: explicit ...
5 years, 11 months ago (2015-01-13 13:47:30 UTC) #7
Florian Schneider
https://codereview.chromium.org/848703002/diff/40001/runtime/vm/assembler.h File runtime/vm/assembler.h (right): https://codereview.chromium.org/848703002/diff/40001/runtime/vm/assembler.h#newcode217 runtime/vm/assembler.h:217: explicit ObjIndexPair(Value value) : key_(NULL), value_(NoValue()) { } On ...
5 years, 11 months ago (2015-01-13 14:09:08 UTC) #8
zra
lgtm
5 years, 11 months ago (2015-01-14 16:24:59 UTC) #9
Florian Schneider
Committed patchset #6 (id:100001) manually as r42901 (presubmit successful).
5 years, 11 months ago (2015-01-15 10:43:43 UTC) #10
zra
On 2015/01/15 10:43:43, Florian Schneider wrote: > Committed patchset #6 (id:100001) manually as r42901 (presubmit ...
5 years, 11 months ago (2015-01-15 15:21:26 UTC) #11
Ivan Posva
Thanks for fixing. Would be nice to share the abstraction and be able to distinguish ...
5 years, 11 months ago (2015-01-15 23:59:58 UTC) #13
Florian Schneider
5 years, 11 months ago (2015-01-16 10:12:49 UTC) #14
Message was sent while issue was closed.
On 2015/01/15 23:59:58, Ivan Posva wrote:
> Thanks for fixing. Would be nice to share the abstraction and be able to
> distinguish between patchable and non patchable entries in arm and mips.
> 
> -Ivan
> 

Yes, there is still this difference between x64/arm64 and arm/mips. I'll take a
look at it.

It should be straight-forward to add this functionality to arm/mips and will
reduce the size of the constant pools there.

>
https://codereview.chromium.org/848703002/diff/100001/runtime/vm/assembler_ar...
> File runtime/vm/assembler_arm64.cc (right):
> 
>
https://codereview.chromium.org/848703002/diff/100001/runtime/vm/assembler_ar...
> runtime/vm/assembler_arm64.cc:43:
> object_pool_index_table_.Insert(ObjIndexPair(&Object::null_object(), 0));
> We have three data structures in the assembler that need to be kept in sync:
> object_pool_, patchable_pool_entries_ and object_pool_index_table_
> 
> It would probably make sense to abstract that into an assembler helper class
> AssemblerObjectPool and use it across all architectures.

Agree. Once we use the same abstractions on all platforms I can move the common
parts to assembler.h/.cc.

Powered by Google App Engine
This is Rietveld 408576698