Linux oprofile command

Source: Internet
Author: User

Linux oprofile command
I. Introduction oProfile is a powerful performance analysis tool on the Linux platform. It supports two sampling methods: Event-based sampling (eventbased) and time-based sampling, which can work on different architectures, including MIPS, ARM, IA32, IA64, and AMD. 2, installation 1) Open the kernel OPROFILE option, otherwise running oProfile will prompt: [root @ localhost oprofile-0.9.6] # opcontrol -- init FATAL: Module oprofile not found. FATAL: Module oprofile not found. kernel doesn' t support oprofile2) edit the Kernel configuration file :. config, change # CONFIG_OPROFILE is not set to CONFIG_OPROFILE = m (or y) [root @ localhost ~] # Cd/usr/src/linux-2.6.37.2 [root @ localhost linux-2.6.37.2] # vi. CONFIG_PROFILING = y CONFIG_X86_LOCAL_APIC = y CONFIG_X86_IO_APIC = y CONFIG_PCI_IOAPIC = y3) Compile the kernel and restart the machine http://www.linuxidc.com/Linux/2014-10/108768.htm4) download source code, compile and install wget http://cznic.dl.sourceforge.net/project/oprofile/oprofile/oprofile-1.0.0/oprofile-1.0.0.tar.gztar-zxvf oprofile-1.0.0.tar.gzcd oprofile-1.0.0. /configuremakemake ins Tall 3. tool set ophelp: list all supported events. Opcontrol: Set the events to be collected. Opreport: outputs statistical results. Opannaotate: generates source/assembly files with annotations. Source Language-level annotations must be supported when source files are compiled. Opstack: generate the call graph profile, but the x86/2.6 platform is required, and the call-graph patchopgprof is installed in linux2.6: generate results similar to gprof. Oparchive: Collects and packages all raw data files and analyzes them on another machine. Op_import: converts the sampled database files from another abi to the local cost format. 4. Use step 1) Start and check modprobe oprofile timer = 1 opcontrol -- no-vmlinuxopcontrol -- separate = kernelopcontrol -- init opcontrol -- reset opcontrol-start2) to run the test program. 3) stop opcontrol -- dumpopcontrol -- stopopcontrol -- shutdownopcontrol -- deinit4) detection result opreportopreport-l. /testopannotate -- source. /test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.