Reset mapping file to empty string if it was patched to be the source URL.
When the source is remote and a mapping doesn't have either build ID or
file field set, the file field is set to the source URL so that the
proper source from the source mapping is used during symbolz processing.
Before this change, the file field would continue to point to the URL
producing the URL in pprof output which confuses users.
With the change it resets the file field back to the empty string. It
also now skips the URL-like paths during local symbolization as
reading at that path is not going to succeed.
We discussed switching to generating more unique IDs. On the second
thought, I propose leaving these to be URLs as that seems unique enough
and in case this field leaks into the tool or log output seeing the URL
seems still friendlier than some arbitrarily prefixed string.
Only do Seek if there is an EOF in the perf fetcher
This is to handle the case where we have a file that is smaller than the
perf.data header, but is still (or can be converted in another way) a
valid profile.proto.
This will enable symbolization support for Go on Mac OS
It re-enables symbolization using debug/pprof/symbol on
Go profiles in the legacy format, and implements basic
mach-O support on the binutils package.
pprof fetches profiles concurrently, which allows to profile multiple running
servers concurrently. However, this may translate into a large use of memory
if many profiles are merged, as pprof attempts to decode all profiles in parallel.
Limit the concurrency by chunking the concurrent fetches in groups of up to
64 profiles.