pixie icon indicating copy to clipboard operation
pixie copied to clipboard

Add GoOffsetLocator that fulfills DwarfReader API. Use as shim for Go Uprobes

Open ddelnano opened this issue 6 months ago • 0 comments

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 https://github.com/pixie-io/opentelemetry-go-instrumentation/pull/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 avatar Jun 04 '25 21:06 ddelnano