google / google/perfetto

Add exact allocation count/size tracking to heapprofd

Open
#7,433 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.5k
Forks
868
Avg merge
2d 1h
Merged PRs (30d)
218

Description

heapprofd's sampling algorithm is really good at statistically capturing callstacks of allocations without adding a lot of overhead. Sometimes though, you don't necessarily care about the callstack at all, you just want a sense of how many allocations a certain thread made oveer time.

We should add a mode to heapprod which skips the stacks and unwindings and just passes over the raw counts. Moreover, we should also make this *exact* independent of the counts attributed to stacks.

Contributor guide

Open the contributing guide

Research direction

The issue names heapprofd but no files, tests, or entry points. Start by locating the sampling, stack-unwinding, and per-thread allocation-count paths; define how a mode can skip stacks while reporting exact allocation counts and sizes independently of sampled stack attribution, then verify those raw counts over time.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.