1
0
mirror of https://github.com/golang/go synced 2024-10-04 06:31:22 -06:00
Commit Graph

11 Commits

Author SHA1 Message Date
Keith Randall
ed467db6d8 cmd/cc,runtime: change preprocessor to expand macros inside of
#pragma textflag and #pragma dataflag directives.
Update dataflag directives to use symbols instead of integer constants.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13310043
2013-08-29 12:36:59 -07:00
Keith Randall
e838334beb runtime: change textflags from numbers to symbols
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12798043
2013-08-12 13:47:18 -07:00
Rob Pike
82f5ca1ef0 runtime: change int32 to intgo in findnull and findnullw
Update #6046.
This CL just does findnull and findnullw. There are other functions
to fix but doing them a few at a time will help isolate any (unlikely)
breakages these changes bring up in architectures I can't test
myself.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12520043
2013-08-06 21:49:03 +10:00
Russ Cox
d3066e47b1 runtime/pprof: test multithreaded profile, remove OS X workarounds
This means that pprof will no longer report profiles on OS X.
That's unfortunate, but the profiles were often wrong and, worse,
it was difficult to tell whether the profile was wrong or not.

The workarounds were making the scheduler more complex,
possibly caused a deadlock (see issue 5519), and did not actually
deliver reliable results.

It may be possible for adventurous users to apply a patch to
their kernels to get working results, or perhaps having no results
will encourage someone to do the work of creating a profiling
thread like on Windows. Issue 6047 has details.

Fixes #5519.
Fixes #6047.

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/12429045
2013-08-05 19:49:02 -04:00
Dmitriy Vyukov
e84d9e1fb3 runtime: do not split stacks in syscall status
Split stack checks (morestack) corrupt g->sched,
but g->sched must be preserved consistent for GC/traceback.
The change implements runtime.notetsleepg function,
which does entersyscall/exitsyscall and is carefully arranged
to not call any split functions in between.

R=rsc
CC=golang-dev
https://golang.org/cl/11575044
2013-07-29 22:22:34 +04:00
Shenghou Ma
2f1ead7095 runtime: correctly handle signals received on foreign threads
Fixes #3250.

R=rsc
CC=golang-dev
https://golang.org/cl/10757044
2013-07-12 04:39:39 +08:00
Jan Ziak
a3e0002e6a runtime: remove all badcallback() functions
R=iant
CC=golang-dev
https://golang.org/cl/9738046
2013-05-29 17:51:17 +02:00
Jan Ziak
e017e0cb24 runtime: flag static variables as no-pointers
Variables in data sections of 32-bit executables interfere with
garbage collector's ability to free objects and/or unnecessarily
slow down the garbage collector.

This changeset moves some static variables to .noptr sections.
'files' in symtab.c is now allocated dynamically.

R=golang-dev, dvyukov, minux.ma
CC=golang-dev
https://golang.org/cl/9786044
2013-05-27 08:11:59 +02:00
Anthony Martin
8b85a3d480 runtime: mark usleep as NOSPLIT on Plan 9
Usleep is called from lockextra, also marked NOSPLIT.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9258043
2013-05-18 15:47:49 -07:00
Russ Cox
5146a93e72 runtime: accept GOTRACEBACK=crash to mean 'crash after panic'
This provides a way to generate core dumps when people need them.
The settings are:

        GOTRACEBACK=0  no traceback on panic, just exit
        GOTRACEBACK=1  default - traceback on panic, then exit
        GOTRACEBACK=2  traceback including runtime frames on panic, then exit
        GOTRACEBACK=crash traceback including runtime frames on panic, then crash

Fixes #3257.

R=golang-dev, devon.odell, r, daniel.morsing, ality
CC=golang-dev
https://golang.org/cl/7666044
2013-03-15 01:11:03 -04:00
Russ Cox
e9d62a6d81 runtime: refactor os-specific code
thread_GOOS.c becomes os_GOOS.c.

signal_GOOS_GOARCH.c becomes os_GOOS_GOARCH.c,
but with non-GOARCH-specific code moved into os_GOOS.c.

The actual arch-specific signal handler moves into signal_GOARCH.c
to avoid per-GOOS duplication.

New files signal_GOOS_GOARCH.h provide macros for
accessing fields of the very system-specific signal info structs.

Lots moving, but nothing changing.
This is a preliminarly cleanup so I can work on the signal
handling code to fix some open issues without having to
make each change 13 times.

Tested on Linux and OS X, 386 and amd64.
Will fix Plan 9, Windows, and ARM after the fact if necessary.
(Plan 9 and Windows should be fine; ARM will probably have some typos.)

Net effect: -1081 lines of code.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7565048
2013-03-14 11:35:13 -07:00