]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: support OS X CPU profiling
authorRuss Cox <rsc@golang.org>
Tue, 28 Feb 2012 21:18:24 +0000 (16:18 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 28 Feb 2012 21:18:24 +0000 (16:18 -0500)
commit6e2ae0a12c0f73da56d4f465e68208731b4b16be
tree97b35b94a6880d7eb9a458663e1bfe432e4731e9
parentc10f50859ead8f1578e86e65d5f376ae6a3a32df
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
27 files changed:
misc/pprof
src/cmd/addr2line/main.c [new file with mode: 0644]
src/cmd/dist/build.c
src/cmd/objdump/main.c [new file with mode: 0644]
src/libmach/8db.c
src/pkg/runtime/lock_futex.c
src/pkg/runtime/lock_sema.c
src/pkg/runtime/os_darwin.h
src/pkg/runtime/os_freebsd.h
src/pkg/runtime/os_netbsd.h
src/pkg/runtime/os_openbsd.h
src/pkg/runtime/pprof/pprof.go
src/pkg/runtime/pprof/pprof_test.go
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.h
src/pkg/runtime/signal_darwin_386.c
src/pkg/runtime/signal_darwin_amd64.c
src/pkg/runtime/signal_unix.c
src/pkg/runtime/sys_darwin_386.s
src/pkg/runtime/sys_darwin_amd64.s
src/pkg/runtime/thread_darwin.c
src/pkg/runtime/thread_freebsd.c
src/pkg/runtime/thread_linux.c
src/pkg/runtime/thread_netbsd.c
src/pkg/runtime/thread_openbsd.c
src/pkg/runtime/thread_plan9.c
src/pkg/runtime/thread_windows.c