How To Install heaptrack on Fedora 34

heaptrack is A heap memory profiler for Linux

Introduction

In this tutorial we learn how to install heaptrack on Fedora 34.

What is heaptrack

Heaptrack traces all memory allocations and annotates these events with stack traces.Dedicated analysis tools then allow you to interpret the heap memory profile to - find hotspots that need to be optimized to reduce the memory footprint of your application - find memory leaks, i.e. locations that allocate memory which is never deallocated - find allocation hotspots, i.e. code locations that trigger a lot of memory allocation calls - find temporary allocations, which are allocations that are directly followed by their deallocation

We can use yum or dnf to install heaptrack on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install heaptrack.

Install heaptrack on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install heaptrack using dnf by running the following command:

sudo dnf -y install heaptrack

Install heaptrack on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install heaptrack using yum by running the following command:

sudo yum -y install heaptrack

How To Uninstall heaptrack on Fedora 34

To uninstall only the heaptrack package we can use the following command:

sudo dnf remove heaptrack

heaptrack Package Contents on Fedora 34

/usr/bin/heaptrack
/usr/bin/heaptrack_gui
/usr/bin/heaptrack_print
/usr/include/heaptrack_api.h
/usr/lib/.build-id
/usr/lib/.build-id/13
/usr/lib/.build-id/13/9def2ffff234f68030c0c15eaa3a57442c2a3f
/usr/lib/.build-id/2d
/usr/lib/.build-id/2d/e4b6e479c5dc14361ba8ddabdedcdede3fc49b
/usr/lib/.build-id/34
/usr/lib/.build-id/34/824b02a208fcfef2ddd08bf1e7b52cdd4bfb44
/usr/lib/.build-id/44
/usr/lib/.build-id/44/1502861e7359dd35a032435d5e1ae417a857b7
/usr/lib/.build-id/60
/usr/lib/.build-id/60/97d964a1c3b8612c43acabd5c6acf2e2cbc573
/usr/lib64/heaptrack
/usr/lib64/heaptrack/libexec/heaptrack_interpret
/usr/lib64/heaptrack/libheaptrack_inject.so
/usr/lib64/heaptrack/libheaptrack_preload.so
/usr/share/applications/org.kde.heaptrack.desktop
/usr/share/icons/hicolor/128x128/apps/heaptrack.png
/usr/share/icons/hicolor/16x16/apps/heaptrack.png
/usr/share/icons/hicolor/22x22/apps/heaptrack.png
/usr/share/icons/hicolor/32x32/apps/heaptrack.png
/usr/share/icons/hicolor/48x48/apps/heaptrack.png
/usr/share/icons/hicolor/64x64/apps/heaptrack.png
/usr/share/licenses/heaptrack
/usr/share/licenses/heaptrack/COPYING
/usr/share/locale/ast/LC_MESSAGES/heaptrack.mo
/usr/share/locale/ca/LC_MESSAGES/heaptrack.mo
/usr/share/locale/ca@valencia/LC_MESSAGES/heaptrack.mo
/usr/share/locale/cs/LC_MESSAGES/heaptrack.mo
/usr/share/locale/da/LC_MESSAGES/heaptrack.mo
/usr/share/locale/de/LC_MESSAGES/heaptrack.mo
/usr/share/locale/en_GB/LC_MESSAGES/heaptrack.mo
/usr/share/locale/es/LC_MESSAGES/heaptrack.mo
/usr/share/locale/fr/LC_MESSAGES/heaptrack.mo
/usr/share/locale/gl/LC_MESSAGES/heaptrack.mo
/usr/share/locale/ko/LC_MESSAGES/heaptrack.mo
/usr/share/locale/nl/LC_MESSAGES/heaptrack.mo
/usr/share/locale/nn/LC_MESSAGES/heaptrack.mo
/usr/share/locale/pl/LC_MESSAGES/heaptrack.mo
/usr/share/locale/pt/LC_MESSAGES/heaptrack.mo
/usr/share/locale/pt_BR/LC_MESSAGES/heaptrack.mo
/usr/share/locale/ru/LC_MESSAGES/heaptrack.mo
/usr/share/locale/sk/LC_MESSAGES/heaptrack.mo
/usr/share/locale/sv/LC_MESSAGES/heaptrack.mo
/usr/share/locale/tr/LC_MESSAGES/heaptrack.mo
/usr/share/locale/uk/LC_MESSAGES/heaptrack.mo
/usr/share/locale/zh_CN/LC_MESSAGES/heaptrack.mo
/usr/share/metainfo/org.kde.heaptrack.appdata.xml

References

Summary

In this tutorial we learn how to install heaptrack on Fedora 34 using yum and dnf.