interpreter/golables: use .gopclntab for symbol lookup#728
Merged
christos68k merged 5 commits intomainfrom Aug 29, 2025
Merged
Conversation
…irect case Use the mmap backed .gopclntab to lookup symbols for golabels. While further investigating the topic, a case with an indirect offset was also identified: ``` $ objdump -S -d go/src/github.com/open-telemetry/opentelemetry-ebpf-profiler/ebpf-profiler | grep -A 3 'runtime.stackcheck' 0000000000480700 <runtime.stackcheck.abi0>: 480700: 64 48 8b 04 25 f8 ff mov %fs:0xfffffffffffffff8,%rax 480707: ff ff 480709: 48 39 60 08 cmp %rsp,0x8(%rax) 48070d: 77 05 ja 480714 <runtime.stackcheck.abi0+0x14> $ sudo objdump -S -d elastic-agent-9.1.1-51565f/elastic-agent | grep -A 3 8945a20 0000000008945a20 <runtime.stackcheck.abi0@@base>: 8945a20: 48 8b 0d a1 c5 d0 17 mov 0x17d0c5a1(%rip),%rcx # 20651fc8 <runtime.tlsg@@base+0x20651fc8> 8945a27: 64 48 8b 01 mov %fs:(%rcx),%rax 8945a2b: 48 39 60 08 cmp %rsp,0x8(%rax) 8945a2f: 77 05 ja 8945a36 <runtime.stackcheck.abi0@@base+0x16> ``` Supersedes #719 Fixes #718 Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
fabled
reviewed
Aug 26, 2025
Contributor
fabled
left a comment
There was a problem hiding this comment.
See the comment for extractOffsetFromBytes on rebasing reasons.
This said, could you rebase this on top of the other PR, and include:
- the gopclntab symbol lookup
- the amd64 unit test cases for extracting offset
- if time permits, add arm64 unit test cases for extracting the offset
Otherwise looks good. Thanks!
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
fabled
reviewed
Aug 26, 2025
Contributor
fabled
left a comment
There was a problem hiding this comment.
Implementation looks good, API could be made to be same as in other similar places.
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
fabled
reviewed
Aug 27, 2025
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
christos68k
approved these changes
Aug 29, 2025
gnurizen
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Sep 30, 2025
…y#728) Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
umanwizard
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Feb 17, 2026
…y#728) Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
umanwizard
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Feb 18, 2026
…y#728) Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the mmap backed .gopclntab to lookup symbols for golabels.
Supersedes #719 Fixes #718