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

50 Commits

Author SHA1 Message Date
Alex Brainman
c3be760889 runtime: increase maximum number of windows callbacks
Fixes #1912.

R=rsc
CC=golang-dev
https://golang.org/cl/4591047
2011-06-09 10:29:25 +10:00
Alex Brainman
b873701dbd runtime: do not garbage collect windows callbacks
Fixes #1883.
Fixes #1702.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4532103
2011-06-02 17:08:56 +10:00
Alexey Borzenkov
c4206cb231 runtime: save cdecl registers in Windows SEH handler
Fixes #1779

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4566041
2011-05-31 10:11:47 -04:00
Russ Cox
8698bb6c8c runtime: turn "too many EPIPE" into real SIGPIPE
Tested on Linux and OS X, amd64 and 386.

R=r, iant
CC=golang-dev
https://golang.org/cl/4452046
2011-04-25 16:58:00 -04:00
Russ Cox
c19b373c8a runtime: cpu profiling support
R=r
CC=golang-dev
https://golang.org/cl/4306043
2011-03-23 11:43:37 -04:00
Russ Cox
ad29ef9561 runtime: fix windows/386 build
TBR=brainman
CC=golang-dev
https://golang.org/cl/4237060
2011-03-07 11:48:35 -05:00
Alex Brainman
176eb49d9c runtime: add empty windows/signals.h file to fix build
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4223049
2011-02-25 11:16:39 +11:00
Russ Cox
59ce067da8 runtime: omit breakpoint during terminal panic
A terminal panic (one that prints a stack trace and exits)
has been calling runtime.breakpoint before calling exit,
so that if running under a debugger, the debugger can
take control.  When not running under a debugger, though,
this causes an additional SIGTRAP on Unix and pop-up
dialogs on Windows.

Support for debugging Go programs has gotten good
enough that we can rely on the debugger to set its own
breakpoint on runtime.exit if it wants to look around.

R=r, r2
CC=golang-dev
https://golang.org/cl/4222043
2011-02-23 15:42:13 -05:00
Alex Brainman
ff7d7b271f runtime: detect failed thread creation on Windows
Fixes #1495.

R=rsc
CC=golang-dev
https://golang.org/cl/4182047
2011-02-15 09:42:25 +11:00
Hector Chu
1723fbe13e windows: runtime: implemented console ctrl handler (SIGINT).
R=rsc, brainman, iant2
CC=golang-dev
https://golang.org/cl/4129049
2011-02-14 12:15:13 -05:00
Russ Cox
12bdb29bdf runtime: complete windows SysReserve
Should fix windows/386 build.

R=brainman
CC=golang-dev
https://golang.org/cl/4170041
2011-02-10 15:39:08 -05:00
Hector Chu
239ef63bf2 runtime: take the callback return value from the stack
R=brainman, lxn, rsc
CC=golang-dev
https://golang.org/cl/4126056
2011-02-10 23:02:27 +11:00
Russ Cox
1e063b32cd runtime: faster allocator, garbage collector
GC is still single-threaded.
Multiple threads will happen in another CL.

Garbage collection pauses are typically
about half as long as they were before this CL.

R=brainman, iant, r
CC=golang-dev
https://golang.org/cl/3975046
2011-02-02 23:03:47 -05:00
Hector Chu
62afa225af windows: multiple improvements and cleanups
The callback mechanism has been made more flexible.
Eliminated one round of argument copying in Syscall.
Faster Get/SetLastError implemented.
Added gettime for gc perf profiling.

R=rsc, brainman, mattn, rog
CC=golang-dev
https://golang.org/cl/4058046
2011-02-01 11:49:24 -05:00
Luuk van Dijk
7400be87d8 runtime: generate Go defs for C types.
R=rsc, mattn
CC=golang-dev
https://golang.org/cl/4047047
2011-01-31 12:27:28 +01:00
Wei Guangjing
6606995c91 fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/4124041
2011-01-28 23:44:37 -05:00
Russ Cox
4608feb18b runtime: simpler heap map, memory allocation
The old heap maps used a multilevel table, but that
was overkill: there are only 1M entries on a 32-bit
machine and we can arrange to use a dense address
range on a 64-bit machine.

The heap map is in bss.  The assumption is that if
we don't touch the pages they won't be mapped in.

Also moved some duplicated memory allocation
code out of the OS-specific files.

R=r
CC=golang-dev
https://golang.org/cl/4118042
2011-01-28 15:03:26 -05:00
Alex Brainman
b7949035d6 runtime: fix windows build
R=golang-dev
CC=golang-dev
https://golang.org/cl/4052046
2011-01-26 09:50:15 +11:00
Hector Chu
90294a08c8 runtime: make Walk webbrowser example work
R=rsc, brainman, lxn
CC=golang-dev
https://golang.org/cl/4005045
2011-01-25 17:56:33 +11:00
Alex Brainman
f0b8f84d37 runtime: implementation of callback functions for windows
R=rsc, lxn, alex.brainman, dho
CC=golang-dev
https://golang.org/cl/1696051
2011-01-22 13:55:53 +11:00
Wei Guangjing
1aa2d88739 cgo: windows/386 port
R=rsc, peterGo, brainman
CC=golang-dev
https://golang.org/cl/3733046
2011-01-20 10:22:20 -05:00
Hector Chu
6c240d7671 runtime: fix tabs in windows/386/sys.s
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/4030043
2011-01-20 09:21:04 -05:00
Hector Chu
aae5f91213 windows: implement exception handling
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/4079041
2011-01-19 15:10:15 -05:00
Alex Brainman
a41d85498e runtime: revert 6974:1f3c3696babb
I missed that environment is used during runtime setup,
well before go init() functions run. Implemented os-dependent
runtime.goenvs functions to allow for different unix, plan9 and
windows versions of environment discovery.

R=rsc, paulzhol
CC=golang-dev
https://golang.org/cl/3787046
2011-01-12 11:48:15 +11:00
Alex Brainman
c83451971e runtime: move windows goargs implementation from runtime and into os package
R=rsc
CC=golang-dev
https://golang.org/cl/3702041
2010-12-16 12:18:18 +11:00
Wei Guangjing
e04ef7769e Fix windows build.
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/3533041
2010-12-13 16:41:02 +11:00
Alex Brainman
60c91bbf4c runtime: fix windows build
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3419043
2010-12-08 12:52:36 +11:00
Wei Guangjing
70deac67cf 8l : add dynimport to import table in Windows PE, initial make cgo dll work.
R=rsc, brainman, Joe Poirier, mattn
CC=golang-dev
https://golang.org/cl/2166041
2010-12-07 15:28:33 -05:00
Luuk van Dijk
555feea117 runtime: fix windows breakage
R=iant
CC=golang-dev
https://golang.org/cl/3344044
2010-12-01 00:19:00 +01:00
Luuk van Dijk
85cae877f5 runtime: parallel definitions in Go for all C structs.
R=rsc
CC=golang-dev
https://golang.org/cl/3308041
2010-11-30 18:21:26 +01:00
Alex Brainman
4e69976a60 runtime: fix SysFree to really free memory on Windows
Fixes #1294.

R=golang-dev, PeterGo, iant
CC=golang-dev
https://golang.org/cl/3271041
2010-11-24 11:47:35 +11:00
Alex Brainman
b611137098 runtime: free memory allocated by windows CommandLineToArgv
R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/3003043
2010-11-11 10:38:45 +11:00
Alex Brainman
2b18b18263 runtime: fix windows build
R=rsc
CC=golang-dev
https://golang.org/cl/2923041
2010-11-05 17:27:12 +11:00
Russ Cox
68b4255a96 runtime: ,s/[a-zA-Z0-9_]+/runtime·&/g, almost
Prefix all external symbols in runtime by runtime·,
to avoid conflicts with possible symbols of the same
name in linked-in C libraries.  The obvious conflicts
are printf, malloc, and free, but hide everything to
avoid future pain.

The symbols left alone are:

	** known to cgo **
	_cgo_free
	_cgo_malloc
	libcgo_thread_start
	initcgo
	ncgocall

	** known to linker **
	_rt0_$GOARCH
	_rt0_$GOARCH_$GOOS
	text
	etext
	data
	end
	pclntab
	epclntab
	symtab
	esymtab

	** known to C compiler **
	_divv
	_modv
	_div64by32
	etc (arch specific)

Tested on darwin/386, darwin/amd64, linux/386, linux/amd64.

Built (but not tested) for freebsd/386, freebsd/amd64, linux/arm, windows/386.

R=r, PeterGo
CC=golang-dev
https://golang.org/cl/2899041
2010-11-04 14:00:19 -04:00
Russ Cox
4fd12c04c5 fix windows build
R=ken2
CC=golang-dev
https://golang.org/cl/2650041
2010-10-21 13:06:17 -04:00
Russ Cox
19fd5c787f 5l, 6l, 8l: link pclntab and symtab as ordinary rodata symbols
That is, move the pc/ln table and the symbol table
into the read-only data segment.  This eliminates
the need for a special load command to map the
symbol table into memory, which makes the
information available on systems that couldn't handle
the magic load to 0x99000000, like NaCl and ARM QEMU
and Linux without config_highmem=y.  It also
eliminates an #ifdef and some clumsy code to
find the symbol table on Windows.

The bad news is that the binary appears to be bigger
than it used to be.  This is not actually the case, though:
the same amount of data is being mapped into memory
as before, and the tables are still read-only, so they're
still shared across multiple instances of the binary as
they were before.  The difference is just that the tables
aren't squirreled away in some section that "size" doesn't
know to look at.

This is a checkpoint.
It probably breaks Windows and breaks NaCl more
than it used to be broken, but those will be fixed.
The logic involving -s needs to be revisited too.

Fixes #871.

R=ken2
CC=golang-dev
https://golang.org/cl/2587041
2010-10-19 18:07:19 -04:00
Russ Cox
649aab835f runtime: add mmap of null page just in case
R=r, iant, robert.swiecki, rsc1
CC=golang-dev
https://golang.org/cl/1904044
2010-09-28 20:30:01 -04:00
Alex Brainman
f95a2f2b97 runtime(windows): make sure scheduler runs on os stack and new stdcall implementation
R=rsc
CC=golang-dev
https://golang.org/cl/2009045
2010-09-12 11:45:16 +10:00
Alex Brainman
89e9231865 runtime: fix windows build
R=rsc, r2
CC=golang-dev
https://golang.org/cl/2135045
2010-09-09 12:09:10 +10:00
Russ Cox
d4cc557b0d runtime: use manual stack for garbage collection
Old code was using recursion to traverse object graph.
New code uses an explicit stack, cutting the per-pointer
footprint to two words during the recursion and avoiding
the standard allocator and stack splitting code.

in test/garbage:

Reduces parser runtime by 2-3%
Reduces Peano runtime by 40%
Increases tree runtime by 4-5%

R=r
CC=golang-dev
https://golang.org/cl/2150042
2010-09-07 09:57:22 -04:00
Alex Brainman
bc4a9caa41 runtime: free memory returned by windows GetEnvironmentStrings
R=golang-dev
CC=golang-dev
https://golang.org/cl/1917048
2010-08-09 11:30:33 +10:00
Alex Brainman
45e12c7cd3 runtime: fix bug introduced in revision 4a01b8d28570
R=rsc
CC=golang-dev
https://golang.org/cl/1874046
2010-07-29 16:54:01 +10:00
Alex Brainman
eee095399f syscall: improve windows errno handling
R=rsc, Joe Poirier, PeterGo
CC=golang-dev
https://golang.org/cl/1872045
2010-07-26 10:24:48 +10:00
Daniel Theophanes
7f9e247489 syscall: add ForkExec, Syscall12 on Windows
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/1578041
2010-07-26 09:43:35 +10:00
Alex Brainman
059c7ba996 runtime: fix windows build
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/1747041
2010-06-29 07:12:14 -07:00
Ian Lance Taylor
807605d0fc Only catch all signals if os/signal package imported.
Fixes #776.

R=rsc
CC=golang-dev
https://golang.org/cl/1745041
2010-06-28 17:14:17 -07:00
Alex Brainman
c1e20720f7 runtime: switch to OS stack during Windows syscall
R=rsc
CC=golang-dev
https://golang.org/cl/1381041
2010-06-11 01:38:12 -07:00
Alex Brainman
fdb460ec11 runtime: free lock handles on Windows
R=rsc
CC=golang-dev
https://golang.org/cl/1652041
2010-06-11 00:53:54 -07:00
Alex Brainman
d5a8647d80 syscall: windows SysAlloc should use stdcall_raw not syscall
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/1382041
2010-05-28 11:47:09 -07:00
Alex Brainman
f81d471940 rename GOOS=mingw to GOOS=windows
R=rsc, Joe Poirier
CC=golang-dev
https://golang.org/cl/1015043
2010-04-29 23:45:14 -07:00