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

Method matchedLines

profile/filter.go:213–227  ·  view source on GitHub ↗

matchedLines returns the lines in the location that match the regular expression.

(re *regexp.Regexp)

Source from the content-addressed store, hash-verified

211// matchedLines returns the lines in the location that match
212// the regular expression.
213func (loc *Location) matchedLines(re *regexp.Regexp) []Line {
214 if m := loc.Mapping; m != nil && re.MatchString(m.File) {
215 return loc.Line
216 }
217 var lines []Line
218 for _, ln := range loc.Line {
219 if fn := ln.Function; fn != nil {
220 if !re.MatchString(fn.Name) && !re.MatchString(fn.Filename) {
221 continue
222 }
223 }
224 lines = append(lines, ln)
225 }
226 return lines
227}
228
229// focusedAndNotIgnored looks up a slice of ids against a map of
230// focused/ignored locations. The map only contains locations that are

Callers 1

FilterSamplesByNameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected