summaryrefslogtreecommitdiff
path: root/libgo/go/runtime
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-12-12 23:13:29 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-12-12 23:13:29 +0000
commita42a906c420d7bb196cb8541e0ab65264a0b04b0 (patch)
tree8c441679e35147b1e9bec048f733fc394fb0c161 /libgo/go/runtime
parentbc77608b97abcc4bb3171f08a71e34ae342e9f8d (diff)
libgo: Update to current master library sources.
From-SVN: r194460
Diffstat (limited to 'libgo/go/runtime')
-rw-r--r--libgo/go/runtime/debug.go2
-rw-r--r--libgo/go/runtime/extern.go6
-rw-r--r--libgo/go/runtime/gc_test.go1
-rw-r--r--libgo/go/runtime/mallocrep1.go1
4 files changed, 5 insertions, 5 deletions
diff --git a/libgo/go/runtime/debug.go b/libgo/go/runtime/debug.go
index 9da71a7857c..bcdde4b6a0b 100644
--- a/libgo/go/runtime/debug.go
+++ b/libgo/go/runtime/debug.go
@@ -125,6 +125,7 @@ func GoroutineProfile(p []StackRecord) (n int, ok bool)
// blocking until data is available. If profiling is turned off and all the profile
// data accumulated while it was on has been returned, CPUProfile returns nil.
// The caller must save the returned data before calling CPUProfile again.
+//
// Most clients should use the runtime/pprof package or
// the testing package's -test.cpuprofile flag instead of calling
// CPUProfile directly.
@@ -133,6 +134,7 @@ func CPUProfile() []byte
// SetCPUProfileRate sets the CPU profiling rate to hz samples per second.
// If hz <= 0, SetCPUProfileRate turns off profiling.
// If the profiler is on, the rate cannot be changed without first turning it off.
+//
// Most clients should use the runtime/pprof package or
// the testing package's -test.cpuprofile flag instead of calling
// SetCPUProfileRate directly.
diff --git a/libgo/go/runtime/extern.go b/libgo/go/runtime/extern.go
index 09d1391d254..2a90113a3a9 100644
--- a/libgo/go/runtime/extern.go
+++ b/libgo/go/runtime/extern.go
@@ -59,11 +59,7 @@ func (f *Func) FileLine(pc uintptr) (file string, line int) {
// implemented in symtab.c
func funcline_go(*Func, uintptr) (string, int)
-// A gccgo specific hook to use debug info to get file/line info.
-func RegisterDebugLookup(func(pc uintptr, function *string, file *string, line *int) bool,
- func(sym string, val *uintptr) bool)
-
-// mid returns the current os thread (m) id.
+// mid returns the current OS thread (m) id.
func mid() uint32
// SetFinalizer sets the finalizer associated with x to f.
diff --git a/libgo/go/runtime/gc_test.go b/libgo/go/runtime/gc_test.go
index 56dd93819e1..283a6812e95 100644
--- a/libgo/go/runtime/gc_test.go
+++ b/libgo/go/runtime/gc_test.go
@@ -10,6 +10,7 @@ import (
)
func TestGcSys(t *testing.T) {
+ defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
memstats := new(runtime.MemStats)
runtime.GC()
runtime.ReadMemStats(memstats)
diff --git a/libgo/go/runtime/mallocrep1.go b/libgo/go/runtime/mallocrep1.go
index 41c104c0ba7..bc33e3a6b4b 100644
--- a/libgo/go/runtime/mallocrep1.go
+++ b/libgo/go/runtime/mallocrep1.go
@@ -39,6 +39,7 @@ func OkAmount(size, n uintptr) bool {
}
func AllocAndFree(size, count int) {
+ defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
if *chatty {
fmt.Printf("size=%d count=%d ...\n", size, count)
}