FUDConBrussels 2007 - Fedora ProjectFedora Project – 24 February 2007 FUDConBrussels THIS IS SYSTEMTAP Dynamic instrumentation.

Slides:



Advertisements
Similar presentations
K T A U Kernel Tuning and Analysis Utilities Department of Computer and Information Science Performance Research Laboratory University of Oregon.
Advertisements

Program Development Tools The GNU (GNU’s Not Unix) Toolchain The GNU toolchain has played a vital role in the development of the Linux kernel, BSD, and.
IGOR: A System for Program Debugging via Reversible Execution Stuart I. Feldman Channing B. Brown slides made by Qing Zhang.
RIVERSIDE RESEARCH INSTITUTE Helikaon Linux Debugger: A Stealthy Custom Debugger For Linux Jason Raber, Team Lead - Reverse Engineer.
Introduction Characteristics of USB System Model What needs to be done Platform Issues Conceptual Issues Timeline USB Monitoring Final Presentation 10.
CS-3013 & CS-502, Summer 2006 Virtual Machine Systems1 CS-502 Operating Systems Slides excerpted from Silbershatz, Ch. 2.
Processes CSCI 444/544 Operating Systems Fall 2008.
1 CSE 451 Section Autumn 2004 Alex Moshchuk Office hours: Tue 1-2, Thu 4:30-5:30 Allen 218 (or lab)
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
L. Granado Cardoso, F. Varela, N. Neufeld, C. Gaspar, C. Haen, CERN, Geneva, Switzerland D. Galli, INFN, Bologna, Italy ICALEPCS, October 2011.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Wind River VxWorks Presentation
A Day in the Life of a Systems Administrator So you want to be a sysadmin? Presented by: Austin Grice and Gayathri Swaminathan Oklahoma Information Technology.
Paradyn Week – April 14, 2004 – Madison, WI DPOMP: A DPCL Based Infrastructure for Performance Monitoring of OpenMP Applications Bernd Mohr Forschungszentrum.
© 2013 IBM Corporation Get started on IBM Linux on Power SDK November 2013.
2INC0 Operating Systems Introduction to Linux
Threading Models in Visual Basic Language Student Name: Danyu Xu Student ID:98044.
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Install Software. UNIX Shell The UNIX/LINUX shell is a program important part of a Unix system. interface between the user & UNIX kernel starts running.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
January 25th, CE Linux Forum Technical Conference1 Bootup Time Working Group Discussion Tim Bird, Chair.
CS 346 – Chapter 4 Threads –How they differ from processes –Definition, purpose Threads of the same process share: code, data, open files –Types –Support.
Performance Monitoring Tools on TCS Roberto Gomez and Raghu Reddy Pittsburgh Supercomputing Center David O’Neal National Center for Supercomputing Applications.
November 25, KFT & Tracing Collaboration Tim Bird Sony Electronics.
Power Profiling using Sim-Panalyzer Andria Dyess and Trey Brakefield CPE631 Spring 2005.
Overview of dtrace Adam Leko UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red: Negative note Green: Positive.
Express Application Delivery 1 Ralph Chen Innovative Solutions Co. Ltd Confidential Gaming Application Development Solution Innovation is based on ideas.
COMMON INTERFACE FOR EMBEDDED SOFTWARE CONFIGURATION by Yatiraj Bhumkar Advisor Dr. Chung-E Wang Department of Computer Science CALIFORNIA STATE UNIVERSITY,
Docker and Container Technology
Byoung-Jo CHOI Fall 2007 SW Project II Advanced Linux Programming.
Unit - V. Debugging GNU Debugger helps you in getting information about the following: 1.If a core dump happened, then what statement or expression did.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science The University of Arizona, Tucson
Performance profiling of Experiments’ Geant4 Simulations Geant4 Technical Forum Ryszard Jurga.
© 2002 IBM Corporation Confidential | Date | Other Information, if necessary Copyright © 2009 Ericsson, Made available under the Eclipse Public License.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
UDI Technology Benefits Slide 1 Uniform Driver Interface UDI Technology Benefits.
CS252: Systems Programming Ninghui Li Based on Slides by Gustavo Rodriguez-Rivera Topic 2: Program Structure and Using GDB.
Beyond Application Profiling to System Aware Analysis Elena Laskavaia, QNX Bill Graham, QNX.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
1 Chapter 5: Threads Overview Multithreading Models & Issues Read Chapter 5 pages
All about Eugene Teo Linux Users' Group (Singapore) April 2006 Meeting Core 5.
Tgt: Framework Target Drivers FUJITA Tomonori NTT Cyber Solutions Laboratories Mike Christie Red Hat, Inc Ottawa Linux.
FUDConBrussels FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Thomas Canniot FUDConBrussels Organisation.
Systemtap Frank Ch. Eigler software developer. Systemtap review Script language is safely compiled into C kernel module Module uses kprobes and other.
Tracing for Hardware, Driver and Binary Reverse Engineering in Linux Mathieu Desnoyers Recon 2006.
Computer System Structures
SQL Database Management
Overview – SOE Cfengine v3.4.0
Introduction to threads
Virtual Machine Monitors
Chapter 4: Threads.
ABRT (Automatic Bug Reporting Tool)
CS399 New Beginnings Jonathan Walpole.
Performance Tuning Team Chia-heng Tu June 30, 2009
KERNEL ARCHITECTURE.
Exceptional Control Flow: System Calls, Page Faults etc.
Course Name: QTP Trainer: Laxmi Duration: 25 Hrs Session: Daily 1 Hr.
Topic 2e High-Level languages and Systems Software
What’s new in COBOL for z/OS since V4.2
Chapter 2: The Linux System Part 1
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science
Chapter 2: Operating-System Structures
SCONE: Secure Linux Containers Environments with Intel SGX
Dynamic Binary Translators and Instrumenters
Presentation transcript:

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 FUDConBrussels THIS IS SYSTEMTAP Dynamic instrumentation for the Linux kernel Bryn Reeves Software maintenance engineer Fosdem 2007

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Overview Project goals and motivations Architecture & requirements Running scripts SystemTap scripting Examples Future work Links & docs

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Project Founded in 2005 Project members include Red Hat, IBM, Intel and Hitachi Free software infrastructure to simplify the gathering of information about the running Linux kernel SystemTap is possible because Linux is open source Complements related tools including Oprofile, LTT, Frysk, (k)gdb, crash Project pages hosted at

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Motivation Some projects require deep insight into OS internals Current performance tools are useful, but inadequate for many tasks Application centric tools narrow in scope Tools with system-wide scope present a static view of system behavior but do not permit further probing Many problems are not readily exposed by traditional tools A more flexible solution is needed

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 SystemTap architecture ● Infrastructure to access low-level kernel probes ● A scripting language for writing instrumentation ● User space translator/driver and daemon (stap & stpd) ● Kernel space runtime infrastructure ● System supplied tapset libraries for commonly used probes and functions

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 SystemTap Infrastructure Kernel probe.ko kprobes jprobes kretprobes relay fs runtime proc fs Userspace stpd stap.k o tapsets runtime source.stp output timers, profili ng

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 SystemTap requirements Supported from Fedora Core 5 onward RPM dependencies GCC toolchain kernel-devel kernel-debuginfo Now split into common, xen, kdump, and PAE sub-packages FC5 kernel-debuginfo was around 1G on i686! Default yum configuration now knows about debuginfo

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 How do I use it? SystemTap provides a scripting interface probe begin { print("Hello World!\n") ; exit() } These scripts name events and give them handlers An event and its handler is a probe When a specified event occurs, the kernel executes the handler and then goes back to whatever it was doing Similar idea and implementation to a breakpoint Low overhead (30,000 probes/sec with 1% overhead)

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Running probes stap [ OPTIONS ] [-e SCRIPT|FILENAME] [ ARGUMENTS ] SystemTap uses sudo for privileged actions Logs to terminal or file Binary dumps for post-mortem analysis (LKET)

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Probe execution

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Show me some code, dammit! global reads probe begin { print(“probe begins\n”) } probe syscall.read { reads[execname()] <<< count } probe end { foreach (progname in reads) { printf(“%s reads: %d, “, printf(“total bytes: %d, } Global variables Script startup and shutdown events Built-in functions Associative arrays Aggregation operator and stats functions Pre-defined tapsets

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Variables, startup and shutdown global reads probe begin { print(“probe begins\n”) } probe syscall.read { reads[execname()] <<< count } probe end { foreach (progname in reads) { printf(“%s reads: %d, “, printf(“total bytes: %d, } Global variables Script startup and shutdown events Built-in functions Associative arrays Aggregation operator and stats functions Pre-defined tapsets

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Functions, arrays, stats and tapsets global reads probe begin { print(“probe begins\n”) } probe syscall.read { reads[execname()] <<< count } probe end { foreach (progname in reads) { printf(“%s reads: %d, “, printf(“total bytes: %d, } Global variables Script startup and shutdown events Built-in functions Associative arrays Aggregation operator and stats functions Pre-defined tapsets

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Some examples Trace and analyze open(2) Who's messing with my file?... and what about my device? Implementing strace(1) as a SystemTap script Gathering memory and performance statistics Discovering process properties Abusing SystemTap for fun and profit

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Future Work Introducing utrace – new infrastructure for user-space debugging and tracing Replaces ptrace layer in the kernel Kernel support for perfmon2 (performance counter access) Improve SystemTap binary portability SystemTap user interfaces More tapsets

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 Want to know more? Man pages stap(1), stapex(5), stapprobes(5), stapfuncs(5) Website: Wiki: Mailing list: IRC channel: #systemtap on irc.freenode.net

FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 The team