]> Cypherpunks repositories - gostls13.git/commit
runtime,runtime/pprof: get memory mappings on darwin.
authorCosmos Nicolaou <cosmos.nicolaou@gmail.com>
Wed, 14 Jun 2023 21:33:43 +0000 (14:33 -0700)
committerCherry Mui <cherryyz@google.com>
Thu, 3 Aug 2023 16:07:59 +0000 (16:07 +0000)
commitb7c826d2c4576dbe04a79ab7d0dfa03c722c0ab9
tree3da7ecc90e526b16339b493d61a07d91f7b87dab
parentd50272a8c17920d0eac2d765194d4cd0355a1d34
runtime,runtime/pprof: get memory mappings on darwin.

Displaying assembly language has never worked for Apple Silicon
macs (see #50891). This change uses mach_vm_region to obtain the
necessary VM mappings to allow for locating assembly instructions
for a cpu profile.

Fixes #50891

Change-Id: Ib968c55a19b481b82f63337276b552f3b18f69d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/503919
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
17 files changed:
src/cmd/internal/objfile/macho.go
src/cmd/pprof/pprof_test.go
src/runtime/defs_darwin.go
src/runtime/defs_darwin_amd64.go
src/runtime/defs_darwin_arm64.go
src/runtime/pprof/defs_darwin.go [new file with mode: 0644]
src/runtime/pprof/defs_darwin_amd64.go [new file with mode: 0644]
src/runtime/pprof/defs_darwin_arm64.go [new file with mode: 0644]
src/runtime/pprof/proto_darwin.go [new file with mode: 0644]
src/runtime/pprof/proto_other.go
src/runtime/pprof/proto_test.go
src/runtime/pprof/proto_windows.go
src/runtime/pprof/vminfo_darwin.go [new file with mode: 0644]
src/runtime/pprof/vminfo_darwin_test.go [new file with mode: 0644]
src/runtime/sys_darwin.go
src/runtime/sys_darwin_amd64.s
src/runtime/sys_darwin_arm64.s