Oprofile in 2001 for Linux Kernel 2.4

Oprofile in 2001 for Linux Kernel 2.4

OProfile Yet Another Linux Preformance-Profiling Tool Yipeng Wang, Washington University in St. Louis Outline ● Introduction ● Features ● Tools ● Examples ● References ● Demo Introduction ● A relatively old tool: John Levon developed OProfile in 2001 for Linux kernel 2.4. ● A statistical profiler (No need to instrument code!) ● Before Version 0.9.7: Utilizes a kernel driver and a daemon to collect sample data; After Verion 0.9.8: uses the Linux Kernel Performance Event Subsystem in Linux 2.6.31 for sampling. Features ● Unobtrusive ● System-wide profiling ● Single process profiling ● Event counting ● Performance counter support ● Call-graph support ● Low overhead ● Post-profile analysis ● System support Common Tools ● ophelp ○ This utility lists the available events and short descriptions. ● operf ○ This is the program for collecting profile data. ● ocount ○ This tool is used for simple event counting. Common Tools ● opreport ○ This is the main tool for retrieving useful profile data. ● opannotate ○ This utility can be used to produce annotated source, assembly or mixed source/assembly. Source level annotation is available only if the application was compiled with debugging symbols. ● opgrof ○ This utility can output gprof-style data files for a binary, for use with gprof -p. Install ● Requires root access ● Get the latest version from OProfile website ● In terminal, run the # ./Configure & make & make install ● Note: to work with Java applications, --with-java flag needs to be added, and JDK path needs to be specified. ● Operf - Profiling a single program # operf [target_program] [args] Operf - Profiling a single program # opreport Example: profiling Wget # operf wget https://wordpress.org/latest.tar.gz # opreport Showing symbols Operf - System-wide profiling # operf --system-wide Operf - System-wide profiling # operf --system-wide Demo: Cache Optimization Without Padding Add Padding to Data Structure Add Padding to Data Structure Questions? References: OProfile Websites: https://oprofile.sourceforge.io/about/ https://oprofile.sourceforge.io/examples/ OProfile Tutorial: https://linuxhint.com/oprofile-tutorial/.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    20 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us