Commit 195b6020 authored by Alan Conway's avatar Alan Conway Committed by Christian Hergert
Browse files

help: add FAQ to help topics

 - Initial question "what does 'In file [heap]' mean?"
 - Also updated README with some quick-install tips for RPM based systems.
parent 4cb42d2f
......@@ -22,3 +22,23 @@ Debugging symbols
- The programs and libraries you want to profile should be compiled
with -fno-omit-frame-pointer and have debugging symbols available,
or you won't get much usable information.
Building Sysprof
You need some packages installed. The package names may vary depending on your
distribution, the following command works on Fedora 25:
sudo dnf install gcc make autoconf automake autopoint libtool ghc-gio
Then do the following:
./ # configure, generate makefiles etc.
make # Build the code
make install # Install (default prefix /usr/local)
WARNING: `make install` will mostly install under the configured install prefix
but installs systemd service configuration directly in the system default
location `/usr/lib/systemd` so it won't work without root privileges, even if
the install prefix is a user-owned directory.
<page xmlns=""
<section id="what-does-heap-mean">
<link type="guide" xref="index#faq"/>
<title>What does "In file [heap]" mean?</title>
<p>This means that sysprof believes a function was called from somewhere in
the program's heap (where <code>malloc</code> allocates memory) rather than
the code section (where executable code normally lives.) There are several
possible explanations.
<title>JIT (Just in Time) compilers</title>
<p>Languages like Java can generate executable code while a program is
running and store it in the heap. Sysprof is accurately reporting the
situation in this case.</p>
<title>Optimizing compilers</title>
<p>C and C++ compilers can optimize away information needed to determine a
function's caller, so it is mistaken for [heap]. You can still tell how
often each function is called by the program, but not always from
<p>For gcc, the flag <code>-fno-omit-frame-pointer</code> will prevent
this optimization. The flag is not always needed, for example on x86_64
machines it is only needed with -O3 optimization.</p>
<p>To get the most detailed and accurate call tree from un-optimized
code, use these flags: <code>-ggdb -fno-omit-frame-pointer -O0</code></p>
......@@ -15,4 +15,8 @@
<section id="faq">
<title>Frequently Asked Questions</title>
......@@ -10,6 +10,7 @@ HELP_FILES = \ \ \ \ \
# Translated languages
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment