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

Add elf type and load segment information to mapping #808

Open
brancz opened this issue Oct 16, 2023 · 1 comment
Open

Add elf type and load segment information to mapping #808

brancz opened this issue Oct 16, 2023 · 1 comment

Comments

@brancz
Copy link
Contributor

brancz commented Oct 16, 2023

What version of pprof are you using?

This is about pprof as a format, not the toolchain.

What operating system and processor architecture are you using?

Linux amd64 and arm64

What did you do?

We operate a profiling service and among other things, we allow users to send profiling data in pprof format to our service.

The service can perform asynchronous symbolization, where the production binary doesn't have to contain symbols, and the server side will perform symbolization at some undefined point in time. The time at which the receiving side receives debuginfo is also not defined. Debuginfo may not contain the .text section, but only DWARF sections for symbolization purposes.

The problem is, same as the pprof toolchain getting the Base for "normalization" purposes we need the same information, but pprof provides no fields to set this. The convenient thing about having it in the format is that by definition wherever the profiling data is recorded, the .text section must be present, as it's required for the execution of the binary.

Without this information asynchronous symbolization is going to be incorrect, which is especially common for position-independent executables.

What did you expect to see?

Fields to communicate elf type, load segment offset, and vaddr to the toolchain per mapping.

What did you see instead?

Symbolization errors with position-independent executables because the debuginfo doesn't have the .text section, and the pprof profile can't communicate it to the toolchain either.

@brancz
Copy link
Contributor Author

brancz commented Oct 17, 2023

For clarification: I'm not proposing to make these fields required, merely possible to be specified and optional, the toolchain could decide to prefer the header of a .text section if available in the debuginfo, but if not available then use what's specified in these fields.

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

No branches or pull requests

1 participant