Profiling and Optimization Flashcards
1
Q
What is real time (wall clock time)?
A
Total time from start to finish
2
Q
What is CPU time?
A
Time spent executing instructions
3
Q
What is User CPU time?
A
Time spent executing in user mode (your code)
4
Q
What is System CPU time?
A
Time spent executing in kernel mode (OS code)
5
Q
What is an execution profile?
A
Locates hot spots and improves performance
6
Q
How to use gprof?
A
- Compile and link program with -pg option to gcc
- Run the program, creating a data file gmon.out
- Use gprof command to produce a report