Systemtap Frank Ch. Eigler software developer. Systemtap review Script language is safely compiled into C kernel module Module uses kprobes and other.

Slides:



Advertisements
Similar presentations
Objects and Classes David Walker CS 320. Advanced Languages advanced programming features –ML data types, exceptions, modules, objects, concurrency,...
Advertisements

Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
Chapter 7 Process Environment Chien-Chung Shen CIS, UD
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
Chapter 10 Storage management
G Robert Grimm New York University Extensibility: SPIN and exokernels.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
G Robert Grimm New York University Extensibility: SPIN and exokernels.
Server Architecture Models Operating Systems Hebrew University Spring 2004.
A Static Analysis Framework For Embedded Systems Nathan Cooprider John Regehr's Embedded Systems Group.
B. RAMAMURTHY CH.4 IN KERNIGHAN AND RITCHIE C TEXTBOOK C Language: Functions 5/11/2013 Amrita-UB-MSES
Extensibility, Safety and Performance in the SPIN Operating System Ashwini Kulkarni Operating Systems Winter 2006.
Getting Started The structure of a simple wxWidgets program, Look at where and how a wxWidgets application starts and ends, how to show the main window,
Memory Management 3 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
Computer Science Detecting Memory Access Errors via Illegal Write Monitoring Ongoing Research by Emre Can Sezer.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
Defining and Converting Data Copyright Kip Irvine, 2003 Last Update: 11/4/2003.
A summary by Nick Rayner for PSU CS533, Spring 2006
November 25, KFT & Tracing Collaboration Tim Bird Sony Electronics.
ICS 313: Programming Language Theory Chapter 14: Exceptions.
Chapter 1 Introduction Major Data Structures in Compiler
CSE 381 – Advanced Game Programming GLSL. Rendering Revisited.
Applying Translucid Contracts for Modular Reasoning about Aspect and Object Oriented Events Mehdi Bagherzadeh Gary T. Leavens Robert Dyer Foundations of.
Session 07 Module 13 - Collections. Collections / Session 7 / 2 of 32 Review  A delegate in C# is used to refer to a method in a safe manner.  To invoke.
1 Compiler & its Phases Krishan Kumar Asstt. Prof. (CSE) BPRCE, Gohana.
2 Processor(s)Main MemoryDevices Process, Thread & Resource Manager Memory Manager Device Manager File Manager.
Threads A thread is an alternative model of program execution
1 JIFL: JIT Instrumentation Framework for Linux Marek Olszewski Adam Czajkowski Keir Mierle University of Toronto.
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
CS533 Concepts of Operating Systems Jonathan Walpole.
Kernel Structure and Infrastructure David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Chapter 7 Process Environment Chien-Chung Shen CIS/UD
1 © 2007 Mauro Morsiani Laboratorio di Sistemi Operativi Anno Accademico Software Development with uMPS Part 2 Mauro Morsiani Copyright © 2007.
FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 FUDConBrussels THIS IS SYSTEMTAP Dynamic instrumentation.
WORKING OF SCHEDULER IN OS
Big Picture of Linux Probe and Trace Tools
Process concept.
YAHMD - Yet Another Heap Memory Debugger
Tracing and Performance Analysis Tools for Heterogeneous Multicore System by Soon Thean Siew.
Ch 1. A Python Q&A Session Bernard Chen 2007.
Operating Systems: A Modern Perspective, Chapter 6
Livepatching data structures
Software Development with uMPS
Production Debugging in a Serverless World
Course Name: QTP Trainer: Laxmi Duration: 25 Hrs Session: Daily 1 Hr.
Techniques of Logistics System Analysis: Long-Run/Dynamic Analysis
Compiler Design 18. Object Oriented Semantic Analysis (Symbol Tables, Type Checking) Kanat Bolazar March 30, 2010.
Names, Binding, and Scope
C# Event Processing Model
Improving software quality using Visual Studio 11 C++ Code Analysis
SUDS: An Infrastructure for Creating Bug Detection Tools
Jihyun Park, Changsun Park, Byoungju Choi, Gihun Chang
Chap. 8 :: Subroutines and Control Abstraction
Chap. 8 :: Subroutines and Control Abstraction
System Structure and Process Model
COEN 252 Computer Forensics
Memory Allocation CS 217.
Memory Management Tasks
Pointers C#, pointers can only be declared to hold the memory addresses of value types int i = 5; int *p; p = &i; *p = 10; // changes the value of i to.
Kernel Structure and Infrastructure
Lecture 3: Main Memory.
ورود اطلاعات بصورت غيربرخط
Chapter 7 –Implementation Issues
Chris Gill CSE 522S – Advanced Operating Systems
Implementing Processes, Threads, and Resources
Ninth step for Learning C++ Programming
Tenth step for Learning C++ Programming
Run-time environments
Lecture 10 review Booting sequence in Brief
Presentation transcript:

Systemtap Frank Ch. Eigler software developer

Systemtap review Script language is safely compiled into C kernel module Module uses kprobes and other event sources Probes may just trace, or analyze, aggregate, act Includes reusable probe libraries User-space probing coming soon

Tracing/probing degrees of freedom Probe points – where to probe Probe handling – what to do there Cost of dormant probe Active probe dispatch cost

Dynamic probing Probe point: any location, may be identified by source-level “co-ordinates” Probe handler: a bunch of safe code to extract and process context values; online processing possible Dormant probes are free Dispatch cost high (trap handling)

Static tracing Probe point: wherever hooks are compiled in Fixed probe handler: collect fixed pool of context data, dump it to buffer; off-line post-processing Low cost dormant probes (how low?) Dispatch cost low (how low?)

Static instrumentation markers Decoupling probe point and handler To create: place it, name it, parametrize it. That's it: STAP_MARK_NN(context_switch,prev->pid,next->pid); To use from systemtap: probe kernel.mark(“context_switch”) { print($arg1) } #define STAP_MARK_NN(n,a1,a2) do { \ static void (*__stap_mark_##n##_NN)(int64_t,int64_t); \ if (unlikely (__stap_mark_##n##_NN)) \ (void) (__stap_mark_##n##_NN((a1),(a2))); \ } while (0)

How systemtap uses markers: Compile probe handler the usual way Find static variable's location from symbol table Demangle event name, parameter types/arity for custom glue function During probe session startup, cmpxchg function pointer Thence kernel calls probe handler with params During shutdown, cmpxchg it back to NULL

What's next? Convert J Axboe's blocktrace probe points to static markers Convert associated tracing probe handlers to systemtap script Write non-systemtap alternative backend for tracing If successful, lobby others to convert their tracer widgets similarly