diff options
| author | Russ Cox <rsc@golang.org> | 2010-03-24 09:40:09 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-03-24 09:40:09 -0700 |
| commit | 6eb251f244b8ba595613375ab5965e81531178d5 (patch) | |
| tree | be3e0a26dd6692d4249de70bb3703c939ece7add /src/pkg/runtime/runtime.c | |
| parent | 6b6c3993d55ed71d3e5ca41b9f4cd8dc77c5876c (diff) | |
| download | go-6eb251f244b8ba595613375ab5965e81531178d5.tar.xz | |
runtime: malloc sampling, pprof interface
R=r
CC=golang-dev
https://golang.org/cl/719041
Diffstat (limited to 'src/pkg/runtime/runtime.c')
| -rw-r--r-- | src/pkg/runtime/runtime.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c index f4882d8bdf..aa6d82506e 100644 --- a/src/pkg/runtime/runtime.c +++ b/src/pkg/runtime/runtime.c @@ -210,7 +210,7 @@ void ·getgoroot(String out) { byte *p; - + p = getenv("GOROOT"); out = gostring(p); FLUSH(&out); @@ -475,7 +475,7 @@ nanotime(void) { int64 sec; int32 usec; - + sec = 0; usec = 0; gettime(&sec, &usec); @@ -507,3 +507,10 @@ void retn = callers(skip, (uintptr*)pc.array, pc.len); FLUSH(&retn); } + +void +·FuncForPC(uintptr pc, void *retf) +{ + retf = findfunc(pc); + FLUSH(&retf); +} |
