12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

456CHAPTER 22Monitoring and Tuning ApplicationsTABLE 22.2Continued-t Only display data for symbols with more than the provided percentageof total samples.-V Display verbose output. Useful for debugging.-v Display opreport version.Using opannotate to Analyze SamplesThe opannotate utility generates an annotated listing of the assembly or source codealong with the samples. To compile an annotated list of the assembly, use the followingcommand:opannotate --assembly Producing an annotated listing of the source code is possible with a similar command:opannotate --source However, the executable has to contain debug information. If the program is in C or C++,debug information can be created by using the -g option to gcc. By default, the softwaredistributed with <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong> is not compiled with debug information.However, the debug information necessary to produce meaningful output with opannotatecan be installed using the associated debuginfo RPM packages. Just as the kernel-debuginfopackage was installed so kernel data could be sampled, other packages have equivalentpackages such as bash-debuginfo and httpd-debuginfo. The debug files from thesepackages are installed in the /usr/lib/debug/ directory. Again, these debuginfo packagescan be downloaded from the ftp.redhat.com FTP server using anonymous login.TIPRefer to the opannotate man page with the man opannotate command for morecommand-line options such as -e to exclude certain symbols from the list.OProfile ReviewThe following is a summary of all the commands necessary to use OProfile:1. Before starting OProfile each time, make sure it is shut down and clear all previousdata sampled:opcontrol --shutdownopcontrol --reset2. Set up which kernel to profile:opcontrol --setup \--vmlinux=/usr/lib/debug/lib/modules/`uname -r`/vmlinux

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!