3 Gprofng is the GNU Next Generation profiler for analyzing the performance
4 of Linux applications. Gprofng allows you to:
5 - Profile C / C++ / Java / Scala applications without needing to recompile
6 - Profile multi-threaded applications
7 - Analyze and compare multiple experiments
8 - Use time-based sampling and / or hardware event counters
12 Gprofng is distributed with binutils. To build gprofng, you build binutils.
15 2. Verify prerequisites
17 4. Configure, make, and make install
18 Details follow for each of these.
22 If you are configuring binutils for the default location, it will use:
24 In your shell initialization procedure, set your paths using commands
26 export PATH=/usr/local/bin:$PATH
27 export MANPATH=/usr/local/share/man:$MANPATH
28 export INFOPATH=/usr/local/share/info/:$INFOPATH
30 2. Verify prerequisites
32 To build a recent version of binutils, it is useful to have a developer
33 system with the most recent compilers, libraries, and operating system.
34 Development systems will typically already include most of these:
36 bison bison-devel bzip2 elfutils-debuginfod-client-devel
37 expat-devel flex gcc gcc-c++ git-core git-core-doc gmp-devel
38 help2man libbabeltrace-devel libipt-devel m4 make mpfr-devel
39 ncurses-devel perl-Data-Dumper tar texinfo xz zlib-devel
42 CAUTION: The list of prerequisites changes depending on your operating system
43 and changes as binutils evolves. The list above is a snapshot of the useful
44 packages in early 2022 for Red Hat Enterprise Linux and Oracle Linux.
46 Your system may use other packages; for example, you may be able to use a
47 different version of Java than shown above. If there are failures, you may
48 need to search for other packages as described in the "Hints" section below.
52 Select a binutils repository and a branch that you would like
53 to start from. For example, to clone from the master at
54 sourceware.org, you could say:
55 git clone http://sourceware.org/git/binutils-gdb.git CloneDir
57 4. Configure, make, and install
59 There are many options for configure (see: configure --help). For example,
60 --prefix sets the destination, as described in the "Hints" section below.
61 If the default destination /usr/local is acceptable for your needs, then
62 after the clone operation finishes, you can simply say:
72 To start using gprofng, see the tutorial available by saying:
75 HTML and PDF documentation
77 You may want to generate an HTML or PDF version of the manual in addition
78 to the above info pages. These versions may be easier to read and easier
79 to search. To generate HTML:
81 cd build # the same build directory you created above
84 sudo make install-html
86 If you would like PDF documentation, you will need the texi2dvi utility.
87 If it is not already included in the texinfo package mentioned above, try
88 installing package texinfo-tex. To generate PDF:
90 cd build # the same build directory you created above
95 Hints and tips for building binutils
97 - Use the script(1) command to write a log of your build.
99 - If you run multiple commands at once (for example: make --jobs=10) then you
100 should also use make option:
102 Without --output-sync, the log would be difficult to interpret.
104 - Search the log for errors and warnings, for example:
105 configure: WARNING: <package> is missing or unusable; some features
107 The above message suggests that <package> may be needed on your system.
109 - Sometimes the above message is not sufficiently specific to guide you to
110 the right package. In the directory where the failure happens, config.log
111 may identify a specific missing file, and your package manager may allow
112 you to search for it. For example, if build/gprofng/config.log shows that
113 javac is missing, and if your package manager is dnf, you could try:
114 dnf --repo='*' whatprovides '*/javac'
116 - You can set a custom destination directory using configure --prefix.
117 This is useful if you prefer not to change /usr/local, or if you are not
118 allowed to do so. If you set a custom prefix, be sure to change all three
119 paths mentioned in the PATH section above.