 Instrumentation code is automatically inserted into the program code during compilation (for example, by using the '-pg' option of the gcc compiler), to gather caller-function data.A call to the monitor function 'mcount' is inserted before each function call.Sampling data is saved in 'gmon.out' or in "'progname".gmon' file just before the program exits, and can be analyzed with the 'gprof' command-line tool.