Overview of dtrace Adam Leko UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red: Negative note Green: Positive.

Slides:



Advertisements
Similar presentations
Dynamic Tracing using DTrace tm By Sameer Niphadkar.
Advertisements

Profiler In software engineering, profiling ("program profiling", "software profiling") is a form of dynamic program analysis that measures, for example,
Huimei Lu Chapter1 Solaris Overview —— Feature and architecture.
Last update: August 9, 2002 CodeTest Embedded Software Verification Tools By Advanced Microsystems Corporation.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
Measuring Performance Chapter 12 CSE807. Performance Measurement To assist in guaranteeing Service Level Agreements For capacity planning For troubleshooting.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
Why Threads Are A Bad Idea (for most purposes) John Ousterhout Sun Microsystems Laboratories
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
1 Tuning PL/SQL procedures using DBMS_PROFILER 20-August 2009 Tim Gorman Evergreen Database Technologies, Inc. Northern California Oracle.
Overview of Eclipse Parallel Tools Platform Adam Leko UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red:
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Sage CRM Developers Course
What are Exception and Interrupts? MIPS terminology Exception: any unexpected change in the internal control flow – Invoking an operating system service.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Building Applications.
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
LAYING OUT THE FOUNDATIONS. OUTLINE Analyze the project from a technical point of view Analyze and choose the architecture for your application Decide.
The Art of Debugging Shlomy Gantz 02/13/01MDCFUG.
Topics Introduction Hardware and Software How Computers Store Data
University of Maryland parseThat: A Robust Arbitrary-Binary Tester for Dyninst Ray Chen.
Java: Chapter 1 Computer Systems Computer Programming II.
PHP TUTORIAL. HISTORY OF PHP  PHP as it's known today is actually the successor to a product named PHP/FI.  Created in 1994 by Rasmus Lerdorf, the very.
Analyzing parallel programs with Pin Moshe Bach, Mark Charney, Robert Cohn, Elena Demikhovsky, Tevi Devor, Kim Hazelwood, Aamer Jaleel, Chi- Keung Luk,
COLD FUSION Deepak Sethi. What is it…. Cold fusion is a complete web application server mainly used for developing e-business applications. It allows.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
Overview of CrayPat and Apprentice 2 Adam Leko UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red: Negative.
SvPablo Evaluation Report Hans Sherburne, Adam Leko UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red:
1 CSE 451 Section 2: Interrupts, Syscalls, Virtual Machines, and Project 1.
Embedded Software SKKU 14 1 Sungkyunkwan University Tizen v2.3 Application Profiling & Debugging.
DARPA Jul A Binary Agent Technology for COTS Software Integrity Anant Agarwal Richard Schooler InCert Software.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
Debugging and Profiling With some help from Software Carpentry resources.
Dynaprof Evaluation Report Adam Leko, Hans Sherburne UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red:
Debugging parallel programs. Breakpoint debugging Probably the most widely familiar method of debugging programs is breakpoint debugging. In this method,
HPCToolkit Evaluation Report Hans Sherburne, Adam Leko UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red:
FTP Short for File Transfer Protocol, the protocol for exchanging files over the Internet.protocolfilesInternet works in the same way as HTTP for transferring.
Tool Visualizations, Metrics, and Profiled Entities Overview [Brief Version] Adam Leko HCS Research Laboratory University of Florida.
Dynaprof Evaluation Report Adam Leko, Hans Sherburne UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red:
CS Computer Science I. BCPL was developed in 1967 as a language for writing operating systems and software compilers In 1970, the creators of the.
Overview of AIMS Hans Sherburne UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red: Negative note Green:
M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young MACH: A New Kernel Foundation for UNIX Development Presenter: Wei-Lwun.
Testing plan outline Adam Leko Hans Sherburne HCS Research Laboratory University of Florida.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
E Virtual Machines Lecture 6 Topics in Virtual Machine Management Scott Devine VMware, Inc.
Profiling/Tracing Method and Tool Evaluation Strategy Summary Slides Hung-Hsun Su UPC Group, HCS lab 1/25/2005.
Cool CF Debugging Shlomy Gantz 07/29/01CF_ODYSSEY.
Beyond Application Profiling to System Aware Analysis Elena Laskavaia, QNX Bill Graham, QNX.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Fermilab Scientific Computing Division Fermi National Accelerator Laboratory, Batavia, Illinois, USA. Off-the-Shelf Hardware and Software DAQ Performance.
Sun Tech Talk 3 Solaris 10 and OpenSolaris Pierre de Filippis Sun Campus Evangelist
FUDConBrussels Fedora ProjectFedora Project – 24 February 2007 FUDConBrussels THIS IS SYSTEMTAP Dynamic instrumentation.
Object Oriented Programming in
Chapter 14: System Protection
PYTHON: AN INTRODUCTION
Introduction to JSP Liu Haibin 12/09/2018.
Architectural Support for OS
Why Threads Are A Bad Idea (for most purposes)
Architectural Support for OS
Andy Wang CIS Computer Systems Performance Analysis
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Overview of dtrace Adam Leko UPC Group HCS Research Laboratory University of Florida Color encoding key: Blue: Information Red: Negative note Green: Positive note

2 Basic Information Name: Solaris DTrace Developer: Sun Microsystems Current Version:  DTrace 1.0 Website:  Contacts:  Adam Leventhal  Bryan Cantrill  Mike Shapiro

3 Overview of DTrace DTrace – a dynamic tracing environment for Solaris Can be used to troubleshoot performance and logic problems in user applications Similar to Paradyn  Uses dynamic binary instrumentation  Inserts instrumentation code in running processes Has specialized C-like language, D Terminology  Probes: points of instrumentation  Providers: make probes available Meant to be used on production systems Specific to Solaris (requires extensive OS kernel modification)

4 DTrace Usage Overview Users write D programs that collect information at runtime Users invoke dtrace to insert instrumentation code in kernel and user processes  Security mechanism ensures code can be inserted only by authorized users When events occur at runtime, user’s D code is executed by the DTrace providers, which causes  Information to be recorded  Data to be printed  Whatever else users defines in their D programs! Many, many providers exist for getting lots of different data from running programs

5 DTrace Architecture From [1]

6 D Language Simplified C-like language  Uses C formatting conventions  No conditionals or functions/methods/classes The D language provides convenient features for  Gathering and statistical information  Aggregating data  Displaying function arguments or timing information (printf-like syntax)  Speculative tracing Structure of a D program  Probe description that tells which provider to use  Predicate that says when this probe should be executed  Action statements that make up the body of the probe

7 Example Toy D Program D code /* Count off and report the number of seconds elapsed */ dtrace:::BEGIN { i = 0; } profile:::tick-1sec { i = i + 1; trace(i); } dtrace:::END { trace(i); } Output # dtrace -s counter.d dtrace: script ’counter.d’ matched 3 probes CPU ID FUNCTION:NAME :tick-1sec :tick-1sec :tick-1sec :tick-1sec :tick-1sec :tick-1sec 6 ^C 0 2 :END 6 #

8 More Realistic Program D code to time read() and write() syscalls Output syscall::read:entry, syscall::write:entry /pid == $1/ { ts[probefunc] = timestamp; } syscall::read:return, syscall::write:return /pid == $1 && ts[probefunc] != 0/ { printf("%d nsecs", timestamp - ts[probefunc]); } # dtrace -s rwtime.d ‘pgrep -n ksh‘ dtrace: script ’rwtime.d’ matched 4 probes CPU ID FUNCTION:NAME 0 33 read:return nsecs 0 33 read:return 3382 nsecs 0 35 write:return nsecs 0 33 read:return nsecs 0 35 write:return nsecs 0 33 read:return 9022 nsecs 0 33 read:return 3776 nsecs 0 35 write:return nsecs...

9 Some Example DTrace Providers syscall : makes a probe available at the entry to and return from every system call vminfo : makes a probe available on VM activity (page out, page faults, etc) profile : makes a probe available that can run every X milliseconds fpuinfo : makes a probe available when hardware floating point operations are emulated in software Users can also create their own providers by using the DTrace API  Ex: provide probes before/after a request is serviced in a web server or database server

10 DTrace Comments Good points  Does not require application modification, can trace any PID on the system  Can use on production Solaris systems  Can add and remove probes without having to restart applications  Authors claim low overhead when a handful of probes are enabled  D code provides a bit of flexibility when tracking down problems  Uses simple ASCII output (good for sed/awk/grep/perl support) Bad points  Users must learn new D language  Tied very closely to Solaris kernel  Only low-level (OS-level) information provided  Users have to write a lot of D code for operations that are much easier to get in other tools E.g., using prof/gprof vs. dtrace alone  Can’t easily track time spent by user code Poor source code correlation Best case: function name and byte offset from stack dumps

11 DTrace Comments (2) Good for troubleshooting odd/sporadic OS problems on production systems In general, seems most useful for kernel engineers/people very familiar with Solaris internals for troubleshooting server applications  Database server performance problems  Web server problems Not so good for generic performance debugging and tuning Biggest problems for HPC users  No good way to easily handle distributed applications Threaded support only  Printed output from large # of threads can easily become overwhelming DTrace designed to print output to screen at runtime; printf doesn’t scale! No advanced built-in visualization tools  Tied to Solaris  Doesn’t really give much help with issues outside of the operating system

12 References [1]“Solaris Dynamic Tracing Guide,” Sun Microsystems, Inc., Part No: , January 2005.