MCPcopy Create free account
hub / github.com/google/pprof / nodeInfo

Function nodeInfo

internal/graph/graph.go:606–627  ·  view source on GitHub ↗
(l *profile.Location, line profile.Line, objfile string, o *Options)

Source from the content-addressed store, hash-verified

604}
605
606func nodeInfo(l *profile.Location, line profile.Line, objfile string, o *Options) NodeInfo {
607 if line.Function == nil {
608 return NodeInfo{Address: l.Address, Objfile: objfile}
609 }
610 ni := NodeInfo{
611 Address: l.Address,
612 Lineno: int(line.Line),
613 Columnno: int(line.Column),
614 Name: line.Function.Name,
615 }
616 if fname := line.Function.Filename; fname != "" {
617 ni.File = filepath.Clean(fname)
618 }
619 if o.OrigFnNames {
620 ni.OrigName = line.Function.SystemName
621 }
622 if o.ObjNames || (ni.Name == "" && ni.OrigName == "") {
623 ni.Objfile = objfile
624 ni.StartLine = int(line.Function.StartLine)
625 }
626 return ni
627}
628
629type tags struct {
630 t []*Tag

Callers 1

findOrInsertLineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…