alloc-profile

Analyze jemalloc collapsed stack profiles to attribute live allocations to traces.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/tusharg1993/ClickHouse --skill alloc-profile-tusharg1993
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: alloc-profile
Source: https://github.com/tusharg1993/ClickHouse/tree/main/.claude/skills/alloc-profile
Command: npx skills add https://github.com/tusharg1993/ClickHouse --skill alloc-profile-tusharg1993

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Analyzes a jemalloc (or other) allocation profile in collapsed stack format to reveal how memory is allocated, where it concentrates, and which call paths drive the most live allocations.

Core Features & Use Cases

  • Top allocations: identify the largest live allocations and the frames that allocate them.
  • Outermost vs leaf frames: understand what operation triggered allocations and where they happen in the code path.
  • Subsystem grouping: map traces to subsystems (e.g., loading, merges, IO) for targeted optimizations.

Quick Start

Provide a path to a .collapsed profile file or place one in the current directory and let the tool locate and analyze it.

Frequently Asked Questions about alloc-profile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze jemalloc collapsed stack profiles to find memory hotspots?

Analyze jemalloc collapsed stack profiles by attributing total live allocations to specific stack traces, revealing top allocators and subsystem-level groupings for targeted memory diagnostics.

What is a collapsed stack profile and when do I need it for memory leak diagnostics?

A collapsed stack profile maps allocation call paths to memory totals. You need it when diagnosing memory leaks to identify which operations trigger allocations and where they concentrate in code.

Can I group memory allocations by subsystem from a collapsed profile file?

Yes, you can group memory allocations by subsystem from a collapsed profile file. The analysis maps stack traces to subsystems like loading, merges, and IO for targeted optimization decisions.

How do I extract top allocators from jemalloc profile data?

Extract top allocators from jemalloc profile data by processing collapsed stack files to surface the largest live allocations, identifying both outermost triggering operations and leaf frame allocation points.

Does memory allocation profile analysis work with any collapsed stack format?

Memory allocation profile analysis works with jemalloc-style collapsed stack format files. It processes .collapsed profile files to identify allocation patterns and attribute totals to stack traces.

What's the best way to filter memory allocation traces by path during profile analysis?

Filter memory allocation traces by path during profile analysis by applying path-based filters to collapsed stack data, extracting top traces matching criteria and producing human-readable summaries for decisions.