Advanced performance debugging means (Oprofile+gprofile) + kernel tracking: LTT

Source: Internet
Author: User

Yum Install Oprofile

1 , disabling daemons (Close daemons) 2 , shutting down the GUI (turn off GUI) 3 , changing kernel parameters (change kernel parameters)4, kernel parameters (kernel parameter)5, Tuning the Processor Subsystem (processor subsystem tuning)6, Tuning the memory subsystem (System tuning)7, Tuning the file System (FileSystem subsystem Tuning)8, Tuning the network subsystem (Networking subsystem tuning)

It supports two methods of sampling (sampling): Event-based sampling (Eventbased) and time-based sampling (times based). Event-based sampling is the number of occurrences of a specific event (such as the L2 cache miss) that is recorded by the Oprofile, and the Oprofile is recorded when the user-defined value is reached.
This approach requires a performance counter (performace counter) inside the CPU. Time-based sampling is a mechanism for oprofile with an OS clock interrupt, which is recorded once per clock interrupt oprofile (picking a sample).
The purpose of the introduction is to provide support for CPUs that do not have performance counters. Its accuracy is lower relative to event-based sampling. Because the OS clock interrupt support is needed, the code oprofile to disable interrupts cannot be parsed. Oprofile is divided into two parts on Linux, one is the kernel module (Oprofile.ko), and the other is the daemon for user space (oprofiled). The former is responsible for accessing performance counters or registering functions based on time sampling (registered with Register_timer_hook so that the clock interrupt handler is last executed Profile_tick
And sampling is placed in the buffer area of the kernel. The latter runs in the background and is responsible for collecting data from the kernel space and writing to the file. Step A. Initialize Opcontrol--INITB. Configure Opcontrol--setup--Event=.... c. Start Opcontrol--STARTD. Run the program you want to analyze Xxxe. Remove Data Opcontrol--Dump Opcontrol--Stopf. Analysis Results Opreport-L./xxx
 gprof function: Print out the elapsed time of each function in the program, and help the programmer to find the most time-consuming functions in many functions. Generating a function call relationship at runtime, including the number of calls, can help the programmer to analyze the program's running flow. Gprof implementation principle: By the time you compile and link the program (using -pg compile and Link options), GCC adds the name 
Mcount (or "_ in each function of the application) Mcount ", or" __mcount ", a function that relies on the compiler or the operating system,
which means that every function in the application calls Mcount, and Mcount saves a function call graph in memory, and find the address of the child function and the parent function in the form of the function call stack. The
Call graph also holds all the information about the call time, the number of calls, and so on for the function. Gprof Basic usage: 1 . Use-pg compile and link the application. 2 3 . Use the GPROF program to analyze the data generated by the application.
LTT is a tool for tracking the detailed operating state and process of the system, which tracks specific events in the system. These events include:? System call entry and exit? Traps /Interrupts (trap//Read/write/seek/ Ioctl, etc.) memory management related events: Memory allocations //socket/networks, etc.

http://lttng.org/docs/

is for
User applications and libraries. LTTng consists of kernel modules ( for
and dynamically loaded libraries ( for was controlled by a session daemon,
from interface.

MontaVista devrocket: Embedded Linux IDE Development tools

Lmbench-tools for performance analysis
http://www.bitmover.com/lmbench/

Advanced performance debugging means (Oprofile+gprofile) + kernel tracking: LTT

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.