From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/heaptrack: new package
Date: Fri, 31 Jul 2026 20:59:40 +0200 [thread overview]
Message-ID: <amzvreeFgp0eJyM4@windsurf> (raw)
In-Reply-To: <20260731-heaptrack-v1-1-c558715cb4c3@bootlin.com>
Hello,
On Fri, Jul 31, 2026 at 07:25:35PM +0200, Luca Ceresoli wrote:
> diff --git a/package/heaptrack/Config.in b/package/heaptrack/Config.in
> new file mode 100644
> index 000000000000..ea54195c9318
> --- /dev/null
> +++ b/package/heaptrack/Config.in
> @@ -0,0 +1,26 @@
> +config BR2_PACKAGE_HEAPTRACK
> + bool "heaptrack"
> + depends on BR2_INSTALL_LIBSTDCPP
> + depends on BR2_LINUX_KERNEL
You also need to replicate the "depends on" the things you select, so:
depends on BR2_TOOLCHAIN_HAS_THREADS # boost, libunwind, elfutils
depends on BR2_USE_WCHAR # boost, elfutils
depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libunwind
depends on !BR2_STATIC_LIBS # libunwind, elfutils
Also, I'm curious about the BR2_LINUX_KERNEL dependency. heaptrack
builds its own kernel modules?
> + select BR2_PACKAGE_BOOST
> + select BR2_PACKAGE_BOOST_IOSTREAMS
> + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
> + # For heaptrack_print
> + select BR2_PACKAGE_BOOST_FILESYSTEM
> + select BR2_PACKAGE_LIBUNWIND
> + select BR2_PACKAGE_ZLIB
> + select BR2_PACKAGE_ELFUTILS
Also, these selects should be sorted alphabetically.
> + help
> + 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,
> + memory leaks, allocation hotspots and temporary allocations.
> +
> + Zstandard offers better (de)compression performance compared
> + with gzip/zlib, making heaptrack faster and datafiles smaller,
> + so enabling BR2_PACKAGE_ZSTD is recommended.
> +
> + https://apps.kde.org/heaptrack/
> +
> +comment "heaptrack needs a toolchain w/ C++"
> + depends on !BR2_INSTALL_LIBSTDCPP
This needs to be updated with the dependencies above.
> diff --git a/package/heaptrack/heaptrack.hash b/package/heaptrack/heaptrack.hash
> new file mode 100644
> index 000000000000..d9eb6010ac18
> --- /dev/null
> +++ b/package/heaptrack/heaptrack.hash
> @@ -0,0 +1 @@
> +sha256 e69de2209ab0e16c8e26c1b60feeb852b3a88e46a4f16588c08254e1bd81a183 heaptrack-3e6cce3d210a6672fe6f92de0bed567c49b7a9c5-git4.tar.gz
Add comment indicating the provenance of this hash.
Add the hashes of the license files.
> diff --git a/package/heaptrack/heaptrack.mk b/package/heaptrack/heaptrack.mk
> new file mode 100644
> index 000000000000..6349e7aeb04d
> --- /dev/null
> +++ b/package/heaptrack/heaptrack.mk
> @@ -0,0 +1,25 @@
> +################################################################################
> +#
> +# heaptrack
> +#
> +################################################################################
> +
> +HEAPTRACK_SITE_METHOD = git
> +HEAPTRACK_SITE = https://invent.kde.org/sdk/heaptrack.git
> +HEAPTRACK_VERSION = 3e6cce3d210a6672fe6f92de0bed567c49b7a9c5
> +HEAPTRACK_LICENSE = LGPL-2.1-or-later, GPL-2.0-or-later (heaptrack_interpret)
> +HEAPTRACK_LICENSE_FILES = LICENSES/LGPL-2.1-only.txt \
> + LICENSES/GPL-2.0-or-later.txt \
> + LICENSES/LGPL-2.1-or-later.txt \
> + LICENSES/BSL-1.0.txt \
> + LICENSES/MIT.txt \
> + LICENSES/Apache-2.0.txt \
> + LICENSES/BSD-3-Clause.txt
One tab indentation for follow-up lines is enough.
> +HEAPTRACK_DEPENDENCIES = host-pkgconf linux boost libunwind zlib elfutils
> +HEAPTRACK_CONF_OPTS += -DHEAPTRACK_BUILD_GUI=OFF -DHEAPTRACK_BUILD_PRINT=ON
> +
> +ifeq ($(BR2_PACKAGE_ZSTD),y)
> +HEAPTRACK_DEPENDENCIES += zstd
> +endif
> +
> +$(eval $(cmake-package))
>
> ---
> base-commit: 9bc585a804b2ce7b5f82f538f6108cca27c3116a
> change-id: 20260731-heaptrack-cd4f6f8fcec8
Would it be difficult to add a test case in support/testing/?
Thanks a lot!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-07-31 18:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 17:25 [Buildroot] [PATCH] package/heaptrack: new package Luca Ceresoli via buildroot
2026-07-31 18:59 ` Thomas Petazzoni via buildroot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=amzvreeFgp0eJyM4@windsurf \
--to=buildroot@buildroot.org \
--cc=luca.ceresoli@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox