Open brancz opened 1 year ago
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.
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.