diff options
| author | Robert Griesemer <gri@golang.org> | 2018-11-01 13:46:50 -0700 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2018-11-02 22:17:47 +0000 |
| commit | e25823edcea364df70b8db7462f53e7dac2b8fca (patch) | |
| tree | d448d1e9abf3358569e02ac7ca8d128e25a7ae82 /src/database/sql | |
| parent | c21ba09bcd83e58e862b1acc676dc36f31444022 (diff) | |
| download | go-e25823edcea364df70b8db7462f53e7dac2b8fca.tar.xz | |
cmd/compile/internal/gc: add tracing support to debug type checking
The compiler must first be built with the constant enableTrace set
to true (typecheck.go). After that, the -t flag becomes available
which enables tracing output of type-checking functions.
With enableTrace == false, the tracing code becomes dead code
and won't affect the compiler.
Typical output might look like this:
path/y.go:4:6: typecheck 0xc00033e180 DCLTYPE <node DCLTYPE> tc=0
path/y.go:4:6: . typecheck1 0xc00033e180 DCLTYPE <node DCLTYPE> tc=2
path/y.go:4:6: . . typecheck 0xc000331a40 TYPE T tc=1
path/y.go:4:6: . . . typecheck1 0xc000331a40 TYPE T tc=2
path/y.go:4:6: . . . . typecheckdef 0xc000331a40 TYPE T tc=2
path/y.go:4:6: . . . . => 0xc000331a40 TYPE T tc=2 type=*T
path/y.go:4:6: . . . => 0xc000331a40 TYPE T tc=2 type=*T
path/y.go:4:6: . . => 0xc000331a40 TYPE T tc=1 type=*T
path/y.go:4:6: . => 0xc00033e180 DCLTYPE <node DCLTYPE> tc=2 type=<T>
path/y.go:4:6: => 0xc00033e180 DCLTYPE <node DCLTYPE> tc=1 type=<T>
Disabled by default.
Change-Id: Ifd8385290d1cf0d3fc5e8468b2f4ab84e8eff338
Reviewed-on: https://go-review.googlesource.com/c/146782
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions
