Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11)

Issue 19910044: code review 19910044: cmd/5l, runtime: fix divide for profiling tracebacks on ARM (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by rsc
Modified:
10 years, 5 months ago
Reviewers:
r, josharian
CC:
golang-dev, r
Visibility:
Public.

Description

cmd/5l, runtime: fix divide for profiling tracebacks on ARM Two bugs: 1. The first iteration of the traceback always uses LR when provided, which it is (only) during a profiling signal, but in fact LR is correct only if the stack frame has not been allocated yet. Otherwise an intervening call may have changed LR, and the saved copy in the stack frame should be used. Fix in traceback_arm.c. 2. The division runtime call adds 8 bytes to the stack. In order to keep the traceback routines happy, it must copy the saved LR into the new 0(SP). Change SUB $8, SP into MOVW 0(SP), R11 // r11 is temporary, for use by linker MOVW.W R11, -8(SP) to update SP and 0(SP) atomically, so that the traceback always sees a saved LR at 0(SP). Fixes issue 6681.

Patch Set 1 #

Patch Set 2 : diff -r db021a4c7b4a https://code.google.com/p/go #

Patch Set 3 : diff -r db021a4c7b4a https://code.google.com/p/go #

Patch Set 4 : diff -r db021a4c7b4a https://code.google.com/p/go #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -6 lines) Patch
M src/cmd/5l/noop.c View 1 1 chunk +18 lines, -5 lines 1 comment Download
M src/pkg/runtime/pprof/pprof_test.go View 1 3 chunks +25 lines, -0 lines 0 comments Download
M src/pkg/runtime/traceback_arm.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 5 months ago (2013-10-31 18:08:54 UTC) #1
r
LGTM
10 years, 5 months ago (2013-10-31 18:14:50 UTC) #2
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=9eb64f5ef3a6 *** cmd/5l, runtime: fix divide for profiling tracebacks on ARM Two ...
10 years, 5 months ago (2013-10-31 18:16:03 UTC) #3
josharian
On 2013/10/31 18:16:03, rsc wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=9eb64f5ef3a6 *** > > cmd/5l, runtime: ...
10 years, 5 months ago (2013-10-31 21:50:56 UTC) #4
josharian
10 years, 5 months ago (2013-10-31 21:51:08 UTC) #5
Message was sent while issue was closed.
https://codereview.appspot.com/19910044/diff/50001/src/cmd/5l/noop.c
File src/cmd/5l/noop.c (right):

https://codereview.appspot.com/19910044/diff/50001/src/cmd/5l/noop.c#newcode486
src/cmd/5l/noop.c:486: /* SUB $8,SP */
Nit: Looks like this comment should be removed.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b