mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: add flag for debugging PC-value tables
For example, `-d pctab=pctoinline` prints the PC-inline table and inlining tree for every function. Change-Id: Ia6b9ce4d83eed0b494318d40ffe06481ec5d58ab Reviewed-on: https://go-review.googlesource.com/37235 Run-TryBot: David Lazar <lazard@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
301149b9e4
commit
0824ae6dc1
4 changed files with 26 additions and 19 deletions
|
|
@ -37,6 +37,7 @@ var (
|
|||
Debug_panic int
|
||||
Debug_slice int
|
||||
Debug_wb int
|
||||
Debug_pctab string
|
||||
)
|
||||
|
||||
// Debug arguments.
|
||||
|
|
@ -59,6 +60,7 @@ var debugtab = []struct {
|
|||
{"typeassert", &Debug_typeassert}, // print information about type assertion inlining
|
||||
{"wb", &Debug_wb}, // print information about write barriers
|
||||
{"export", &Debug_export}, // print export data
|
||||
{"pctab", &Debug_pctab}, // print named pc-value table
|
||||
}
|
||||
|
||||
func usage() {
|
||||
|
|
@ -319,6 +321,9 @@ func Main() {
|
|||
}
|
||||
}
|
||||
|
||||
// set via a -d flag
|
||||
Ctxt.Debugpcln = Debug_pctab
|
||||
|
||||
// enable inlining. for now:
|
||||
// default: inlining on. (debug['l'] == 1)
|
||||
// -l: inlining off (debug['l'] == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue