-
Notifications
You must be signed in to change notification settings - Fork 4
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 identification of golang binaries #179
Add identification of golang binaries #179
Conversation
Related: Granulate/gprofiler#817 |
Btw this change will have a side effect of greatly improving the performance (iterating over sections is much less work than iterating over symbols), helping for Granulate/gprofiler#696 cause. |
granulate_utils/linux/elf.py
Outdated
""" | ||
with open_elf(elf) as elf: | ||
build_id_section = elf.get_section_by_name(".note.gnu.build-id") | ||
build_id_section = elf.get_section_by_name(section) |
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 name it note_section as it's not necessarily a build-id one anymore
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.
One final small comment.
Other than that I'll have to review the usage of changed functions (is_golang_process
and get_elf_buildid
) in other project which use granulate-utils to ensure compatibility is kept.
If you find any other use, then I'll split this into lower-level |
No problematic usages. I'm ready to merge this - just waiting on your reply on the last comment. |
Support identification of Golang binaries by looking for ELF section
.note.go.buildid
, supported since Go 1.5.Reference: golang/go#11048.