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

Issue 12717043: code review 12717043: sync/atomic: specify argsize for asm routines (Closed)

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

Description

sync/atomic: specify argsize for asm routines Fixes issue 6098.

Patch Set 1 #

Patch Set 2 : diff -r 4f468b088d66 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r 4f468b088d66 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r 4f468b088d66 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r 4f468b088d66 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r d7db8c804ffa https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 7 : diff -r 359753c91de8 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 8 : diff -r 359753c91de8 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 9 : diff -r 12a556c320bf https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -66 lines) Patch
M src/pkg/sync/atomic/asm_386.s View 1 2 3 4 5 6 7 chunks +23 lines, -23 lines 0 comments Download
M src/pkg/sync/atomic/asm_amd64.s View 1 2 3 4 5 6 5 chunks +23 lines, -23 lines 0 comments Download
M src/pkg/sync/atomic/asm_arm.s View 1 2 3 4 5 6 8 chunks +8 lines, -8 lines 0 comments Download
M src/pkg/sync/atomic/asm_freebsd_arm.s View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/sync/atomic/asm_linux_arm.s View 1 2 3 4 5 6 7 8 chunks +8 lines, -8 lines 0 comments Download
M src/pkg/sync/atomic/asm_netbsd_arm.s View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/sync/atomic/atomic_test.go View 1 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 7
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 7 months ago (2013-08-12 09:34:00 UTC) #1
bradfitz
LGTM
10 years, 7 months ago (2013-08-12 15:44:08 UTC) #2
dvyukov
*** Submitted as https://code.google.com/p/go/source/detail?r=45d38208376a *** sync/atomic: specify argsize for asm routines Fixes issue 6098. R=golang-dev, ...
10 years, 7 months ago (2013-08-12 17:46:38 UTC) #3
rsc
This broke the ARM builds, because the runtime doesn't know how to unwind the kernel-supplied ...
10 years, 7 months ago (2013-08-13 04:12:22 UTC) #4
dvyukov
On Tue, Aug 13, 2013 at 8:12 AM, <rsc@golang.org> wrote: > This broke the ARM ...
10 years, 7 months ago (2013-08-13 09:58:22 UTC) #5
rsc
On Tue, Aug 13, 2013 at 5:58 AM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Tue, ...
10 years, 7 months ago (2013-08-13 18:18:43 UTC) #6
dvyukov
10 years, 7 months ago (2013-08-13 18:33:41 UTC) #7
On Tue, Aug 13, 2013 at 10:18 PM, Russ Cox <rsc@golang.org> wrote:

> On Tue, Aug 13, 2013 at 5:58 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
>
>> On Tue, Aug 13, 2013 at 8:12 AM, <rsc@golang.org> wrote:
>>
>>> This broke the ARM builds, because the runtime doesn't know how to
>>> unwind the kernel-supplied atomics.
>>>
>>> We could update the traceback.
>>>
>>> Or we could access the memory before jumping to the atomic routine, so
>>> that the fault happens in code we control.
>>>
>>> Probably the traceback is a better (if uglier) approach, because it
>>> avoids memory traffic?
>>>
>>
>>
>> Yes, it's better to not touch shared memory once more.
>>
>> Do you know how to fix traceback?
>>
>
> Yes, I believe that if the top-most pc is in the magic page (0xffff0000 to
> 0xffff0fff) we just unwind one step (pc=lr, lr=0) before starting the
> trace. I would prefer someone else try it, though.
>
>
I've landed a workaround to fix builders (do load in our assembly):
https://codereview.appspot.com/12869043/
At least this crash seems to stop happening on the arm builders.
There are lots of optimization opportunities on ARM (in particular do
Load/Store w/o LL/SC loop), this will be another one :)
Sign in to reply to this message.

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