From bd537b322f501f298f9db808ea1362d9b2812f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 13 May 2026 10:43:37 +0200 Subject: [PATCH] fix(pgo): skip re-symbolization when merging pprof profiles pprof -proto re-symbolized the merged profile and produced Function records without start_line, which Go PGO's preprofile rejects with "profile missing Function.start_line data" (google/pprof#823). Pass -symbolize=none so the already-symbolized input from net/http/pprof is preserved. --- profiles/build-pgo.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/profiles/build-pgo.sh b/profiles/build-pgo.sh index fd88b29e77..8c14fffbc8 100755 --- a/profiles/build-pgo.sh +++ b/profiles/build-pgo.sh @@ -30,6 +30,10 @@ collect "$HERE/app/Caddyfile.worker" "$HERE/worker.pgo" export CGO_CFLAGS="${CGO_CFLAGS:-} -fno-sanitize=undefined" PPROF="$(go env GOPATH)/bin/pprof" [ -x "$PPROF" ] || go install github.com/google/pprof@latest -"$PPROF" -proto "$HERE/regular.pgo" "$HERE/worker.pgo" >"$ROOT/caddy/frankenphp/default.pgo" +# Input profiles from net/http/pprof already carry Function.start_line. +# pprof's addr2line symbolizer doesn't set it, so re-symbolizing here +# overwrites the existing records with start_line=0 and Go PGO's +# preprofile then rejects the merged profile. +"$PPROF" -symbolize=none -proto "$HERE/regular.pgo" "$HERE/worker.pgo" >"$ROOT/caddy/frankenphp/default.pgo" (cd "$ROOT/caddy/frankenphp" && go build -o frankenphp-pgo)