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

Issue 10607002: - Remove a few jumps from store barrier code. (Closed)

Created:
8 years, 6 months ago by Ivan Posva
Modified:
8 years, 6 months ago
Reviewers:
cshapiro, sra1, kasperl, srdjan, siva
CC:
reviews_dartlang.org, Vyacheslav Egorov (Google)
Visibility:
Public.

Description

- Remove a few jumps from store barrier code. Committed: https://code.google.com/p/dart/source/detail?r=8959

Patch Set 1 #

Patch Set 2 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -11 lines) Patch
M runtime/vm/assembler_ia32.cc View 1 3 chunks +12 lines, -11 lines 4 comments Download

Messages

Total messages: 5 (0 generated)
Ivan Posva
8 years, 6 months ago (2012-06-21 00:39:48 UTC) #1
siva
lgtm
8 years, 6 months ago (2012-06-21 00:52:47 UTC) #2
kasperl
https://chromiumcodereview.appspot.com/10607002/diff/3001/runtime/vm/assembler_ia32.cc File runtime/vm/assembler_ia32.cc (right): https://chromiumcodereview.appspot.com/10607002/diff/3001/runtime/vm/assembler_ia32.cc#newcode1390 runtime/vm/assembler_ia32.cc:1390: andl(value, Immediate(0x5)); I think you should add a comment ...
8 years, 6 months ago (2012-06-21 05:05:47 UTC) #3
sra1
https://chromiumcodereview.appspot.com/10607002/diff/3001/runtime/vm/assembler_ia32.cc File runtime/vm/assembler_ia32.cc (right): https://chromiumcodereview.appspot.com/10607002/diff/3001/runtime/vm/assembler_ia32.cc#newcode1395 runtime/vm/assembler_ia32.cc:1395: j(NOT_ZERO, no_update); and value,7 lea value,[object*8 + value] and ...
8 years, 6 months ago (2012-06-22 05:17:44 UTC) #4
Ivan Posva
8 years, 6 months ago (2012-06-22 06:56:22 UTC) #5
https://chromiumcodereview.appspot.com/10607002/diff/3001/runtime/vm/assemble...
File runtime/vm/assembler_ia32.cc (right):

https://chromiumcodereview.appspot.com/10607002/diff/3001/runtime/vm/assemble...
runtime/vm/assembler_ia32.cc:1390: andl(value, Immediate(0x5));
On 2012/06/21 05:05:47, kasperl wrote:
> I think you should add a comment here explaning that this is teh awesome. 
Thanks! Half of the credit goes to Slava...

I will also add a comment here explaining how it works and what properties need
to be preserved. This is tricky code because throwing in Smis does end up with
all kinds of weird unexpected bit patterns.

https://chromiumcodereview.appspot.com/10607002/diff/3001/runtime/vm/assemble...
runtime/vm/assembler_ia32.cc:1395: j(NOT_ZERO, no_update);
On 2012/06/22 05:17:44, sra1 wrote:
> and value,7
> lea value,[object*8 + value]
> and value,0b111111
> cmp value,0b001101
> jnz no_update
> 
> might not be faster if there is extra cycles on the alu -> address generator
->
> alu path.
> 
> Is reducing the number of branches enough of a win to cover the extra push/pop
> execution time and the ~5 bytes extra code (counting the push/pop)?
> Branch predictors often ignore the low k bits, in effect predicting adjacent
> and/or nearby branches together.

Thanks for the suggestion to use lea to separate the bits, it is similar to a
suggestion we received from Lasse. I will measure the impact once we have
convinced ourselves that this approach is valid.

Powered by Google App Engine
This is Rietveld 408576698