Skip to content

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented Jul 7, 2025

Motivation:

Our alloc regression workflows are somewhat disparate: on macOS we have dtrace and a script to diff two ouputs. On Linux we have heaptrack and bpftrace but no way to analyze their outputs.

Diffing output from these tools can be quite tedious if the stacks vary even a little (because the compiler decided to not inline a function, for example).

Most of the tedium in this workflow is from pairing up equivalent stacks across the two inputs. We can make this easier to do by ranking suggestions based on how similar they are and letting the user decide whether to accept the match or not.

Modifications:

  • Add a subpackage with some internals for parsing heaptrack, aggregating stacks, and measuring the similarity between them
  • The CLI took is currently a no-op, it'll be added in subsequent PRs

Result:

Easier to diagnose alloc regressions

Motivation:

Our alloc regression workflows are somewhat disparate: on macOS we have
dtrace and a script to diff two ouputs. On Linux we have heaptrack and
bpftrace but no way to analyze their outputs.

Diffing output from these tools can be quite tedious if the stacks vary
even a little (because the compiler decided to not inline a function,
for example).

Most of the tedium in this workflow is from pairing up equivalent stacks
across the two inputs. We can make this easier to do by ranking
suggestions based on how similar they are and letting the user decide
whether to accept the match or not.

Modifications:

- Add a subpackage with some internals for parsing heaptrack,
  aggregating stacks, and measuring the similarity between them
- The CLI took is currently a no-op, it'll be added in subsequent PRs

Result:

Easier to diagnose alloc regressions
@glbrntt glbrntt added the semver/none No version bump required. label Jul 7, 2025
@glbrntt glbrntt enabled auto-merge (squash) July 7, 2025 13:56
@glbrntt glbrntt merged commit e84b2ce into apple:main Jul 7, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants