Skip to content

Parse module information from Go binaries .buildinfo#2193

Merged
ddelnano merged 4 commits intopixie-io:mainfrom
ddelnano:ddelnano/parse-go-mod-for-buildinfo
May 29, 2025
Merged

Parse module information from Go binaries .buildinfo#2193
ddelnano merged 4 commits intopixie-io:mainfrom
ddelnano:ddelnano/parse-go-mod-for-buildinfo

Conversation

@ddelnano
Copy link
Copy Markdown
Member

@ddelnano ddelnano commented May 5, 2025

Summary: Parse module information from Go binaries .buildinfo

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).

Go embeds dependency versions within the .buildinfo ELF section, which provides an opportunity to identify memory offsets for eBPF programs without DWARF. This is how solutions like Open Telemetry's automatic go instrumentation work. By providing access to this dependency information, we can provide a lighter weight uprobe implementation for Go applications.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: New tests verify added functionality

@ddelnano ddelnano force-pushed the ddelnano/parse-go-mod-for-buildinfo branch from 9f0dc1c to a3d7112 Compare May 5, 2025 15:35
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano force-pushed the ddelnano/parse-go-mod-for-buildinfo branch from a3d7112 to 3ac1f1e Compare May 5, 2025 23:17
ddelnano added 2 commits May 8, 2025 14:23
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
…ic case works

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano marked this pull request as ready for review May 8, 2025 14:29
@ddelnano ddelnano requested a review from a team as a code owner May 8, 2025 14:29
Comment thread src/stirling/obj_tools/go_syms.cc
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano merged commit fcf2516 into pixie-io:main May 29, 2025
27 checks passed
@ddelnano ddelnano deleted the ddelnano/parse-go-mod-for-buildinfo branch May 29, 2025 19:10
ddelnano added a commit to k8sstormcenter/pixie that referenced this pull request Feb 25, 2026
Summary: Parse module information from Go binaries .buildinfo

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).

Go embeds dependency versions within the `.buildinfo` ELF section, which
provides an opportunity to identify memory offsets for eBPF programs
without DWARF. This is how solutions like [Open Telemetry's automatic go
instrumentation](https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/cb01aca4e72b8542401faf2fcf1ceba4248b4ba5/docs/how-it-works.md#instrumentation-stability)
work. By providing access to this dependency information, we can provide
a lighter weight uprobe implementation for Go applications.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: New tests verify added functionality

---------

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
ddelnano added a commit to k8sstormcenter/pixie that referenced this pull request Feb 25, 2026
Summary: Parse module information from Go binaries .buildinfo

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).

Go embeds dependency versions within the `.buildinfo` ELF section, which
provides an opportunity to identify memory offsets for eBPF programs
without DWARF. This is how solutions like [Open Telemetry's automatic go
instrumentation](https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/cb01aca4e72b8542401faf2fcf1ceba4248b4ba5/docs/how-it-works.md#instrumentation-stability)
work. By providing access to this dependency information, we can provide
a lighter weight uprobe implementation for Go applications.

Relevant Issues: N/A

Type of change: /kind feature

Test Plan: New tests verify added functionality

---------

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
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