# Share a Valgrind Report — Callgrind and Memcheck Without KCachegrind

Canonical: https://commareports.com/share-valgrind-report
Published: 2026-09-15

> Valgrind output needs a GUI nobody else has installed. Render callgrind to SVG or memcheck XML to HTML, publish to Comma, and the finding travels as a link.

# Share a Valgrind report

Valgrind's findings are precise and its output is hostile. Memcheck emits a
wall of stack traces prefixed with process ids; Callgrind writes a file whose
intended reader is KCachegrind, a GUI that the person who needs to see the
result has never installed and is not going to.

Both convert into something a browser can open.

## Callgrind → SVG call graph

```bash
valgrind --tool=callgrind --callgrind-out-file=callgrind.out ./app
pip install gprof2dot     # plus graphviz for `dot`

gprof2dot -f callgrind callgrind.out | dot -Tsvg -o callgraph.svg
```

`gprof2dot` prunes by cost, so the graph stays readable — `-n 0.5 -e 0.1`
tightens it further on a large binary. The SVG is self-contained and scales,
which is exactly what a screenshot of KCachegrind does not.

## Memcheck → a page

```bash
valgrind --tool=memcheck --leak-check=full \
  --xml=yes --xml-file=memcheck.xml ./app

# Render the XML with whatever your stack already has, e.g.
xsltproc valgrind-to-html.xsl memcheck.xml > memcheck.html
```

If your CI already converts the XML for a test summary, reuse that — the goal
is a page, not a particular converter.

## Publish it

Drag the file into [the app](https://commareports.com/), or from CI:

```bash
curl -fsS -X PATCH "https://commareports.com/api/v1/reports/$REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html memcheck.html \
        --arg title "Memcheck — $GITHUB_SHA" '{title: $title, html: $html}')"
```

## The nightly cadence

Memcheck runs slow enough that most projects put it on a nightly job rather
than a per-commit gate. That cadence is what makes a stable URL valuable: one
report id, PATCHed each night, with a revision history where a new leak record
appears as a diff rather than as a line in a log nobody opened.

- **A [routine](/features/routines/scheduled-html-reports)** handles the
  re-run and the publish.
- **Anchored threads** on a specific leak — "this one is the static logger, it
  is freed at exit" — so the known-benign records stop being re-reported. See
  [commenting on HTML](/comment-on-html).

## Limits

- **Entry HTML: 5 MB.** Assets: 25 MB per file, 250 MB and 500 files total.
  A full call graph on a large binary is the one that gets close — prune with
  `gprof2dot -n/-e`.
- **60 requests/minute per token.**

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited revision
history.

**[Publish a profile →](https://commareports.com/)**

### Related

- [Share a flame graph](/share-flamegraph) · [Share a pprof profile](/share-pprof-profile)
- [Share a gtest report](/share-gtest-report) · [Share a Cppcheck report](/share-cppcheck-report)
- [Share a clang-tidy report](/share-clang-tidy-report) · [Share a Graphviz diagram](/share-graphviz-diagram)
