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 Hints and tips for building binutils
77 - Use the script(1) command to write a log of your build.
79 - If you run multiple commands at once (for example: make --jobs=10) then you
80 should also use make option:
82 Without --output-sync, the log would be difficult to interpret.
84 - Search the log for errors and warnings, for example:
85 configure: WARNING: <package> is missing or unusable; some features
87 The above message suggests that <package> may be needed on your system.
89 - Sometimes the above message is not sufficiently specific to guide you to
90 the right package. In the directory where the failure happens, config.log
91 may identify a specific missing file, and your package manager may allow
92 you to search for it. For example, if build/gprofng/config.log shows that
93 javac is missing, and if your package manager is dnf, you could try:
94 dnf --repo='*' whatprovides '*/javac'
96 - You can set a custom destination directory using configure --prefix.
97 This is useful if you prefer not to change /usr/local, or if you are not
98 allowed to do so. If you set a custom prefix, be sure to change all three
99 paths mentioned in the PATH section above.