-
Notifications
You must be signed in to change notification settings - Fork 2
gprof
William Zhang edited this page Sep 1, 2016
·
4 revisions
- Install required packages according to INSTALL and README.
$ wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz $ tar -xzvf libunwind-1.1.tar.bz2 $ cd libunwind-1.1 $ ./configure $ make $ sudo make install $ sudo yum install graphviz
- Clone the rep and install it.
$ git clone https://github.com/gperftools/gperftools $ cd gperftools $ ./autogen.sh $ ./configure $ make $ sudo make install
If libunwind not installed correctly, can use: ./configure –enable-frame-pointers to use the builtin unwind. And make applications with -fno-omit-frame-pointer.
- Sample application.
https://github.com/gperftools/gperftools/README
$ g++ -Wall -fno-omit-frame-pointer -lprofiler x.cc -o x $ rm -rf /tmp/x.out $ CPUPROFILE=/tmp/x.out ./x $ pprof –gv ./x /tmp/x.out
- Go version of the perf tool: pprof.
https://github.com/google/pprof
Created by Wenliang Zhang.