Difference between revisions of "Gprof Tutorial"
m |
(another question) |
||
Line 75: | Line 75: | ||
{{hidden begin | {{hidden begin | ||
− | |title = | + | |title = 5. How should the input parameters be when running the instrumented application? |
}} | }} | ||
<quiz display=simple> | <quiz display=simple> | ||
Line 90: | Line 90: | ||
{{hidden begin | {{hidden begin | ||
− | |title = | + | |title = 6. Which applications can be analyzed with Gprof? |
+ | }} | ||
+ | <quiz display=simple> | ||
+ | { | ||
+ | |type="()"} | ||
+ | - Only small examples | ||
+ | || | ||
+ | - Up to medium-sized applications with a running time below ~1 hour | ||
+ | || | ||
+ | + Even large real-world examples with huge running times | ||
+ | || True | ||
+ | </quiz> | ||
+ | {{hidden end}} | ||
+ | |||
+ | {{hidden begin | ||
+ | |title = 7. What is a call graph? | ||
}} | }} | ||
<quiz display=simple> | <quiz display=simple> | ||
Line 105: | Line 120: | ||
{{hidden begin | {{hidden begin | ||
− | |title = | + | |title = 8. How do you generate a call graph of a Gprof profile? |
}} | }} | ||
<quiz display=simple> | <quiz display=simple> | ||
Line 120: | Line 135: | ||
{{hidden begin | {{hidden begin | ||
− | |title = | + | |title = 9. What is gprof2dot? |
}} | }} | ||
<quiz display=simple> | <quiz display=simple> | ||
Line 135: | Line 150: | ||
{{hidden begin | {{hidden begin | ||
− | |title = | + | |title = 10. Does Gprof work with parallel applications? |
}} | }} | ||
<quiz display=simple> | <quiz display=simple> | ||
Line 150: | Line 165: | ||
{{hidden begin | {{hidden begin | ||
− | |title = | + | |title = 11. How much runtime overhead does Gprof produce? |
}} | }} | ||
<quiz display=simple> | <quiz display=simple> |
Revision as of 15:12, 3 December 2020
This tutorial deals with the topic of applications performance analysis with the GNU profiler Gprof. Profiling applications gives valuable insights into the program structure and exposes performance bottlenecks, which point to sections of the code where optimizations are most effective.
The tutorial covers all necessary basics to get started with Gprof: it shows how to instrument applications, how to generate performance information for an application run and how to evaluate the results. In addition, it explains how to visualize the application structure using call graphs and how to annotate the application's source code with runtime information. Three real-world examples from the areas of biology, computer science and mechanical engineering demonstrate that this works with different programming languages (C/C++, Fortran), different compilers (GNU, Intel) and even parallel applications (threads, MPI).
Quiz