![]() |
< Day Day Up > |
![]() |
10.4. Configure the Application for the Performance HuntThe next step in our investigation is to set up the application for the performance hunt by recompiling the application with symbols. Symbols allow the performance tools (such as oprofile) to investigate which functions and source lines are responsible for all the CPU time that is being spent. For the GIMP, we download the latest GIMP tarball from its Web site, and then recompile it. In the case of GIMP and much open-source software, the first step in recompilation is running the configure command, which generates the makefiles that will be used to build the application. The configure command passes any flags present in the CFLAGS environmental variable into the makefile. In this case, because we want the GIMP to be built with symbols, we set the CFLAGS variable to contain -g3. This causes symbols to be included in the binaries that are built. This command is shown in Listing 10.3 and overrides the current value of the CFLAGS environmental variable and sets it to -g3. Listing 10.3.[root@localhost gimp-2.0.3]# env CFLAGS=-g3 ./configure We then make and install the version of GIMP with all the symbols included, and when we run this version, the performance tools will tell us where time is being spent. |
![]() |
< Day Day Up > |
![]() |