Search code examples
gopprof

What are the dashed/dotted lines in Go's pprof web output?


In the web output of go tool pprof, what are the dashed/dotted lines?

I find some mention that it could represent inlined functions, but there's no canonical reference.


Solution

  • Dotted lines represent nodes' connection through another node, which is not rendered in final output.

    See https://github.com/google/pprof/blob/master/internal/graph/dotgraph.go#L311

    if e.residual {
        attr = attr + ` style="dotted"`
    }
    

    and residual stands for

    // residual edges connect nodes that were connected through a separate node, which has been removed from the report.

    https://github.com/google/pprof/blob/main/internal/graph/graph.go#L255-L257