summaryrefslogtreecommitdiff
path: root/BUILD.md
diff options
context:
space:
mode:
authorCharlie Vieth <charlie.vieth@gmail.com>2024-04-13 01:58:11 -0400
committerGitHub <noreply@github.com>2024-04-13 14:58:11 +0900
commit3c877c504b6102daf5dcc1083b1f1a7db88d304c (patch)
tree7072b889071948a6bfb6d980d43367745a37490f /BUILD.md
parent892d1acccb705e5547be1b3b6fad8b6d480c290b (diff)
downloadfzf-3c877c504b6102daf5dcc1083b1f1a7db88d304c.tar.gz
Enable profiling options when 'pprof' tag is set (#2813)
This commit enables cpu, mem, block, and mutex profling of the FZF executable. To support flushing the profiles at program exit it adds util.AtExit to register "at exit" functions and mandates that util.Exit is used instead of os.Exit to stop the program. Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Diffstat (limited to 'BUILD.md')
-rw-r--r--BUILD.md14
1 files changed, 12 insertions, 2 deletions
diff --git a/BUILD.md b/BUILD.md
index eabffadb..1be8e45a 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -24,13 +24,23 @@ make build
make release
```
-> :warning: Makefile uses git commands to determine the version and the
-> revision information for `fzf --version`. So if you're building fzf from an
+> [!WARNING]
+> Makefile uses git commands to determine the version and the revision
+> information for `fzf --version`. So if you're building fzf from an
> environment where its git information is not available, you have to manually
> set `$FZF_VERSION` and `$FZF_REVISION`.
>
> e.g. `FZF_VERSION=0.24.0 FZF_REVISION=tarball make`
+> [!TIP]
+> To build fzf with profiling options enabled, set `TAGS=pprof`
+>
+> ```sh
+> TAGS=pprof make clean install
+> fzf --profile-cpu /tmp/cpu.pprof --profile-mem /tmp/mem.pprof \
+> --profile-block /tmp/block.pprof --profile-mutex /tmp/mutex.pprof
+> ```
+
Third-party libraries used
--------------------------