Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow binary override for profiles with no mappings #89

Merged
merged 1 commit into from
Feb 17, 2017

Conversation

rauls5382
Copy link
Contributor

The go runtime generates profiles in profile.proto format
without symbols or mappings. The expectation is that these
can be symbolized by passing the binary name to pprof.

The mechanism pprof uses relies to override the binary relies
on there being a mapping, and previously we moved the creation
of fake mappings to the legacy profile handlers, so profiles
parsed from profile.proto with no mappings can no longer be
symbolized.

Special case this situation to create a fake mapping and associate
all locations to it if there is a command line override but no
mappings.

@aalexand
Copy link
Collaborator

The change looks good. Can you add a comment in the source code about this specificity of profiles generated by Go runtime?

As a more general question: these profiles won't symbolize for any shared objects or if the executable is PIC & ASLR'ed?

The go runtime generates profiles in profile.proto format
without symbols or mappings. The expectation is that these
can be symbolized by passing the binary name to pprof.

The mechanism pprof uses relies to override the binary relies
on there being a mapping, and previously we moved the creation
of fake mappings to the legacy profile handlers, so profiles
parsed from profile.proto with no mappings can no longer be
symbolized.

Special case this situation to create a fake mapping and associate
all locations to it if there is a command line override but no
mappings.
@rauls5382
Copy link
Contributor Author

That's correct, symbolization with a fake mapping is only possible with a non-ASLR binary.
Added comments explaining this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants