Difference between revisions of "Gprof Tutorial"

From HPC Wiki
Jump to navigation Jump to search
m (Included the correct Gprof tutorial video)
Line 2: Line 2:
 
[[Category:Tutorials | GPROF Tutorial]]
 
[[Category:Tutorials | GPROF Tutorial]]
 
{{Hpc_nrw_tutorial_box}}
 
{{Hpc_nrw_tutorial_box}}
 
 
Gprof is a free and easy-to-use profiler.
 
Gprof is a free and easy-to-use profiler.
  
Line 9: Line 8:
 
<youtube width="600" height="400" right>KRJD-jpxXF4</youtube>
 
<youtube width="600" height="400" right>KRJD-jpxXF4</youtube>
  
 +
=== Gprof Introduction + Pascal Example === <!--T:5-->
  
 
'''Quiz'''
 
'''Quiz'''
Line 70: Line 70:
 
{{hidden end}}
 
{{hidden end}}
  
{{Note|'''Exercises: no exercises in this section'''}}
 
  
 
=== C++ + Fortran Examples === <!--T:5-->
 
=== C++ + Fortran Examples === <!--T:5-->
Line 77: Line 76:
  
 
<youtube width="600" height="400" right>IfD9IPixgpo</youtube>
 
<youtube width="600" height="400" right>IfD9IPixgpo</youtube>
 
 
{{quiz_box|'''no quiz in this section'''}}
 
 
{{Note|'''Exercises: no exercises in this section'''}}
 

Revision as of 12:35, 2 November 2020


HPC.NRW
HPC.NRW
Associated Pages
+ This is an #HPC.NRW course
HPC Courses
1. Introduction to Linux in HPC
2. Gprof Tutorial
3. OpenMP in Small Bites


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

Gprof Introduction + Pascal Example

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


C++ + Fortran Examples

Show gprof in real world examples and introduce call graph.