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

Issue 984893003: CpuProfiler: fix for CollectDeoptEvents test on arm64 (Closed)

Created:
5 years, 9 months ago by loislo
Modified:
5 years, 9 months ago
Reviewers:
Sven Panne, alph, jbramley, yurys
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

CpuProfiler: fix for CollectDeoptEvents test on arm64 We use slightly different schema for JumpTable on arm64 than for x64. We do a branch (B) to the JumpTable from the code, then a branch (B) to the end of jump table code and then branch to the deoptimizer code with putting the return address into lr register (Call which is actually Blr). As a result the 'from' address in Deoptimizer always points to the end of JumpTable code and we can get nothing from this information. 0) I moved save_doubles and needs_frame code out of for_loop. 1) I replaced B commands with Bl so we put different return addresses to lr register for the different jump table entries and replaced the final Call with Br which do not touch lr register. Also I removed the last_entry check so we will always do the Bl even for the last entry because we need the right address in lr. I don't think that this will affect the performance because it just one more branch for entire deopt mechanics. BUG=chromium:452067 LOG=n Committed: https://crrev.com/82e6824eb725205ffaac925a55e628e5081c7bd7 Cr-Commit-Position: refs/heads/master@{#27094}

Patch Set 1 #

Patch Set 2 : support dept tracking for frameless and save_doubles entries #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -35 lines) Patch
M src/arm64/lithium-codegen-arm64.cc View 1 2 chunks +32 lines, -32 lines 2 comments Download
M src/deoptimizer.h View 1 chunk +0 lines, -1 line 0 comments Download
M test/cctest/test-cpu-profiler.cc View 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
loislo
PTAL
5 years, 9 months ago (2015-03-09 15:34:05 UTC) #2
Sven Panne
LGTM from my side, but let's wait for Jacob to have a look at lithium-codegen-arm64.cc.
5 years, 9 months ago (2015-03-10 07:34:30 UTC) #4
jbramley
LGTM There is usually a penalty associated with corrupting the return stack predictor. That is, ...
5 years, 9 months ago (2015-03-10 09:53:27 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/984893003/20001
5 years, 9 months ago (2015-03-10 10:09:40 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 9 months ago (2015-03-10 10:45:11 UTC) #9
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/82e6824eb725205ffaac925a55e628e5081c7bd7 Cr-Commit-Position: refs/heads/master@{#27094}
5 years, 9 months ago (2015-03-10 10:45:29 UTC) #10
jbramley
https://codereview.chromium.org/984893003/diff/20001/src/arm64/lithium-codegen-arm64.cc File src/arm64/lithium-codegen-arm64.cc (right): https://codereview.chromium.org/984893003/diff/20001/src/arm64/lithium-codegen-arm64.cc#newcode870 src/arm64/lithium-codegen-arm64.cc:870: __ Push(lr, fp, cp); We can save some space ...
5 years, 9 months ago (2015-03-10 13:11:18 UTC) #11
loislo
5 years, 9 months ago (2015-03-10 14:42:18 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/984893003/diff/20001/src/arm64/lithium-codege...
File src/arm64/lithium-codegen-arm64.cc (right):

https://codereview.chromium.org/984893003/diff/20001/src/arm64/lithium-codege...
src/arm64/lithium-codegen-arm64.cc:870: __ Push(lr, fp, cp);
On 2015/03/10 13:11:18, jbramley wrote:
> We can save some space here by pushing (lr, fp) here, then (cp, stub_marker)
at
> needs_frame. ARM64 pushes registers in pairs, so pushing (a,b),(c,d) is more
> space-efficient than pushing (a,b,c),(d).
> 
> The effect is probably small but I'll make a patch to address this, since
there
> is basically no cost.
> 
> (Sorry, I didn't see it at first.)

I'll do this in https://codereview.chromium.org/995813002/

Powered by Google App Engine
This is Rietveld 408576698