diff options
| author | Rémy Oudompheng <oudomphe@phare.normalesup.org> | 2014-08-21 08:07:42 +0200 |
|---|---|---|
| committer | Rémy Oudompheng <oudomphe@phare.normalesup.org> | 2014-08-21 08:07:42 +0200 |
| commit | 04487d5612cd3adc7dde217e736b73fb37af1ee5 (patch) | |
| tree | e5573cb2b42d97c393305263c7cfd5bd16f63256 /src/pkg/runtime/debug.go | |
| parent | cccd66c6c446fb2d4f2ee74259898d0acb8ec803 (diff) | |
| download | go-04487d5612cd3adc7dde217e736b73fb37af1ee5.tar.xz | |
runtime: convert MemProfile, BlockProfile, ThreadCreateProfile to Go.
LGTM=khr
R=golang-codereviews, bradfitz, khr
CC=golang-codereviews
https://golang.org/cl/123680043
Diffstat (limited to 'src/pkg/runtime/debug.go')
| -rw-r--r-- | src/pkg/runtime/debug.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/pkg/runtime/debug.go b/src/pkg/runtime/debug.go index d82afb08ec..393598c28a 100644 --- a/src/pkg/runtime/debug.go +++ b/src/pkg/runtime/debug.go @@ -75,20 +75,6 @@ func (r *MemProfileRecord) Stack() []uintptr { return r.Stack0[0:] } -// MemProfile returns n, the number of records in the current memory profile. -// If len(p) >= n, MemProfile copies the profile into p and returns n, true. -// If len(p) < n, MemProfile does not change p and returns n, false. -// -// If inuseZero is true, the profile includes allocation records -// where r.AllocBytes > 0 but r.AllocBytes == r.FreeBytes. -// These are sites where memory was allocated, but it has all -// been released back to the runtime. -// -// Most clients should use the runtime/pprof package or -// the testing package's -test.memprofile flag instead -// of calling MemProfile directly. -func MemProfile(p []MemProfileRecord, inuseZero bool) (n int, ok bool) - // A StackRecord describes a single execution stack. type StackRecord struct { Stack0 [32]uintptr // stack trace for this record; ends at first 0 entry @@ -105,14 +91,6 @@ func (r *StackRecord) Stack() []uintptr { return r.Stack0[0:] } -// ThreadCreateProfile returns n, the number of records in the thread creation profile. -// If len(p) >= n, ThreadCreateProfile copies the profile into p and returns n, true. -// If len(p) < n, ThreadCreateProfile does not change p and returns n, false. -// -// Most clients should use the runtime/pprof package instead -// of calling ThreadCreateProfile directly. -func ThreadCreateProfile(p []StackRecord) (n int, ok bool) - // GoroutineProfile returns n, the number of records in the active goroutine stack profile. // If len(p) >= n, GoroutineProfile copies the profile into p and returns n, true. // If len(p) < n, GoroutineProfile does not change p and returns n, false. @@ -156,15 +134,6 @@ type BlockProfileRecord struct { StackRecord } -// BlockProfile returns n, the number of records in the current blocking profile. -// If len(p) >= n, BlockProfile copies the profile into p and returns n, true. -// If len(p) < n, BlockProfile does not change p and returns n, false. -// -// Most clients should use the runtime/pprof package or -// the testing package's -test.blockprofile flag instead -// of calling BlockProfile directly. -func BlockProfile(p []BlockProfileRecord) (n int, ok bool) - // Stack formats a stack trace of the calling goroutine into buf // and returns the number of bytes written to buf. // If all is true, Stack formats stack traces of all other goroutines |
