From ce0031067a9bb588f720cb52b8e26a4663a6b15d Mon Sep 17 00:00:00 2001 From: evenyag Date: Thu, 14 Nov 2024 14:21:48 +0800 Subject: [PATCH] docs: how to get jeprof from target dir --- docs/how-to/how-to-profile-memory.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/how-to/how-to-profile-memory.md b/docs/how-to/how-to-profile-memory.md index a0fe42df55..5b9c7c3a88 100644 --- a/docs/how-to/how-to-profile-memory.md +++ b/docs/how-to/how-to-profile-memory.md @@ -4,6 +4,18 @@ This crate provides an easy approach to dump memory profiling info. ## Prerequisites ### jemalloc +jeprof is already compiled in the target directory of GreptimeDB. You can find the binary and use it. +``` +# find jeprof binary +find . -name 'jeprof' + +# add executable permission +chmod +x +``` +The path is usually under `./target/${PROFILE}/build/tikv-jemalloc-sys-${HASH}/out/build/bin/jeprof`. + +The default version of jemalloc installed from the package manager may not have the `--collapsed` option. +You may need to check the whether the `jeprof` version is >= `5.3.0` if you want to install it from the package manager. ```bash # for macOS brew install jemalloc