-
Notifications
You must be signed in to change notification settings - Fork 0
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
[PROF-10953] feat: Add GoPCLnTab support as SymbolSource #52
Conversation
ab8e393
to
9c7bdca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I only managed to spend a few minutes lookin this over, so ideally somebody else can take a look as well. If not I'll try to make more time tomorrow.
fe0b3b6
to
40af65c
Compare
bd936a3
to
ff1a0ce
Compare
817a0a3
to
a321f29
Compare
97a6d80
to
3042a47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great feature!
Happy to consider more of the filtering logics in later PRs
bfa87ba
to
62d3925
Compare
This change adds support for uploading the .gopclntab section to SymbolUploader. This is disabled by default, and can be enabled by using the `--upload-gopclntab` CLI flag.
62d3925
to
600e782
Compare
pclntab/pclntab.go
Outdated
if !goFuncEndFound { | ||
// Iterate over the functions to find the maximum offset of the inline tree. | ||
maxInlineTreeOffset := goPCLnTabInfo.findMaxInlineTreeOffset() | ||
// If the inline tree offset is found, truncate the goFunc data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this fail? If we can't find the offset will we fail to truncate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it fails, then goFunc is now discarded
c8ea0f3
to
a83721c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 🚀
What does this PR do?
This change adds support for uploading the
.gopclntab
section to SymbolUploader.This is disabled by default, and can be enabled by using the
--upload-gopclntab
CLI flag.Motivation
Go executables always have a gopclntab section that contain symbol information and can be used to symbolicate addresses even when executable is stripped.
The new 'gopclntab' symbol source has a higher precedence than 'symbol_table' but lower than 'debug_info'. The rationale is that gopclntab covers only Go code, if the executable embeds some C/C++/Rust, then those parts will be described by dwarf. We want to prioritize symbol sources that potentially cover all executable (for example if executable is stripped, profiler will upload symbol information with 'gopclntab' as source, and later on an unstripped version could be uploaded with datadog-ci with 'debug_info' as source and will replace the existing symbols).