runtime: testing runtime

This commit is contained in:
Li Jie
2025-02-14 17:18:13 +08:00
parent 66909b3000
commit 5329f28580
83 changed files with 3376 additions and 2061 deletions

View File

@@ -4,6 +4,10 @@
package runtime
import (
"runtime"
)
// Layout of in-memory per-function information prepared by linker
// See https://golang.org/s/go12symtab.
// Keep in sync with linker (../cmd/link/internal/ld/pcln.go:/pclntab)
@@ -11,3 +15,33 @@ package runtime
type _func struct {
unused [8]byte
}
func Stack(buf []byte, all bool) int {
panic("todo: runtime.Stack")
}
func StartTrace() error {
panic("todo: runtime.StartTrace")
}
func ReadTrace() []byte {
panic("todo: runtime.ReadTrace")
}
func StopTrace() {
panic("todo: runtime.StopTrace")
}
func ReadMemStats(m *runtime.MemStats) {
panic("todo: runtime.ReadMemStats")
}
func SetMutexProfileFraction(rate int) int {
panic("todo: runtime.SetMutexProfileFraction")
}
func SetBlockProfileRate(rate int) {
panic("todo: runtime.SetBlockProfileRate")
}
var MemProfileRate int = 512 * 1024