This blog entry was contributed by: Kurt Goebel, Ruud van der Pas, Vladimir Mezentsev. They work in the Oracle Linux Toolchain Team and are involved with gprofng on a daily basis.

Introduction
Since its debut in 2022, gprofng usage has grown consistently and now it sports a well established and growing base of active users. With each release, gprofng has been improved with feedback and ease of use enhancements suggested by its users. New and useful features have been added to each release. For example, in the recent release of gprofng, as part of GNU binutils 2.42, the list of supported processor specific hardware events was increased. A new fully featured interactive add-on GUI was also recently made available. For more details on the GUI, see the section Graphical analysis of results using the new gprofng GUI below.
A brief recap of gprofng functionality
The Linux gprofng application profiler is a powerful, feature rich, and free to use tool for C, C++, Java, Fortran or Scala applications. It uses a sampling technique to collect performance information. Periodically, the target application is interrupted by gprofng. When the program is interrupted, gprofng collects the necessary information, like the program counter, thread ID, etc. Hardware event counters (e.g. cache misses) can be collected as well.
Thanks to the sampling technology used, there is no need to rebuild the application and any existing executable can be profiled. This allows a profile to be made while the program is executing under production conditions.
The performance data collected can be displayed and analyzed in either text or html formats. Using extensive scripting features, the user can fully automate the data collection process and subsequent generation of profiles. These profiles may be fully customized, including the use of filters to zoom in on an area of particular interest.
For a more complete description of gprofng see the section Pointers to more Information for additional reading and viewing material. For those users interested in Java profiling in particular, we recommend the following introductory blog: gprofng: Java Profiling.
How to get started with gprofng?
There are various ways to get your copy of gprofng.
Build it from source:
The code is fully open sourced and licensed under the GPLv3+ license. It is included in GNU binutils, available in the sourceware.org git repository, or can be downloaded as a tar file as part of an official binutils release (starting from GNU binutils 2.40). The latest is version 2.42 released on January 29th, 2024 . This is the third release of the gprofng profiling tool.
Install it from a Linux distribution:
Various Linux distributions include gprofng today. These provide an easy way to install gprofng without the need to build it from scratch. It is available for Oracle Linux 8 and Oracle Linux 9 as an RPM under the name binutils-gprofng (subpackage of binutils), in the Add-ons yum channels. Specifically:
It is also available on Fedora, as binutils-gprofng, and on Debian and Ubuntu as part of the binutils package. Other distributions ship it as well.
Use the Linux Cloud Developer Image:
The Oracle Linux Cloud Developer Image, available in the Oracle Cloud Infrastructure, is a comprehensive Linux development environment which comes with a pre-installed gprofng. All you have to do to start using gprofng is to create an instance of this available image.
To make sure you have the latest release of gprofng in your instance, you can issue this command from the command line:
Copied to Clipboard
Error: Could not Copy
Copied to Clipboard
Error: Could not Copy
$ sudo yum update binutils-gprofng
Where to report issues and discuss development:
Any issues encountered while using gprofng, or suggestions for improvement, can be filed in the Sourceware Bugzilla. The developers of gprofng can be reached on the binutils mailing list.
A new gprofng GUI for graphical analysis of profiling data
We recently contributed a GUI for gprofng to the GNU project. The 1.0 version of the add-on Java based GUI for gprofng was released in 2023. In January 2024, version 1.1 was released which includes several usability improvements and bugfixes.
This powerful GUI works hand in hand with gprofng to allow the user to interactively deep dive into gprofng collected runtime profiles. Users can collect new runtime profiles, analyze application timelines, inspect multi-threading behavior, compare multiple profiles, review runtime flame graphs, or browse through annotated source and assembly code to find where the performance hot spots are.
The gprofng GUI project is hosted on savannah.gnu.org under the GPLv3+ license. To report any issues found during installation or usage of the GUI, or to request any additional functionality please report a bug or send a message to the GUI mailing list.
The add-on GUI requires gprofng to be installed (either built from the source or installed through an RPM or other Linux package). The GUI will work as long as it can find the gprofng commands.
The GUI can also be used to do offline analysis of data previously collected via gprofng, for instance on a remote server or small appliance, where the GUI cannot easily run.
The GUI is written in Java, so Java needs to be installed on the system before building the GUI. Java 8, or later is required.
Open Source community development
Both gprofng and its add-on GUI are GNU open source community projects. As we continue to develop gprofng and the GUI, we encourage and appreciate your feedback, and want thank the community for their support thus far.
Those wanting to learn more about or actively participate in the development community around these profiling tools see: The Binutils Archive or Gprofng GUI - Summary.
To learn more
For those interested in learning more about gprofng, or to see how other developers have used gprofng to gain insights into runtime behavior of their application, the following blogs, videos and documents may be of interest.
Blogs
Recorded presentations
Documentation