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

Improve Golang arm64 native unwinder #342

Open
fabled opened this issue Feb 4, 2025 · 1 comment
Open

Improve Golang arm64 native unwinder #342

fabled opened this issue Feb 4, 2025 · 1 comment

Comments

@fabled
Copy link
Contributor

fabled commented Feb 4, 2025

Currently the Golang native unwinder generates separate stack deltas when unwinding using LR or SP.

Since then the framepointers should be fixed, see e.g. golang/go#58432

Investigate if it would be possible to now use frame pointer unwinding on Golang/arm64. This requires a new unwind instruction to unwind using lr or fp depending on whether we are on leaf frame or not, and to detect if the Go runtime has proper frame pointers.

@fabled
Copy link
Contributor Author

fabled commented Feb 4, 2025

There seems to be also inconsistency in the code. In https://github.com/open-telemetry/opentelemetry-ebpf-profiler/blob/main/nativeunwind/elfunwindinfo/elfgopclntab.go#L269-L273 it is declared that frame pointers are used, but in real life the code at https://github.com/open-telemetry/opentelemetry-ebpf-profiler/blob/main/nativeunwind/elfunwindinfo/elfgopclntab.go#L640-L673 ends up using stack deltas regardless of the strategy selected.

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