diff options
| author | Charlie Vieth <charlie.vieth@gmail.com> | 2024-04-13 01:58:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 14:58:11 +0900 |
| commit | 3c877c504b6102daf5dcc1083b1f1a7db88d304c (patch) | |
| tree | 7072b889071948a6bfb6d980d43367745a37490f /BUILD.md | |
| parent | 892d1acccb705e5547be1b3b6fad8b6d480c290b (diff) | |
| download | fzf-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.md | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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 -------------------------- |
