324_Book

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: insert_string (which itself was called 946,596 times). Function find_ele_rec in turn called two other functions: save_string and new_ele, each a total of 26,946 times. From this calling information, we can often infer useful information about the program behavior. For example, the function find_ele_rec is a recursive procedure that scans a linked list looking for a particular string. Given that the ratio of recursive to top-level calls was 5.15, we can infer that it required scanning an average of around 6 elements each time. Some properties of GPROF are worth noting: ¯ The timing is not very precise. It is based on a simple interval counting scheme, as will be discussed in Chapter 9. In brief, the compiled program maintains a counter for each function recording the time spent executing that function. The operating system causes the program to be interrupted at some regular time interval Æ . Typical values of Æ range between 1.0 and 10.0 milliseconds. It then determines what function the program was executi...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online