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

Issue 6730050: Reimplement the padding of relocation information for lazy deoptimization on ia32. (Closed)

Created:
9 years, 9 months ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Reimplement the padding of relocation information for lazy deoptimization on ia32. The previous implementation attempted to keep track of the needed relocation size for deoptimization while generating the optimized code. That was error prone. This patch moves the relocation resizing to the deoptimizer as the last step of creating an optimized code object. The down side to this approach is that two relocation information byte arrays are created for all optimized functions that do not have enough relocation space for lazy deoptimization. R=sgjesse@chromium.org Committed: http://code.google.com/p/v8/source/detail?r=7360

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -23 lines) Patch
M src/arm/deoptimizer-arm.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/assembler.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/assembler.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/deoptimizer.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/ia32/deoptimizer-ia32.cc View 1 1 chunk +75 lines, -0 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 8 chunks +3 lines, -23 lines 0 comments Download
M src/x64/deoptimizer-x64.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
9 years, 9 months ago (2011-03-25 09:20:36 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/6730050/diff/1/src/ia32/deoptimizer-ia32.cc File src/ia32/deoptimizer-ia32.cc (right): http://codereview.chromium.org/6730050/diff/1/src/ia32/deoptimizer-ia32.cc#newcode96 src/ia32/deoptimizer-ia32.cc:96: // Padding needed. How about just calculating padding ...
9 years, 9 months ago (2011-03-25 09:44:43 UTC) #2
Mads Ager (chromium)
9 years, 9 months ago (2011-03-25 10:15:03 UTC) #3
http://codereview.chromium.org/6730050/diff/1/src/ia32/deoptimizer-ia32.cc
File src/ia32/deoptimizer-ia32.cc (right):

http://codereview.chromium.org/6730050/diff/1/src/ia32/deoptimizer-ia32.cc#ne...
src/ia32/deoptimizer-ia32.cc:96: // Padding needed.
On 2011/03/25 09:44:43, Søren Gjesse wrote:
> How about just calculating padding here (avoid the min_padding varaible).
> 
> // Find the padding needed rounded up to a whole number of comment relocs.
> int padding = (min_reloc_size - reloc_length + comment_reloc_size - 1) /
> comment_reloc_size * comment_reloc_size
> ASSERT_EQ(0, padding % comment_reloc_size);
> int additional_comments = padding / comment_reloc_size;
> 
> Maybe also loose comment_reloc_size and just use
> RelocInfo::kMinRelocCommentSize.

I had that initially. Decided on some more variables to make it more readable.

http://codereview.chromium.org/6730050/diff/1/src/ia32/deoptimizer-ia32.cc#ne...
src/ia32/deoptimizer-ia32.cc:120: reloc_info_writer.Write(&rinfo);
On 2011/03/25 09:44:43, Søren Gjesse wrote:
> ASSERT that this always write RelocInfo::kMinRelocCommentSize bytes?

Done.

Powered by Google App Engine
This is Rietveld 408576698