• David Chase's avatar
    cmd/compile: add debugging and stats output to numberlines · fba60669
    David Chase authored
    This is useful for debugging line number assignment and
    also for making sense of pathological line number inputs.
    
    Activated with
    -gcflags=-d=ssa/number_lines/stats=1 (the bit matters)
    -gcflags=-d=ssa/number_lines/debug
    
    Stats:
    "SUM_LINE_RANGE",
       SUM for f in files {MAX line in f {line}-MIN line in f {line}}
    "MAXMIN_LINE_RANGE",
       MAX for f in files {MAX line in f {line}} -
       MIN for f in files {MIN line in f {line}}
    "MAXFILE", maxfile,
       MAX for f in files {f}
    "NFILES", len(entries)
       | files |
    
    Change-Id: I8a7336e6370452fe2e3a62de17606db9bd6a6fd3
    Reviewed-on: https://go-review.googlesource.com/c/go/+/174947
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarKeith Randall <khr@golang.org>
    fba60669
numberlines.go 8.04 KB