Merge upstream/main commit 4ea0940: bpf_get_stackid → bpf_get_stack#257
Merged
Merge upstream/main commit 4ea0940: bpf_get_stackid → bpf_get_stack#257
Conversation
…et_stack()
Resolves conflicts with Parca fork:
- native_stack_trace.ebpf.c: drop kernel_stackmap (the unwind code
continues to live in native_stack_trace.h in the fork)
- tracer.go: drop the duplicate CustomLabels block and the now-removed
Kernel_stack_id path; adopt upstream symbolizeKernelFrames using
Num_kernel_frames embedded at the start of Frame_data
- tracer.ebpf.{amd64,arm64}: rebuilt
https://claude.ai/code/session_01ARGAhbCVzaMmscQPTa3eeN
- Rebuild tracer.ebpf.{amd64,arm64} using the project's pinned
clang-17/llvm-17 toolchain (the previous blobs were built against
clang-18 which produces different output)
- Drop stray blank line in native_stack_trace.ebpf.c flagged by
clang-format-17
https://claude.ai/code/session_01ARGAhbCVzaMmscQPTa3eeN
Previous commit rebuilt with Ubuntu clang-17 on the host, which produces bit-identical BPF but differently-hashed blobs from the pinned CI image's Debian clang-17. Rebuilding inside the image's filesystem (via chroot to reuse its toolchain) yields blobs whose sha256 matches what the unit-test-ebpf workflow recomputes, so the blob-diff check now passes. https://claude.ai/code/session_01ARGAhbCVzaMmscQPTa3eeN
umanwizard
approved these changes
Apr 21, 2026
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.
Summary
Merges upstream commit
4ea0940("Switch from bpf_get_stackid() to bpf_get_stack() (open-telemetry#1264)") — the first upstream commit the Parca fork was behind after its last merge base (4e8bd96).Upstream change: kernel stacks are now captured inline via
bpf_get_stack()(raw addrs embedded at the front ofTrace.frame_data, counted by the newnum_kernel_framesfield) instead of viabpf_get_stackid()into aBPF_MAP_TYPE_STACK_TRACEmap keyed by id.Conflict resolutions
support/ebpf/native_stack_trace.ebpf.c— Parca moved the unwind code intonative_stack_trace.h(via#include). Kept the include and dropped upstream's duplicated inline unwind block. Also dropped thekernel_stackmapstruct per upstream.tracer/tracer.go— Dropped Parca's duplicateCustomLabelsparsing loop inloadBpfTrace(upstream has the identical block right after) and removed the now-deadptr.Kernel_stack_idpath. Upstream'ssymbolizeKernelFramespath usingNum_kernel_framesis now the sole kernel-frame path.support/ebpf/tracer.ebpf.{amd64,arm64}— rebuilt from the resolved sources.Test plan
make ebpfbuilds cleanly (amd64 + arm64)go build ./...passes (only env-related failures:sys/sdt.h, Rust lib)make test— all code-related tests pass. The following fail only due to sandbox limitations, not this change:customlabelstest,interpreter/rtld— no/proc/kallsymsinterpreter/luajit— no Dockertools/coredump— cloud store blocked (403)support/usdt/test— missingsys/sdt.htest/cudaverify— missinglibparcagpucupti.sohttps://claude.ai/code/session_01ARGAhbCVzaMmscQPTa3eeN