symbolizer

Imports

Imports #

"fmt"
"io"
"net/http"
"net/url"
"path/filepath"
"strings"
"github.com/google/pprof/internal/binutils"
"github.com/google/pprof/internal/plugin"
"github.com/google/pprof/internal/symbolz"
"github.com/google/pprof/profile"
"github.com/ianlancetaylor/demangle"

Constants & Variables

demangleFunction var #

var demangleFunction = Demangle

localSymbolize var #

var localSymbolize = doLocalSymbolize

symbolzSymbolize var #

test taps for dependency injection

var symbolzSymbolize = symbolz.Symbolize

Structs

Symbolizer struct #

Symbolizer implements the plugin.Symbolize interface.

type Symbolizer struct {
Obj plugin.ObjTool
UI plugin.UI
Transport http.RoundTripper
}

Functions

Demangle function #

Demangle updates the function names in a profile with demangled C++ names, simplified according to demanglerMode. If force is set, overwrite any names that appear already demangled.

func Demangle(prof *profile.Profile, force bool, demanglerMode string)

Symbolize method #

Symbolize attempts to symbolize profile p. First uses binutils on local binaries; if the source is a URL it attempts to get any missed entries using symbolz.

func (s *Symbolizer) Symbolize(mode string, sources plugin.MappingSources, p *profile.Profile) error

demangleSingleFunction function #

func demangleSingleFunction(fn *profile.Function, options []demangle.Option)

demanglerModeToOptions function #

func demanglerModeToOptions(demanglerMode string) []demangle.Option

doLocalSymbolize function #

doLocalSymbolize adds symbol and line number information to all locations in a profile. mode enables some options to control symbolization.

func doLocalSymbolize(prof *profile.Profile, fast bool, force bool, obj plugin.ObjTool, ui plugin.UI) error

looksLikeDemangledCPlusPlus function #

looksLikeDemangledCPlusPlus is a heuristic to decide if a name is the result of demangling C++. If so, further heuristics will be applied to simplify the name.

func looksLikeDemangledCPlusPlus(demangled string) bool

postURL function #

postURL issues a POST to a URL over HTTP.

func postURL(source string, post string, tr http.RoundTripper) ([]byte, error)

removeMatching function #

removeMatching removes nested instances of start..end from name.

func removeMatching(name string, start byte, end byte) string

statusCodeError function #

func statusCodeError(resp *http.Response) error

symbolizeOneMapping function #

func symbolizeOneMapping(m *profile.Mapping, locs []*profile.Location, obj plugin.ObjFile, addFunction func(*profile.Function) *profile.Function)

Generated with Arrow