Difference between revisions of "Gprof Tutorial"

From HPC Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
Gprof is a free and easy-to-use profiler.
 
Gprof is a free and easy-to-use profiler.
  
{{infobox table}}  
+
{{infobox}}  
  
 
__TOC__
 
__TOC__

Revision as of 17:57, 12 October 2020


Gprof is a free and easy-to-use profiler.


Introduction

Introduce tutorial structure, topic and speaker

Gprof Introduction + Pascal Example

Provide everything to run and make use of gprof.

Quiz

1. What lanuages can gprof profile?

Python, Java, Julia
C/C++, Fortran, Pascal
Haskell, Cobol, Brainfuck

2. How does gprof profiles an application?

By instrumenting the application during compilation.
Through static analysis of the source code

3. What compiler flag is used to instrument the application?

-pg
-pig
--profile

How should the parameters be when running the instrumented application?

Simple and understandable
Representative of the usual workload
Covering edge cases

Note: Exercises: no exercises in this section

C++ + Fortran Examples

Show gprof in real world examples and introduce call graph.


Quiz: no quiz in this section

Note: Exercises: no exercises in this section