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

Issue 5792048: code review 5792048: runtime: inline calls to notok (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by rsc
Modified:
13 years, 1 month ago
Reviewers:
CC:
golang-dev, gri, minux1, bradfitz
Visibility:
Public.

Description

runtime: inline calls to notok When a very low-level system call that should never fail does fail, we call notok, which crashes the program. Often, we are then left with only the program counter as information about the crash, and it is in notok. Instead, inline calls to notok (it is just one instruction on most systems) so that the program counter will tell us which system call is unhappy.

Patch Set 1 #

Patch Set 2 : diff -r 9974201aa263 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 9974201aa263 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 4 : diff -r d3b7f8ade3cd https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -115 lines) Patch
M src/pkg/runtime/asm_amd64.s View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/sys_darwin_386.s View 1 6 chunks +9 lines, -13 lines 0 comments Download
M src/pkg/runtime/sys_darwin_amd64.s View 1 8 chunks +8 lines, -13 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_386.s View 1 6 chunks +7 lines, -11 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_amd64.s View 1 6 chunks +7 lines, -12 lines 0 comments Download
M src/pkg/runtime/sys_linux_amd64.s View 1 5 chunks +5 lines, -10 lines 0 comments Download
M src/pkg/runtime/sys_linux_arm.s View 1 4 chunks +6 lines, -8 lines 0 comments Download
M src/pkg/runtime/sys_netbsd_386.s View 1 6 chunks +6 lines, -10 lines 0 comments Download
M src/pkg/runtime/sys_netbsd_amd64.s View 1 5 chunks +6 lines, -11 lines 0 comments Download
M src/pkg/runtime/sys_openbsd_386.s View 1 6 chunks +6 lines, -10 lines 0 comments Download
M src/pkg/runtime/sys_openbsd_amd64.s View 1 5 chunks +6 lines, -11 lines 0 comments Download
M src/pkg/runtime/sys_windows_amd64.s View 1 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 9
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 1 month ago (2012-03-08 18:35:05 UTC) #1
gri
LGTM - some // crash comments are not aligned (don't care too much) - isn't ...
13 years, 1 month ago (2012-03-08 18:43:59 UTC) #2
minux1
LGTM.
13 years, 1 month ago (2012-03-08 18:46:06 UTC) #3
rsc
Thanks. On Thu, Mar 8, 2012 at 13:43, <gri@golang.org> wrote: > - isn't there a ...
13 years, 1 month ago (2012-03-08 18:55:56 UTC) #4
minux1
On 2012/03/08 18:43:59, gri wrote: > - isn't there a panic or the like opcode ...
13 years, 1 month ago (2012-03-08 18:57:25 UTC) #5
bradfitz
I assume all the 2(PC) etc are still the right sizes? On Thu, Mar 8, ...
13 years, 1 month ago (2012-03-08 18:59:00 UTC) #6
rsc
On Thu, Mar 8, 2012 at 13:58, Brad Fitzpatrick <bradfitz@golang.org> wrote: > I assume all ...
13 years, 1 month ago (2012-03-08 18:59:32 UTC) #7
bradfitz
On Thu, Mar 8, 2012 at 10:59 AM, Russ Cox <rsc@golang.org> wrote: > On Thu, ...
13 years, 1 month ago (2012-03-08 19:02:46 UTC) #8
rsc
13 years, 1 month ago (2012-03-08 19:03:59 UTC) #9
*** Submitted as http://code.google.com/p/go/source/detail?r=6c3cab48b9e3 ***

runtime: inline calls to notok

When a very low-level system call that should never fail
does fail, we call notok, which crashes the program.
Often, we are then left with only the program counter as
information about the crash, and it is in notok.
Instead, inline calls to notok (it is just one instruction
on most systems) so that the program counter will
tell us which system call is unhappy.

R=golang-dev, gri, minux.ma, bradfitz
CC=golang-dev
http://codereview.appspot.com/5792048
Sign in to reply to this message.

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