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

Issue 194793002: [v8-dev] ARM: safepoints frame optimization (Closed)

Created:
6 years, 9 months ago by vincent.belliard
Modified:
6 years, 9 months ago
CC:
v8-dev
Visibility:
Public.

Description

ARM: optimize push/pop of safe points BUG= R=ulan@chromium.org, bmeurer@chromium.org

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -56 lines) Patch
M src/arm/assembler-arm.h View 2 chunks +11 lines, -0 lines 2 comments Download
M src/arm/assembler-arm.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M src/arm/frames-arm.h View 1 chunk +0 lines, -6 lines 0 comments Download
M src/arm/lithium-arm.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 2 chunks +34 lines, -1 line 0 comments Download
M src/arm/macro-assembler-arm.h View 2 chunks +1 line, -5 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 2 chunks +92 lines, -31 lines 0 comments Download
M src/frames.h View 1 chunk +0 lines, -6 lines 0 comments Download
M src/frames.cc View 2 chunks +27 lines, -0 lines 0 comments Download
M src/heap.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/lithium.h View 2 chunks +16 lines, -0 lines 0 comments Download
M src/lithium.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/lithium-allocator.h View 2 chunks +18 lines, -0 lines 0 comments Download
M src/lithium-allocator.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M src/lithium-allocator-inl.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/objects.h View 2 chunks +13 lines, -0 lines 0 comments Download
M src/objects-inl.h View 5 chunks +19 lines, -0 lines 0 comments Download
M src/v8globals.h View 2 chunks +11 lines, -0 lines 0 comments Download
M test/cctest/test-reloc-info.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
vincent.belliard
6 years, 9 months ago (2014-03-11 10:05:05 UTC) #1
vincent.belliard
6 years, 9 months ago (2014-03-11 10:14:20 UTC) #2
Benedikt Meurer
https://codereview.chromium.org/194793002/diff/1/src/arm/assembler-arm.h File src/arm/assembler-arm.h (right): https://codereview.chromium.org/194793002/diff/1/src/arm/assembler-arm.h#newcode1451 src/arm/assembler-arm.h:1451: void set_registers_masks(RegList registers_mask, Nit: One dedicated setter per property.
6 years, 9 months ago (2014-03-13 10:41:49 UTC) #3
vincent.belliard
https://codereview.chromium.org/194793002/diff/1/src/arm/assembler-arm.h File src/arm/assembler-arm.h (right): https://codereview.chromium.org/194793002/diff/1/src/arm/assembler-arm.h#newcode1451 src/arm/assembler-arm.h:1451: void set_registers_masks(RegList registers_mask, On 2014/03/13 10:41:49, Benedikt Meurer wrote: ...
6 years, 9 months ago (2014-03-13 10:53:36 UTC) #4
Benedikt Meurer
+danno, +titzer As mentioned offline, I don't think it's the right time to start working ...
6 years, 9 months ago (2014-03-13 11:42:04 UTC) #5
danno-g
This CL also seems to completely overlook the work done for stubs that saves callee-clobbered ...
6 years, 9 months ago (2014-03-13 11:56:03 UTC) #6
danno-g
Sorry, I meant: Callee-saved tagged registers are also not feasible at all, since generally the ...
6 years, 9 months ago (2014-03-13 11:57:07 UTC) #7
titzer
6 years, 9 months ago (2014-03-13 12:06:47 UTC) #8
On 2014/03/13 11:57:07, danno-g wrote:
> Sorry, I meant:
> 
> Callee-saved tagged registers are also not feasible at all, since generally
> the caller can never know if they need to save a register as just bits or
> interpret it as an object pointer, i.e. the caller always need to assume that
> tagged registers get clobbered and has to save them before making calls.

Worse, if we have a call chain A -> B -> C with A having callee-saved registers,
it may be the case that those values are either stored in B or C's frame (or
worse, in some C function's frame somewhere in the middle whose layout we don't
know). If we were to deoptimize B or C we have to handle any registers they have
saved on behalf of their caller (i.e. A). I think this is a major complication
that is likely to have many special cases and produce a steady stream of
hard-to-find bugs.

In general, the strategy to deal with chokepoints like this is to inline the
fast path, which avoids spilling all the registers, and have a deferred path
that only saves the registers in the caller in the slow case.

Powered by Google App Engine
This is Rietveld 408576698