Question: Please help In c code on the Ubuntu terminal, and answer the questions System Profiling In addition to memory debugging, there are similar tools designed
Please help In c code on the Ubuntu terminal, and answer the questions
System Profiling
In addition to memory debugging, there are similar tools designed to profile the flow of execution through a program and report its use of system/library calls (providing useful debugging info). The utility program used in this part of the lab is called strace; please read the man pages to discover its operation and use. Run the strace utility on the executable of the Sample Program:
#include Ok, now read the man pages again to discover how to use command-line options to get a less cluttered output from strace/ltrace. Look for the option that reports a summary for each call. Then use the output to answer the following questions: 1. How many times is the write() system call invoked when running Sample Program 2? Note: experiment. Then try to express your answer as a formula. 2. Examine the source code and output to answer the question: what is the primary 'C' library subroutine that causes the write() system call to be invoked while executing Sample Program?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
