Refactor symbol caching#635
Merged
fabled merged 10 commits intoopen-telemetry:mainfrom Jul 30, 2025
Merged
Conversation
This joins the Frame metadata to libpf.Frame: - removes the internal dependency of synthesized FileID/LineNo (if some reporter needs to synthesize these still, they need to now do it them selves based on the trace/symbol data) - removes LRU from the base reporter and allows the profiler core to always provide symbol information To not use excessive memory the libpf.Frame is interned using the unique package. TODO: - add caching for ebpf frame -> libpf.Frame and check if the tracehandler trace LRU can be removed
I removed this as I was planning to include the tracehandler cache changes making it redundant, but as it is wort a separate PR lets add this back for now.
christos68k
reviewed
Jul 28, 2025
Member
christos68k
left a comment
There was a problem hiding this comment.
Did a pass, looks good to me. I will do a final pass tomorrow.
florianl
reviewed
Jul 29, 2025
Member
florianl
left a comment
There was a problem hiding this comment.
I like the simplicity and reduction of API functions this work introduces. Thanks for working on this!
| SourceLine: libpf.SourceLineno(lineNo), | ||
| frames.Append(&libpf.Frame{ | ||
| Type: libpf.GoFrame, | ||
| //TODO: File: convert the frame.File (host.FileID) to libpf.FileID here |
Member
There was a problem hiding this comment.
As Go frames are treated like any other interpreted frame, I think we can skip File here. WDYT?
Suggested change
| //TODO: File: convert the frame.File (host.FileID) to libpf.FileID here |
Contributor
Author
There was a problem hiding this comment.
I think it makes sense to provide it here as a follow up as it provides additional information and this is a file backed mapping.
christos68k
approved these changes
Jul 29, 2025
florianl
approved these changes
Jul 30, 2025
nsavoire
added a commit
to DataDog/dd-otel-host-profiler
that referenced
this pull request
Aug 4, 2025
nsavoire
added a commit
to DataDog/dd-otel-host-profiler
that referenced
this pull request
Aug 7, 2025
nsavoire
added a commit
to DataDog/dd-otel-host-profiler
that referenced
this pull request
Aug 8, 2025
florianl
added a commit
to florianl/opentelemetry-collector-contrib
that referenced
this pull request
Aug 14, 2025
Update go.opentelemetry.io/ebpf-profiler to use a tagged version instead of a commit. As open-telemetry/opentelemetry-ebpf-profiler#635 removed libpf.FrameID, also move its functionality to this package as it is essential for its functionality. Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
nsavoire
added a commit
to DataDog/dd-otel-host-profiler
that referenced
this pull request
Aug 18, 2025
nsavoire
added a commit
to DataDog/dd-otel-host-profiler
that referenced
this pull request
Aug 18, 2025
* backport: replace per-fileID LRU with a global LRU open-telemetry/opentelemetry-ebpf-profiler#529 * backport: interpreters, reporter: intern symbolization strings open-telemetry/opentelemetry-ebpf-profiler#563 * Disable Go interpreter because we are doing Go symbolization remotely. * Update opentelemetry-ebpf-profiler with latest changes from upstream. * Update 3rdparty licenses. * backport: Refactor symbol caching open-telemetry/opentelemetry-ebpf-profiler#635 * Use containerID provided by eBPF profiler when available and split by service is enabled. * Do not collect Go labels by default
andrzej-stencel
pushed a commit
to open-telemetry/opentelemetry-collector-contrib
that referenced
this pull request
Aug 22, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Update go.opentelemetry.io/ebpf-profiler to use a tagged version instead of a commit. As open-telemetry/opentelemetry-ebpf-profiler#635 removed libpf.FrameID, also move its functionality to this package as it is essential for its functionality. <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> --------- Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
gnurizen
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Sep 16, 2025
gnurizen
pushed a commit
to parca-dev/opentelemetry-ebpf-profiler
that referenced
this pull request
Sep 17, 2025
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.
This creates
libpf.Framewith thelibpf.Traceframe data and the relevant metadata:Follow up steps:
host.Frametolibpf.Framesin a LRU, potentially remove thehost.Tracetolibpf.TraceLRU completinglibpf.Framehave mappings/executable info as a separate interned data field to address Executable metadata missing for some executables on hosts with a large number of executables #250