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

Function unsourceMappings

internal/driver/fetch.go:392–400  ·  view source on GitHub ↗

unsourceMappings iterates over the mappings in a profile and replaces file set to the remote source URL by collectMappingSources back to empty string.

(p *profile.Profile)

Source from the content-addressed store, hash-verified

390// unsourceMappings iterates over the mappings in a profile and replaces file
391// set to the remote source URL by collectMappingSources back to empty string.
392func unsourceMappings(p *profile.Profile) {
393 for _, m := range p.Mapping {
394 if m.BuildID == "" && filepath.VolumeName(m.File) == "" {
395 if u, err := url.Parse(m.File); err == nil && u.IsAbs() {
396 m.File = ""
397 }
398 }
399 }
400}
401
402// locateBinaries searches for binary files listed in the profile and, if found,
403// updates the profile accordingly.

Callers 2

TestUnsourceMappingsFunction · 0.85
fetchProfilesFunction · 0.85

Calls 1

ParseMethod · 0.65

Tested by 1

TestUnsourceMappingsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…