Parent
#694
What to build
Add memory diagnostics under perf memory so agents have one symptom-oriented place for memory growth and leak evidence. This issue groups memory work because Android heap dumps, iOS memgraph/leaks, and native allocation traces are all escalations from the same agent question: what is growing or retained?
Prototype CLI shape:
agent-device perf memory sample --json
agent-device perf memory snapshot --out heap.artifact
agent-device perf memory snapshot --kind android-hprof --out app.hprof
agent-device perf memory snapshot --kind memgraph --out app.memgraph
agent-device perf memory trace start --kind heapprofd --out allocations.perfetto-trace
agent-device perf memory trace stop --kind heapprofd --out allocations.perfetto-trace
Expected agent experience:
- Agents first use
perf memory sample --json for a lightweight memory snapshot.
- Agents escalate to
perf memory snapshot only when there is a focused repro or memory-growth symptom.
- Heap/memgraph artifacts are returned as paths with compact summaries and clear next-step hints.
- Heavy analyzers such as Shark or heapprofd reports are optional follow-ups, not required for the first artifact-capture path.
Acceptance criteria
Validation
Blocked by
Parent
#694
What to build
Add memory diagnostics under
perf memoryso agents have one symptom-oriented place for memory growth and leak evidence. This issue groups memory work because Android heap dumps, iOS memgraph/leaks, and native allocation traces are all escalations from the same agent question: what is growing or retained?Prototype CLI shape:
Expected agent experience:
perf memory sample --jsonfor a lightweight memory snapshot.perf memory snapshotonly when there is a focused repro or memory-growth symptom.Acceptance criteria
perf memory sample --jsonpreserves or refines the existing memory metric behavior fromperf metrics.Validation
pnpm check:unitpnpm formatBlocked by