diff options
| author | Russ Cox <rsc@golang.org> | 2012-02-28 16:18:24 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2012-02-28 16:18:24 -0500 |
| commit | 6e2ae0a12c0f73da56d4f465e68208731b4b16be (patch) | |
| tree | 97b35b94a6880d7eb9a458663e1bfe432e4731e9 /src/pkg/runtime/thread_linux.c | |
| parent | c10f50859ead8f1578e86e65d5f376ae6a3a32df (diff) | |
| download | go-6e2ae0a12c0f73da56d4f465e68208731b4b16be.tar.xz | |
runtime/pprof: support OS X CPU profiling
Work around profiling kernel bug with signal masks.
Still broken on 64-bit Snow Leopard kernel,
but I think we can ignore that one and let people
upgrade to Lion.
Add new trivial tools addr2line and objdump to take
the place of the GNU tools of the same name, since
those are not installed on OS X.
Adapt pprof to invoke 'go tool addr2line' and
'go tool objdump' if the system tools do not exist.
Clean up disassembly of base register on amd64.
Fixes #2008.
R=golang-dev, bradfitz, mikioh.mikioh, r, iant
CC=golang-dev
https://golang.org/cl/5697066
Diffstat (limited to 'src/pkg/runtime/thread_linux.c')
| -rw-r--r-- | src/pkg/runtime/thread_linux.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pkg/runtime/thread_linux.c b/src/pkg/runtime/thread_linux.c index d406a71240..6b428440e0 100644 --- a/src/pkg/runtime/thread_linux.c +++ b/src/pkg/runtime/thread_linux.c @@ -228,7 +228,7 @@ runtime·memlimit(void) Rlimit rl; extern byte text[], end[]; uintptr used; - + if(runtime·getrlimit(RLIMIT_AS, &rl) != 0) return 0; if(rl.rlim_cur >= 0x7fffffff) @@ -249,3 +249,9 @@ runtime·memlimit(void) return rl.rlim_cur - used; } + +void +runtime·setprof(bool on) +{ + USED(on); +} |
