DAOS-18857 build: Support of Gperftools Heap Profiler#18068
Draft
DAOS-18857 build: Support of Gperftools Heap Profiler#18068
Conversation
|
Ticket title is 'Support of Gperftools Heap Profiler' |
a636a1b to
dcfc328
Compare
dcfc328 to
18fa12e
Compare
Add a new HEAP_PROFILER SCons boolean option to optionally link DAOS executables with the TCMalloc memory allocator from Gperftools, enabling heap profiling of DAOS processes such as daos_engine. When HEAP_PROFILER=true is set: - DAOS executables are linked with -ltcmalloc. - Google Sanitizers cannot be combined with the heap profiler (enforced at build time with a fatal error). - The tcmalloc linker flag is stripped from unit test environments to avoid scrambling test output. The Gperftools library can also be loaded at runtime via LD_PRELOAD without recompiling, by setting LD_PRELOAD to libtcmalloc.so and the relevant HEAPPROFILE env vars in daos_server.yml. Add gperftools as a build dependency across all supported distributions: - ci/unit/required_packages.sh and utils/scripts/install-*.sh: install gperftools-devel (EL/SUSE) or libgoogle-perftools-dev (Ubuntu). - utils/rpms/package_info.sh: define distro-aware `gperftools_dev` variable for use in FPM packaging. - utils/rpms/daos.sh: add `gperftools_dev` as a build dependency of the daos-devel package. - utils/rpms/daos.spec: retain gperftools-devel BuildRequires (legacy spec path) and bump release to 3. - utils/rpms/daos.changelog: add release 3 entry. Document the Heap Profiler feature and usage in docs/dev/development.md. Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
18fa12e to
7f4e9c4
Compare
…/daos-18857/patch-001
Increment the DAOS release number. Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
…/daos-18857/patch-001
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds optional heap profiling support to DAOS by integrating the Gperftools TCMalloc library. A new
HEAP_PROFILERSCons build option allows linking DAOS executables (e.g.daos_engine) withlibtcmallocto enable heap profiling.Changes
Build system (
site_scons/): NewHEAP_PROFILER=trueSCons boolean option that links-ltcmalloc. Enforces mutual exclusion with Google Sanitizers at build time. Strips the flag from unit test environments to avoid corrupted test output.Packaging (
utils/rpms/,utils/scripts/,ci/): Addsgperftools-devel(EL/SUSE) orlibgoogle-perftools-dev(Ubuntu) across all supported distros and RPM build definitions. Bumpsdaos.specrelease to 3.Documentation (
docs/dev/development.md): Documents theHEAP_PROFILERbuild option and the alternative runtime approach viaLD_PRELOAD=libtcmalloc.so+HEAPPROFILEenv vars (no recompile needed).Steps for the author:
After all prior steps are complete: