diff options
| author | Russ Cox <rsc@golang.org> | 2011-03-23 11:43:37 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2011-03-23 11:43:37 -0400 |
| commit | c19b373c8ab8eca47a9fd02b97d8492cc099ef10 (patch) | |
| tree | 3b497adbbf4825f10de5e7b82e84634e7ad6b20d /src/pkg/runtime/amd64 | |
| parent | f9fc1ddf75b33f73787024c0cb47b15b5a40c2cb (diff) | |
| download | go-c19b373c8ab8eca47a9fd02b97d8492cc099ef10.tar.xz | |
runtime: cpu profiling support
R=r
CC=golang-dev
https://golang.org/cl/4306043
Diffstat (limited to 'src/pkg/runtime/amd64')
| -rw-r--r-- | src/pkg/runtime/amd64/traceback.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pkg/runtime/amd64/traceback.c b/src/pkg/runtime/amd64/traceback.c index 0f6733c364..d422cb6922 100644 --- a/src/pkg/runtime/amd64/traceback.c +++ b/src/pkg/runtime/amd64/traceback.c @@ -18,8 +18,8 @@ void runtime·morestack(void); // as well as the runtime.Callers function (pcbuf != nil). // A little clunky to merge the two but avoids duplicating // the code and all its subtlety. -static int32 -gentraceback(byte *pc0, byte *sp, G *g, int32 skip, uintptr *pcbuf, int32 max) +int32 +runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *g, int32 skip, uintptr *pcbuf, int32 max) { byte *p; int32 i, n, iter, sawnewstack; @@ -28,6 +28,7 @@ gentraceback(byte *pc0, byte *sp, G *g, int32 skip, uintptr *pcbuf, int32 max) Stktop *stk; Func *f; + USED(lr0); pc = (uintptr)pc0; lr = 0; fp = nil; @@ -199,7 +200,7 @@ gentraceback(byte *pc0, byte *sp, G *g, int32 skip, uintptr *pcbuf, int32 max) void runtime·traceback(byte *pc0, byte *sp, byte*, G *g) { - gentraceback(pc0, sp, g, 0, nil, 100); + runtime·gentraceback(pc0, sp, nil, g, 0, nil, 100); } int32 @@ -211,7 +212,7 @@ runtime·callers(int32 skip, uintptr *pcbuf, int32 m) sp = (byte*)&skip; pc = runtime·getcallerpc(&skip); - return gentraceback(pc, sp, g, skip, pcbuf, m); + return runtime·gentraceback(pc, sp, nil, g, skip, pcbuf, m); } static uintptr |
