]> Cypherpunks repositories - gostls13.git/commit
runtime, runtime/pprof: record instantiated symbol name in CPU profile
authorCherry Mui <cherryyz@google.com>
Tue, 2 May 2023 21:15:10 +0000 (17:15 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 5 May 2023 19:53:39 +0000 (19:53 +0000)
commit10ad6c91de1e6de122edb7f5c3f6eae344ee861e
tree9a5ffb6d9d4f348509bb66129d5a24c5647e2136
parent1a612783c5c15e4d69d94877154601b7caddae9d
runtime, runtime/pprof: record instantiated symbol name in CPU profile

For generic functions, the previous CL makes it record the full
instantiated symbol name in the runtime func table. This CL
changes the pprof package to use that name in CPU profile. This
way, it matches the symbol name the compiler sees, so it can apply
PGO.

TODO: add a test.

Fixes #58712.

Change-Id: If40db01cbef5f73c279adcc9c290a757ef6955b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/491678
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
src/runtime/pprof/proto.go
src/runtime/pprof/runtime.go
src/runtime/symtab.go