Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

283.9. massif-visualizer-26.08.2

Viewer for Valgrind Massif heap profiles — memory use over time, peak snapshots and allocation trees

Version 26.08.2, release 1
Shelf devtools — Debuggers, tracers, profilers, analysers, linters, language servers and developer utilities
Phase 44_apps (Applications), 52 of 422 in build order
Licence (GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL) AND (LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL) AND CC0-1.0
Homepage https://apps.kde.org/massif_visualizer/
Build time 3.6 SBU
Installed size 658.1 KiB in 8 files
Recipe ports/core/devtools/massif-visualizer/kpkgbuild

About

Massif Visualizer reads the heap profiles Valgrind’s Massif tool writes (massif.out.<pid>) and draws memory use over time, with the peak and each detailed snapshot marked, and the allocation tree behind any snapshot. A call graph of a snapshot shows which call paths hold the memory.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qt5compat, qt6-qtsvg, karchive, kcompletion, kconfig, kcoreaddons, ki18n, kio, kparts, kdiagram, kgraphviewer, shared-mime-info, valgrind.

Required by (1): kde-gear-devtools.

Patches

build.sh applies these; kpkg applies nothing by itself.

The desktop entry’s StartupWMClass is upstream’s massif-visualizer, but the window’s Wayland app_id is org.kde.massif-visualizer. The program passes massif-visualizer@kde.org, an address with no URL scheme, where KAboutData takes the home page; KAboutData then falls back to the kde.org domain and builds the desktop file name from it and the component name. app-id.patch sets the class to the app_id so the task manager matches the window to its entry.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install massif-visualizer'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/devtools/massif-visualizer.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/devtools/massif-visualizer
echo 'c05c0fab639d72443e6f89f9ddd52b55c32ba0e830910d162d1c95c0b6f20b86  massif-visualizer-26.08.2.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/massif-visualizer
SRC=$SRC_ROOT/massif-visualizer-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf massif-visualizer-26.08.2.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/app-id.patch"

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D BUILD_TESTING=OFF \
	-D KF_SKIP_PO_PROCESSING=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_KGraphViewerPart=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_SharedMimeInfo=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/massif-visualizer, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf massif-visualizer-26.08.2-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/massif-visualizer, and runs the triggers its paths call for.

Contents

Installed programs: massif-visualizer.

Installed directories: /usr/share/licenses/massif-visualizer, /usr/share/massif-visualizer.

Notes

The charts are KChart, from kdiagram, required at 3.0 or later. With DESTDIR set, the install copies the MIME type’s XML and leaves the database to kpkg, which regenerates it when the package is installed (see Shared indexes). Profiles come from valgrind, in depends for run time.