From 95f7704f8a0ccf9416c07ff4615474548ef90c6b Mon Sep 17 00:00:00 2001 From: Raph Date: Tue, 8 Nov 2022 13:47:11 -0800 Subject: [PATCH] gprof: add page (#9485) --- pages/common/gprof.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pages/common/gprof.md diff --git a/pages/common/gprof.md b/pages/common/gprof.md new file mode 100644 index 000000000..fd77e4214 --- /dev/null +++ b/pages/common/gprof.md @@ -0,0 +1,21 @@ +# gprof + +> Performance analysis tool for many programming languages. +> It profiles the function executions of a program. +> More information: . + +- Compile binary with gprof information and run it to get `gmon.out`: + +`gcc -pg {{program.c}} && {{./a.out}}` + +- Run gprof to obtain profile output: + +`gprof` + +- Suppress profile field's description: + +`gprof -b` + +- Display routines that have zero usage: + +`gprof -bz`