From 2cf0b39b0b81c46418eba68f62fb013a09019440 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 15 Jun 2017 12:20:51 -0400 Subject: [PATCH] Start a FAQ help topic. Initial question "what does 'In file [heap]' mean?" Also updated README with some quick-install tips for RPM based systems. --- README | 22 ++++++++++++++++++++++ help/C/faq.page | 46 ++++++++++++++++++++++++++++++++++++++++++++++ help/C/index.page | 4 ++++ help/Makefile.am | 1 + help/cs/faq.page | 44 ++++++++++++++++++++++++++++++++++++++++++++ help/de/faq.page | 44 ++++++++++++++++++++++++++++++++++++++++++++ help/pl/faq.page | 44 ++++++++++++++++++++++++++++++++++++++++++++ help/pt_BR/faq.page | 44 ++++++++++++++++++++++++++++++++++++++++++++ help/sv/faq.page | 44 ++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 293 insertions(+) create mode 100644 help/C/faq.page create mode 100644 help/cs/faq.page create mode 100644 help/de/faq.page create mode 100644 help/pl/faq.page create mode 100644 help/pt_BR/faq.page create mode 100644 help/sv/faq.page diff --git a/README b/README index c2ca903..a6763bb 100644 --- a/README +++ b/README @@ -22,3 +22,25 @@ 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: + + ./autogen.sh # 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. + + diff --git a/help/C/faq.page b/help/C/faq.page new file mode 100644 index 0000000..e2bc347 --- /dev/null +++ b/help/C/faq.page @@ -0,0 +1,46 @@ + + +
+ + + + What does "In file [heap]" mean? + +

This means that sysprof believes a function was called from somewhere in + the program's heap (where malloc allocates memory) rather than + the code section (where executable code normally lives.) There are several + possible explanations. +

+ +
+ JIT (Just in Time) compilers + +

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.

+
+ +
+ Optimizing compilers + +

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 + where.

+ + +

For gcc, the flag -fno-omit-frame-pointer will prevent + this optimization. The flag is not always needed, for example on x86_64 + machines it is only needed with -O3 optimization.

+
+ + +

To get the most detailed and accurate call tree from un-optimized + code, use these flags: -ggdb -fno-omit-frame-pointer -O0

+
+
+
+
diff --git a/help/C/index.page b/help/C/index.page index 56596f1..e0de392 100644 --- a/help/C/index.page +++ b/help/C/index.page @@ -15,4 +15,8 @@ Profiling +
+ Frequently Asked Questions +
+ diff --git a/help/Makefile.am b/help/Makefile.am index f14aeb2..564136e 100644 --- a/help/Makefile.am +++ b/help/Makefile.am @@ -10,6 +10,7 @@ HELP_FILES = \ index.page \ introduction.page \ profiling.page \ + faq.page \ legal.xml # Translated languages diff --git a/help/cs/faq.page b/help/cs/faq.page new file mode 100644 index 0000000..1b14f2f --- /dev/null +++ b/help/cs/faq.page @@ -0,0 +1,44 @@ + + + +
+ + + + What does "In file [heap]" mean? + +

This means that sysprof believes a function was called from somewhere in + the program's heap (where malloc allocates memory) rather than + the code section (where executable code normally lives.) There are several + possible explanations. +

+ +
+ JIT (Just in Time) compilers + +

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.

+
+ +
+ Optimizing compilers + +

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 + where.

+ + +

For gcc, the flag -fno-omit-frame-pointer will prevent + this optimization. The flag is not always needed, for example on x86_64 + machines it is only needed with -O3 optimization.

+
+ + +

To get the most detailed and accurate call tree from un-optimized + code, use these flags: -ggdb -fno-omit-frame-pointer -O0

+
+
+
+
diff --git a/help/de/faq.page b/help/de/faq.page new file mode 100644 index 0000000..a8164e2 --- /dev/null +++ b/help/de/faq.page @@ -0,0 +1,44 @@ + + + +
+ + + + What does "In file [heap]" mean? + +

This means that sysprof believes a function was called from somewhere in + the program's heap (where malloc allocates memory) rather than + the code section (where executable code normally lives.) There are several + possible explanations. +

+ +
+ JIT (Just in Time) compilers + +

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.

+
+ +
+ Optimizing compilers + +

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 + where.

+ + +

For gcc, the flag -fno-omit-frame-pointer will prevent + this optimization. The flag is not always needed, for example on x86_64 + machines it is only needed with -O3 optimization.

+
+ + +

To get the most detailed and accurate call tree from un-optimized + code, use these flags: -ggdb -fno-omit-frame-pointer -O0

+
+
+
+
diff --git a/help/pl/faq.page b/help/pl/faq.page new file mode 100644 index 0000000..c90999a --- /dev/null +++ b/help/pl/faq.page @@ -0,0 +1,44 @@ + + + +
+ + + + What does "In file [heap]" mean? + +

This means that sysprof believes a function was called from somewhere in + the program's heap (where malloc allocates memory) rather than + the code section (where executable code normally lives.) There are several + possible explanations. +

+ +
+ JIT (Just in Time) compilers + +

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.

+
+ +
+ Optimizing compilers + +

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 + where.

+ + +

For gcc, the flag -fno-omit-frame-pointer will prevent + this optimization. The flag is not always needed, for example on x86_64 + machines it is only needed with -O3 optimization.

+
+ + +

To get the most detailed and accurate call tree from un-optimized + code, use these flags: -ggdb -fno-omit-frame-pointer -O0

+
+
+
+
diff --git a/help/pt_BR/faq.page b/help/pt_BR/faq.page new file mode 100644 index 0000000..8a2116a --- /dev/null +++ b/help/pt_BR/faq.page @@ -0,0 +1,44 @@ + + + +
+ + + + What does "In file [heap]" mean? + +

This means that sysprof believes a function was called from somewhere in + the program's heap (where malloc allocates memory) rather than + the code section (where executable code normally lives.) There are several + possible explanations. +

+ +
+ JIT (Just in Time) compilers + +

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.

+
+ +
+ Optimizing compilers + +

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 + where.

+ + +

For gcc, the flag -fno-omit-frame-pointer will prevent + this optimization. The flag is not always needed, for example on x86_64 + machines it is only needed with -O3 optimization.

+
+ + +

To get the most detailed and accurate call tree from un-optimized + code, use these flags: -ggdb -fno-omit-frame-pointer -O0

+
+
+
+
diff --git a/help/sv/faq.page b/help/sv/faq.page new file mode 100644 index 0000000..de5b60e --- /dev/null +++ b/help/sv/faq.page @@ -0,0 +1,44 @@ + + + +
+ + + + What does "In file [heap]" mean? + +

This means that sysprof believes a function was called from somewhere in + the program's heap (where malloc allocates memory) rather than + the code section (where executable code normally lives.) There are several + possible explanations. +

+ +
+ JIT (Just in Time) compilers + +

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.

+
+ +
+ Optimizing compilers + +

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 + where.

+ + +

For gcc, the flag -fno-omit-frame-pointer will prevent + this optimization. The flag is not always needed, for example on x86_64 + machines it is only needed with -O3 optimization.

+
+ + +

To get the most detailed and accurate call tree from un-optimized + code, use these flags: -ggdb -fno-omit-frame-pointer -O0

+
+
+
+
-- 2.9.4