package profile

Import Path
	internal/profile (on golang.org and go.dev)

Dependency Relation
	imports 13 packages, and imported by one package

Involved Source Files
	    encode.go
	    filter.go
	    legacy_profile.go
	    merge.go
	d-> profile.go
	    proto.go
	    prune.go

Exported Type Names

type Demangler (func) Demangler maps symbol names to a human-readable form. This may include C++ demangling and additional simplification. Names that are not demangled may be missing from the resulting map. func (*Profile).Demangle(d Demangler) error
type Function (struct) Function corresponds to Profile.Function Filename string ID uint64 Name string StartLine int64 SystemName string
type Label (struct) Label corresponds to Profile.Label
type Line (struct) Line corresponds to Profile.Line Function *Function Line int64
type Location (struct) Location corresponds to Profile.Location Address uint64 ID uint64 IsFolded bool Line []Line Mapping *Mapping
type Mapping (struct) Mapping corresponds to Profile.Mapping BuildID string File string HasFilenames bool HasFunctions bool HasInlineFrames bool HasLineNumbers bool ID uint64 Limit uint64 Offset uint64 Start uint64
type Profile (struct) Profile is an in-memory representation of profile.proto. Comments []string DefaultSampleType string DropFrames string DurationNanos int64 Function []*Function KeepFrames string Location []*Location Mapping []*Mapping Period int64 PeriodType *ValueType Sample []*Sample SampleType []*ValueType TimeNanos int64 (*T) Aggregate(inlineFrame, function, filename, linenumber, address bool) error (*T) CheckValid() error (*T) Compatible(pb *Profile) error (*T) Copy() *Profile (*T) Demangle(d Demangler) error (*T) Empty() bool (*T) FilterSamplesByName(focus, ignore, hide *regexp.Regexp) (fm, im, hm bool) (*T) FilterSamplesByTag(focus, ignore TagMatch) (fm, im bool) (*T) HasFileLines() bool (*T) HasFunctions() bool (*T) Merge(pb *Profile, r float64) error (*T) Normalize(pb *Profile) error (*T) ParseMemoryMap(rd io.Reader) error (*T) Prune(dropRx, keepRx *regexp.Regexp) (*T) RemoveUninteresting() error (*T) Scale(ratio float64) (*T) ScaleN(ratios []float64) error (*T) String() string (*T) Write(w io.Writer) error *T : expvar.Var *T : fmt.Stringer func Merge(srcs []*Profile) (*Profile, error) func Parse(r io.Reader) (*Profile, error) func ParseTracebacks(b []byte) (*Profile, error) func (*Profile).Copy() *Profile func Merge(srcs []*Profile) (*Profile, error) func (*Profile).Compatible(pb *Profile) error func (*Profile).Merge(pb *Profile, r float64) error func (*Profile).Normalize(pb *Profile) error
type Sample (struct) Sample corresponds to Profile.Sample Label map[string][]string Location []*Location NumLabel map[string][]int64 NumUnit map[string][]string Value []int64
type TagMatch (func) TagMatch selects tags for filtering func (*Profile).FilterSamplesByTag(focus, ignore TagMatch) (fm, im bool)
type ValueType (struct) ValueType corresponds to Profile.ValueType Type string Unit string
Exported Values
var LegacyHeapAllocated bool LegacyHeapAllocated instructs the heapz parsers to use the allocated memory stats instead of the default in-use memory. Note that tcmalloc doesn't provide all allocated memory, only in-use stats.
func Merge(srcs []*Profile) (*Profile, error) Merge merges all the profiles in profs into a single Profile. Returns a new profile independent of the input profiles. The merged profile is compacted to eliminate unused samples, locations, functions and mappings. Profiles must have identical profile sample and period types or the merge will fail. profile.Period of the resulting profile will be the maximum of all profiles, and profile.TimeNanos will be the earliest nonzero one.
func Parse(r io.Reader) (*Profile, error) Parse parses a profile and checks for its validity. The input may be a gzip-compressed encoded protobuf or one of many legacy profile formats which may be unsupported in the future.
func ParseTracebacks(b []byte) (*Profile, error) ParseTracebacks parses a set of tracebacks and returns a newly populated profile. It will accept any text file and generate a Profile out of it with any hex addresses it can identify, including a process map if it can recognize one. Each sample will include a tag "source" with the addresses recognized in string format.