Skip to content

Conversation

@ddelnano
Copy link
Member

@ddelnano ddelnano commented Jun 4, 2025

Summary: Add GoOffsetLocator that fulfills DwarfReader APIs. Use as shim for Go Uprobes

Our current Go uprobe implementation relies on parsing DWARF information. This is memory intensive and is not ideal if end users want to keep the PEM's memory usage low (results in 100-150MB memory spikes).

In order to support lower memory uprobes and to support Go binaries without DWARF, we can introduce a shim for the existing DwarfReader API that can read the offsets from a file (via openteletrmy-go-instrumentation generated offsets) or from the existing DWARF information.

This PR introduces the GoOffsetLocator and tests that it functions properly while leaving the DWARF based tracing in place. The next set of changes will populate the offsets from pixie-io/opentelemetry-go-instrumentation#1 and provide configuration to choose the desired implementation: solely DWARF, solely static offsets or to use them in tandem.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: Existing Go bpf trace tests should pass

@ddelnano ddelnano force-pushed the ddelnano/add-go-offset-locator branch from f68e5f1 to 933c1e6 Compare July 8, 2025 15:58
@ddelnano ddelnano force-pushed the ddelnano/add-go-offset-locator branch from 933c1e6 to 5093e7d Compare July 9, 2025 18:02
@ddelnano ddelnano force-pushed the ddelnano/add-go-offset-locator branch from 5093e7d to b67f84c Compare July 9, 2025 18:05
@ddelnano ddelnano merged commit 5b20e35 into pixie-io:main Jul 9, 2025
40 of 42 checks passed
@ddelnano ddelnano deleted the ddelnano/add-go-offset-locator branch July 9, 2025 20:04
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

Successfully merging this pull request may close these issues.

2 participants