Repository navigation
fix(malloc): harden pprof output for Pyroscope malloc profiles - #24197
Merged
mergify[bot] merged 3 commits intoApr 27, 2026
Merged
Conversation
- Rename sample types to alloc_objects, alloc_space, inuse_objects, inuse_space; default inuse_space - Set PeriodType, Period, TimeNanos, and Mapping.HasFunctions in Profiler.Write - Add heap_profiler_pprof_test for profile.Parse round-trip - Add [malloc] block to mo_checkin_regression_tke.yaml for tp/dn Made-with: Cursor
VioletQwQ-0
force-pushed
the
violet/malloc-pyroscope-pr
branch
from
April 24, 2026 11:42
06fb6d1 to
d34c52c
Compare
fengttt
approved these changes
Apr 24, 2026
aptend
approved these changes
Apr 27, 2026
XuPeng-SH
approved these changes
Apr 27, 2026
Contributor
Merge Queue Status
This pull request spent 1 hour 2 minutes 6 seconds in the queue, including 1 hour 1 minute 38 seconds running CI. Required conditions to merge
|
fengttt
pushed a commit
to fengttt/matrixone
that referenced
this pull request
May 7, 2026
…xorigin#24197) This PR hardens MatrixOne's custom `/debug/malloc` pprof output for Pyroscope ingestion. Changes: - rename malloc profile sample types to Go heap-style names: - `alloc_objects` - `alloc_space` - `inuse_objects` - `inuse_space` - populate pprof metadata in `Profiler.Write`: - `PeriodType` - `Period` - `TimeNanos` - `Mapping.HasFunctions` - explicitly bind every emitted `profile.Location` to the default `profile.Mapping` - strengthen malloc pprof tests with: - `profile.Parse(...)` - `p.CheckValid()` - non-nil `Location.Mapping` assertions - update regression TKE template to include `[malloc]` config for `tp` / `dn` We previously observed that `/debug/malloc` was parseable by `go tool pprof`, and Pyroscope could discover `malloc` profile types, but agent/backend ingest could still fail with `nil pointer dereference`. The remaining MatrixOne-side compatibility gap appeared to be `Location.Mapping == nil` in the emitted profile. Validation: - malloc pprof round-trip/validity test added and strengthened - isolated TKE validation using the forked build from this change - `malloc` profile types visible in Pyroscope API - CN/DN series queryable - stacktrace/flamegraph data queryable - previous nil-pointer ingest failure did not reproduce in short-window validation Longer soak / overhead validation is handled separately in `mo-auto-test`. Approved by: @fengttt, @aptend, @XuPeng-SH
1 task done
2 tasks done
This branch was previously deployed
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.
What type of PR is this?
Which issue(s) this PR fixes:
issue #24222
What this PR does / why we need it:
This PR hardens MatrixOne's custom
/debug/mallocpprof output for Pyroscope ingestion.Changes:
alloc_objectsalloc_spaceinuse_objectsinuse_spaceProfiler.Write:PeriodTypePeriodTimeNanosMapping.HasFunctionsprofile.Locationto the defaultprofile.Mappingprofile.Parse(...)p.CheckValid()Location.Mappingassertions[malloc]config fortp/dnWe previously observed that
/debug/mallocwas parseable bygo tool pprof, and Pyroscope could discovermallocprofile types, but agent/backend ingest could still fail withnil pointer dereference. The remaining MatrixOne-side compatibility gap appeared to beLocation.Mapping == nilin the emitted profile.Validation:
mallocprofile types visible in Pyroscope APILonger soak / overhead validation is handled separately in
mo-auto-test.