OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the types float and complex.
[pf3gnuchains/gcc-fork.git]
/
libgo
/
go
/
runtime
/
debug.go
diff --git
a/libgo/go/runtime/debug.go
b/libgo/go/runtime/debug.go
index
b5f6571
..
803ea49
100644
(file)
--- a/
libgo/go/runtime/debug.go
+++ b/
libgo/go/runtime/debug.go
@@
-4,6
+4,8
@@
package runtime
package runtime
+import "unsafe"
+
// Breakpoint() executes a breakpoint trap.
func Breakpoint()
// Breakpoint() executes a breakpoint trap.
func Breakpoint()
@@
-26,6
+28,9
@@
func GOMAXPROCS(n int) int
// Cgocalls returns the number of cgo calls made by the current process.
func Cgocalls() int64
// Cgocalls returns the number of cgo calls made by the current process.
func Cgocalls() int64
+// Goroutines returns the number of goroutines that currently exist.
+func Goroutines() int32
+
type MemStatsType struct {
// General statistics.
// Not locked during update; approximate.
type MemStatsType struct {
// General statistics.
// Not locked during update; approximate.
@@
-34,6
+39,7
@@
type MemStatsType struct {
Sys uint64 // bytes obtained from system (should be sum of XxxSys below)
Lookups uint64 // number of pointer lookups
Mallocs uint64 // number of mallocs
Sys uint64 // bytes obtained from system (should be sum of XxxSys below)
Lookups uint64 // number of pointer lookups
Mallocs uint64 // number of mallocs
+ Frees uint64 // number of frees
// Main allocation heap statistics.
HeapAlloc uint64 // bytes allocated and still in use
// Main allocation heap statistics.
HeapAlloc uint64 // bytes allocated and still in use
@@
-55,11
+61,12
@@
type MemStatsType struct {
BuckHashSys uint64 // profiling bucket hash table
// Garbage collector statistics.
BuckHashSys uint64 // profiling bucket hash table
// Garbage collector statistics.
- NextGC uint64
- PauseNs uint64
- NumGC uint32
- EnableGC bool
- DebugGC bool
+ NextGC uint64
+ PauseTotalNs uint64
+ PauseNs [256]uint64 // most recent GC pause times
+ NumGC uint32
+ EnableGC bool
+ DebugGC bool
// Per-size allocation statistics.
// Not locked during update; approximate.
// Per-size allocation statistics.
// Not locked during update; approximate.
@@
-70,6
+77,15
@@
type MemStatsType struct {
}
}
}
}
+var Sizeof_C_MStats int // filled in by malloc.goc
+
+func init() {
+ if Sizeof_C_MStats != unsafe.Sizeof(MemStats) {
+ println(Sizeof_C_MStats, unsafe.Sizeof(MemStats))
+ panic("MStats vs MemStatsType size mismatch")
+ }
+}
+
// MemStats holds statistics about the memory system.
// The statistics are only approximate, as they are not interlocked on update.
var MemStats MemStatsType
// MemStats holds statistics about the memory system.
// The statistics are only approximate, as they are not interlocked on update.
var MemStats MemStatsType