Performance Analysis Using Great Performance Tools and Linux Trace Toolkit Next Generation

Total Page:16

File Type:pdf, Size:1020Kb

Performance Analysis Using Great Performance Tools and Linux Trace Toolkit Next Generation Universität Hamburg Department Informatik Scientific Computing, WR Performance analysis using Great Performance Tools and Linux Trace Toolkit next generation Seminar Paper Seminar: Performance analysis in Linux Heye Vöcking Matr.Nr. 6139373 [email protected] Tutor: Julian Kunkel April 3, 2012 Heye Vöcking Performance analysis using GPerfTools and LTTng Contents 1 Introduction 3 1.1 Overview . 3 1.2 Motivation . 3 1.3 Related Tools . 3 1.3.1 Tools discussed in this work . 4 2 Related Work 4 3 History 4 4 Great Performance Tools in depth 4 4.1 Field of application . 5 4.1.1 Supported operating systems . 5 4.1.2 Supported programming languages . 5 4.2 Install / Setup . 5 4.3 How it works and how to use it . 5 4.3.1 CPU Profiler . 5 4.3.2 TCMalloc . 6 4.3.3 Heap Leak Checker . 6 4.3.4 Heap Profiler . 7 4.3.5 Profiler Insides . 8 4.4 Post-Processing with pprof . 8 4.4.1 Analyzing CPU Profiles . 8 4.4.2 Analyzing Memory Leaks . 10 4.4.3 Analyzing Heap Profiles . 10 5 Linux Trace Toolkit next generation in depth 10 5.1 Field of application . 10 5.1.1 Supported operating systems . 10 5.1.2 Supported architectures . 10 5.1.3 Supported programming languages . 10 5.2 Install / Setup . 11 5.3 How it works . 11 5.3.1 Tracing . 12 5.3.2 Tracepoints . 12 5.3.3 Probes, Trace Sessions, and Channels . 13 5.3.4 Storage and Trace Modes . 13 5.4 Post-Processing and Analysis . 14 5.4.1 Babeltrace . 14 5.4.2 LTT Viewer . 14 5.4.3 IDE integration . 14 5.5 Performance Impact . 15 6 Areas of Application 15 7 Summary 15 1 of 17 Heye Vöcking Performance analysis using GPerfTools and LTTng 8 Conclusion 16 9 Outlook 16 2 of 17 Heye Vöcking Performance analysis using GPerfTools and LTTng Abstract Todays systems are getting more and more complex. Especially through the trend to software running on multi-core setups. In order to find bugs and improve performance of the software we develop, we need good tools for tracing the programs execution efficiently. By monitoring, recording, and analyzing the programs behavior we can diagnose problems, tune for more per- formance, and understand the interaction of our software with libraries and the operating system better. In this work we want to present the Great Performance Tools and the Linux Trace Toolkit next generation. 1 Introduction the advantage of multi-core systems. Effi- ciency is a crucial subject because it saves When we develop software we often en- time and energy during runtime. Another counter bugs or code that performs poorly. important part is software safety. To avoid To debug and tune our code we can ob- dead locks, segmentation faults, or mem- serve the programs execution. There are ory the programmer needs a good under- several more or less efficient ways to accom- standing of the software he writes and the plish this. Tracing is one of them which can libraries he uses. In order to Here we want be performed using LTTng, another way is to show what tools can help developers to profiling which is possible with gperftools. write efficient code. 1.1 Overview 1.3 Related Tools At first we will mention some tools avail- gprof (1982) gprof extended the 1979 re- able for tracing as well as discuss and com- leased Unix tool “prof”, by providing pare the Great Performance Tools (section a complete call graph analysis. [gpr12] 4) and the Linux Trace Toolkit next genera- tion (section 5) in detail. We will show what EDGE (1999) The Mentor Embedded features they offer, describe how to install EDGE Developer Suite is an IDE built and integrate them, show how to use them, upon the Eclipse framework and pro- and give an insight of how they work. The vides tools that give an insight into areas of application are discussed in section the kernel and a debugger as well as 6. some other features. [Men99] QNX Momentics Tool Suite (2001) 1.2 Motivation This tool suite can be used to get There is more to developing software than a view of real-time interactions and just to make it work. Even though the pro- memory profiles as well as porting cessing power of computers is still rising a software from single- to multi-core developer should write efficient code and use systems. [QNX01] 3 of 17 Heye Vöcking Performance analysis using GPerfTools and LTTng Valgrind (2002) Originally designed to be 3 History a free memory debugging toll for Linux on x86, Valgrind is now a Performance analysis is no recent problem. generic framework for creating dy- Tools for analyzing performance have been namic analysis tools. [Val12] around since the early 1970s. They where usually based on timer interrupts to de- tect “hot spots” in the program code. The 1.3.1 Tools discussed in this work first profiler driven analysis tool was prof in 1979. In 1994 instrumentation by inserting In this work we are going to discuss profiling code in programs during compile and compare the Great Performance Tools time came up with the ATOM platform. (GPerfTools) and the Linux Trace Toolkit Instrumentation of the Linux kernel using next generation (LTTng). Both projects a method called “Kprobes” is implemented where started in 2005, available for free on since July 2002 (Kernel 2.5.26) and still the Internet, and by now both are commu- present today (Kernel 3.3). In early 2008 nity driven. “Kernel Markers” where developed to re- place Kprobes with no success, because the so called “Tracepoints” found their way into the Kernel not even a year later and man- 2 Related Work aged to replace the Kernel Markers com- pletely since December 2009. Tracepoints Peter Smith manages to achieve a 30% are still popular and used for example in speed gain by fixing poorly performing code Systemtap and LTTng which is discussed in that he located by profiling his 3D applica- section 5. [Mö12] tion with GPerfTools and kCachegrind as described in his work [Smi11]. In his article [Tou11] Toupin describes 4 Great Performance Tools how to use tracing to diagnose or monitor in depth single and multicore systems. The author and maintainer of LTTng, The Google Performance Tools project was Mathieu Desnoyers, has written his PhD. launched in March 2005 [SR08]. In 2011 thesis [Des09] on software tracing with LT- Craig Silverstein, in the gperftools project Tng better known as “csilvers”, who was the Romik Guha Anjoy and Soumya Kanti main developer, decided to step down. As Chakraborty evaluated in their Master The- a part of that Google decided to make the sis [RGA10] the efficiency of LTTng for project completely community run, there- employing it within the telecommunication fore with the beginning of version num- company Ericsson ber 2 (released in February 2012), the tools 4 of 17 Heye Vöcking Performance analysis using GPerfTools and LTTng changed their name from “google-perftools” allocation distributed under BSD license. to “gperftools”, where the “g” now stands They offer: for “great”. The gperftools are now main- 1. cpu_profiler, a profiler for monitor- tained by David Chappelle who was the only ing the performance of functions other active developer in the past. [CS12] 2. tcmalloc, a thread caching memory allocator as a fast replacement for 4.1 Field of application 3. heap_checker, a heap checker for leak 4.1.1 Supported operating systems detection The gperftools can be used in Linux, Mac, 4. heap_profiler, a profiler for moni- as well as in Windows environments. toring heap allocations CMalloc 4.1.2 Supported programming We will discuss these below. languages 4.3.1 CPU Profiler Supported programming languages are C The CPU profiler collects information dur- and C++. But the gperftools can be used ing runtime, namely the number of func- with any language that can call C code. tion calls with caller and callee methods and classes. There are multiple ways to use the 4.2 Install / Setup CPU profiler: Setup in a Linux environment is fairly 1. Through linking -lprofiler into straight forward. You should be able to your executable. find the corresponding packages using your 2. Through $LD_PRELOAD by us- package manager. In Arch Linux for ex- ing % env LD_PRELOAD=”/usr/lib/ ample you can use a tool called yaourt libprofiler.so” /path/to/binary. to install packages from the AUR (Arch But doing so is not recommended. User Repository). The command “yaourt - S google-perftools” will download, compile, Note that CPU profiling has to be and install the gperftools as well as all re- turned on manually before execution. quired packages. Additionally you can in- This is done by defining the environ- stall perl5, dot, and gv if you want to visu- ment variable $CPUPROFILE to the file alize the collected data with pprof. you want to save the collected informa- tion to. Surround the code you want 4.3 How it works and how to use to profile with ProfilerStart(”profile name”) and ProfilerStop(). Sev- it eral more advanced functions are The gperftools are a set of open-source tools available like ProfilerFlush() and for profiling, leak checking, and memory ProfilerStartWithOptions(). 5 of 17 Heye Vöcking Performance analysis using GPerfTools and LTTng Using the environment variables tion. So it records every allocation and $CPUPROFILE_FREQUENCY checks on exit if all allocated memory has and been freed. If not all memory has been freed $CPUPROFILE_REALTIME it reports a leak. you can control the behavior of the CPU In order to run a program with the profiler during runtime.
Recommended publications
  • Building Embedded Linux Systems ,Roadmap.18084 Page Ii Wednesday, August 6, 2008 9:05 AM
    Building Embedded Linux Systems ,roadmap.18084 Page ii Wednesday, August 6, 2008 9:05 AM Other Linux resources from O’Reilly Related titles Designing Embedded Programming Embedded Hardware Systems Linux Device Drivers Running Linux Linux in a Nutshell Understanding the Linux Linux Network Adminis- Kernel trator’s Guide Linux Books linux.oreilly.com is a complete catalog of O’Reilly’s books on Resource Center Linux and Unix and related technologies, including sample chapters and code examples. ONLamp.com is the premier site for the open source web plat- form: Linux, Apache, MySQL, and either Perl, Python, or PHP. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit con- ferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. main.title Page iii Monday, May 19, 2008 11:21 AM SECOND EDITION Building Embedded Linux SystemsTomcat ™ The Definitive Guide Karim Yaghmour, JonJason Masters, Brittain Gilad and Ben-Yossef, Ian F. Darwin and Philippe Gerum Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Building Embedded Linux Systems, Second Edition by Karim Yaghmour, Jon Masters, Gilad Ben-Yossef, and Philippe Gerum Copyright © 2008 Karim Yaghmour and Jon Masters.
    [Show full text]
  • Linux-Cookbook.Pdf
    LINUX COOKBOOK ™ Other Linux resources from O’Reilly Related titles Linux Device Drivers Exploring the JDS Linux Linux in a Nutshell Desktop Running Linux Learning Red Hat Enterprise Building Embedded Linux Linux and Fedora Systems Linux Pocket Guide Linux Security Cookbook Understanding the Linux Kernel Linux Books linux.oreilly.com is a complete catalog of O’Reilly’s books on Resource Center Linux and Unix and related technologies, including sample chapters and code examples. ONLamp.com is the premier site for the open source web plat- form: Linux, Apache, MySQL, and either Perl, Python, or PHP. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit conferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today with a free trial. LINUX COOKBOOK ™ Carla Schroder Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo Linux Cookbook™ by Carla Schroder Copyright © 2005 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use.
    [Show full text]
  • Linux-FAQ.Pdf
    The Linux FAQ David C. Merrill david −AT− lupercalia.net 2003−09−19 Revision History Revision 1.20 2001−12−04 Revised by: rk Revision 2.0 2002−04−25 Revised by: dcm Some reorganization and markup changes. Revision 2.1 2003−05−19 Revised by: dcm Fairly complete reorganization and conversion to WikiText. Revision 2.1.1 2003−09−19 Revised by: dcm Minor corrections. Revision 2.1.2 2004−02−28 Revised by: dcm Minor corrections. This is the list of Frequently Asked Questions for Linux, the Free/Open Source UNIX−like operating system kernel that runs on many modern computer systems. The Linux FAQ Table of Contents 1. Introduction.....................................................................................................................................................1 1.1. About the FAQ..................................................................................................................................1 1.2. Asking Questions and Sending Comments.......................................................................................1 1.3. Authorship and Acknowledgments...................................................................................................1 1.4. Copyright and License......................................................................................................................2 1.5. Disclaimer.........................................................................................................................................2 2. General Information.......................................................................................................................................3
    [Show full text]
  • Automata-Based Formal Analysis and Verification of the Real-Time Linux Kernel
    Universidade Federal de Santa Catarina Scuola Superiore Sant'Anna Red Hat, Inc. Ph.D. in Automation and Systems Engineering Ph.D. in Emerging Digital Technologies - Embedded and Real-Time Systems R&D Platform - Core-Kernel - Real-Time Ph.D. Candidate: Daniel Bristot de Oliveira Ph.D. Supervisors: Tommaso Cucinotta Rômulo Silva de Oliveira Automata-based Formal Analysis and Verification of the Real-Time Linux Kernel Pisa 2020 ACKNOWLEDGEMENTS In the first place, I would like to thank my friends and family for supporting me during the development of this research. In particular, I would like to thank Alessandra de Oliveira for motivating me to pursue a Ph.D. degree since I was a teenager. But also for allowing me to use her computer, which was “my” first computer. I also would like to thank Bianca Cartacci, for the unconditional support in the hardest days of these last years. I would like to thank Red Hat, Inc. for allowing me to continue my academic research in concurrency with my professional life. I would also like to thank the pro- fessionals that motivated me to remain in the academy and supported this research, including Nelson Campaner, Steven Rostedt, Juri Lelli and Arnaldo Carvalho de Mello. In special, I would like to thank Clark Williams, not only for his effort in supporting my research at Red Hat but, mainly, for his adivises and personal support. I would like to thank my Ph.D. colleagues from UFSC and Sant’Anna, in special Karila Palma Silva, Marco Pagani, Paolo Pazzaglia and Daniel Casini, all the members of the Retis Lab, and the administrave staff of the TeCIP institute at Sant’Anna and the PPGEAS at UFSC for the support in the cotutela agreement, in special for Enio Snoeijer.
    [Show full text]
  • Gender Dimensions of Free and Open Source Development
    THE MAKING OF LABORER SUBJECTIVITY AND KNOWLEDGE IN THE INFORMATION INDUSTRY: GENDER DIMENSIONS OF FREE AND OPEN SOURCE DEVELOPMENT Yeon Ju Oh A Dissertation Submitted to the Graduate College of Bowling Green State University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY August 2013 Committee: Radhika Gajjala, Advisor Deborah G. Wooldridge Graduate Faculty Representative Oliver Boyd-Barrett Victoria S. Ekstrand ii ABSTRACT Radhika Gajjala, Advisor This study examines female software developers as knowledge laborers with a special emphasis on free and open source software (FOSS) development. In examining female developers as knowledge laborers, this study focuses on both labor and knowledge. Women’s low participation in FOSS development is not an issue of recent years, but a consequence of women’s overall status in the computing field over the last three decades. In order to explicate women’s low participation in FOSS development, a broader historical and economic analysis is needed. Thus, this study explores the historical context of computer science education and industry in the 1980s since this is when the groundwork for FOSS development was laid. Furthermore, the power of cultural discourses that maintain and reinforce the gendered construction of FOSS development is discussed to unpack how the gendered construction is interrelated with the labor relations in the knowledge industry. In addition to the labor relations in FOSS development, this study attends to the knowledge produced by FOSS development. Knowledge gains importance as a sum of values of the knowledge producers. Source codes written by software developers turn into products that engage users with certain utility.
    [Show full text]
  • Building Embedded Linux Systems ,Roadmap.18084 Page Ii Wednesday, August 6, 2008 9:05 AM
    Building Embedded Linux Systems ,roadmap.18084 Page ii Wednesday, August 6, 2008 9:05 AM Other Linux resources from O’Reilly Related titles Designing Embedded Programming Embedded Hardware Systems Linux Device Drivers Running Linux Linux in a Nutshell Understanding the Linux Linux Network Adminis- Kernel trator’s Guide Linux Books linux.oreilly.com is a complete catalog of O’Reilly’s books on Resource Center Linux and Unix and related technologies, including sample chapters and code examples. ONLamp.com is the premier site for the open source web plat- form: Linux, Apache, MySQL, and either Perl, Python, or PHP. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit con- ferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. main.title Page iii Monday, May 19, 2008 11:21 AM SECOND EDITION Building Embedded Linux SystemsTomcat ™ The Definitive Guide Karim Yaghmour, JonJason Masters, Brittain Gilad and Ben-Yossef, Ian F. Darwin and Philippe Gerum Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Building Embedded Linux Systems, Second Edition by Karim Yaghmour, Jon Masters, Gilad Ben-Yossef, and Philippe Gerum Copyright © 2008 Karim Yaghmour and Jon Masters.
    [Show full text]
  • Enea® Linux User's Guide
    Enea® Linux User's Guide 4.0-docupdate1 Enea® Linux User's Guide Enea® Linux User's Guide Copyright Copyright © Enea Software AB 2014. This User Documentation consists of confidential information and is protected by Trade Secret Law. This notice of copyright does not indicate any actual or intended publication of this information. Except to the extent expressly stipulated in any software license agreement covering this User Documentation and/or corresponding software, no part of this User Documentation may be reproduced, transmitted, stored in a retrieval system, or translated, in any form or by any means, without the prior written permission of Enea Software AB. However, permission to print copies for personal use is hereby granted. Disclaimer The information in this User Documentation is subject to change without notice, and unless stipulated in any software license agreement covering this User Documentation and/or corresponding software, should not be construed as a commitment of Enea Software AB. Trademarks Enea®, Enea OSE®, and Polyhedra® are the registered trademarks of Enea AB and its subsidiaries. Enea OSE®ck, Enea OSE® Epsilon, Enea® Element, Enea® Optima, Enea® Linux, Enea® LINX, Enea® LWRT, Enea® Accelerator, Polyhedra® Flash DBMS, Polyhedra® Lite, Enea® dSPEED, Accelerating Network Convergence™, Device Software Optimized™, and Embedded for Leaders™ are unregistered trademarks of Enea AB or its subsidiaries. Any other company, product or service names mentioned in this document are the registered or unregistered trade- marks of their respective owner. Acknowledgements and Open Source License Conditions Information is found in the Release Information manual. © Enea Software AB 2014 4.0-docupdate1 ii Enea® Linux User's Guide Table of Contents 1 - Introduction ...............................................................................................................
    [Show full text]
  • With Hacks That Any User Can Follow, Linux Desktop Hacks Demonstrates How Easy It Is to Modify Linux to Suit Your Desires. the B
    Linux Desktop Hacks By Jono Bacon, Nicholas Petreley Publisher: O'Reilly Pub Date: March 2005 ISBN: 0-596-00911-9 Pages: 342 Table of • Contents • Index • Reviews Reader With hacks that any user can follow, Linux Desktop Hacks demonstrates • Reviews how easy it is to modify Linux to suit your desires. The book is packed with • Errata tips on customizing and improving the interface, boosting performance, • Academic administering your desktop, and generally making the most out of what X, KDE, Gnome, and the console have to offer. Linux Desktop Hacks By Jono Bacon, Nicholas Petreley Publisher: O'Reilly Pub Date: March 2005 ISBN: 0-596-00911-9 Pages: 342 Table of • Contents • Index • Reviews Reader • Reviews • Errata • Academic Copyright Credits About the Authors Contributors Acknowledgments Preface Why Linux Desktop Hacks? How to Use This Book How This Book Is Organized Conventions Used in This Book Using Code Examples How to Contact Us Got a Hack? Safari Enabled Chapter 1. Booting Linux Hacks 1-9 Hack 1. Give Your Computer the Boot Hack 2. Kill and Resurrect the Master Boot Record Hack 3. Bypass the Boot Manager Hack 4. Set a Bitmap Boot Screen for LILO Hack 5. Create Your Own LILO Boot Splash Hack 6. Display a GRUB Boot Splash Background Hack 7. Create a GRUB Boot Splash Background Hack 8. Jazz Up Your Debian System Boot Hack 9. Graphics on the Console Chapter 2. Console Hacks 10-15 Hack 10. Redefine Keyboard Actions Hack 11. Energize Your Console with Macro Music Magic Hack 12. Take a Screenshot from the Command Line Hack 13.
    [Show full text]
  • Automata-Based Formal Analysis and Verification of the Real-Time Linux
    UNIVERSIDADE FEDERAL DE SANTA CATARINA PROGRAMA DE PÓS-GRADUAÇÃO EM ENGENHARIA DE AUTOMAÇÃO E SISTEMAS Daniel Bristot de Oliveira Automata-based Formal Analysis and Verification of the Real-Time Linux Kernel Pisa 2020 Daniel Bristot de Oliveira Automata-based Formal Analysis and Verification of the Real-Time Linux Kernel Tese submetida ao Programa de Pós-Graduação em Engenharia de Automação e Sistemas da Univer- sidade Federal de Santa Catarina para a obtenção do tí- tulo de Doutor em Engenharia de Automação e Sis- temas. Orientador: Prof. Rômulo Silva de Oliveira, Dr. Coorientador: Prof. Tommaso Cucinotta, Dr. Pisa 2020 Ficha de identificação da obra elaborada pelo autor, através do Programa de Geração Automática da Biblioteca Universitária da UFSC. Bristot de Oliveira, Daniel Automata-based Formal Analysis and Verification of the Real-Time Linux Kernel / Daniel Bristot de Oliveira ; orientador, Rômulo Silva de Oliveira, coorientador, Tommaso Cucinotta, 2020. 144 p. Tese (doutorado) - Universidade Federal de Santa Catarina, Centro Tecnológico, Programa de Pós-Graduação em Engenharia de Automação e Sistemas, Florianópolis, 2020. Inclui referências. 1. Engenharia de Automação e Sistemas. 2. Tempo Real. 3. Kernel do Linux. 4. Metodos Formais. 5. Verificação. I. Silva de Oliveira, Rômulo. II. Cucinotta, Tommaso. III. Universidade Federal de Santa Catarina. Programa de Pós Graduação em Engenharia de Automação e Sistemas. IV. Título. Daniel Bristot de Oliveira Automata-based Formal Analysis and Verification of the Real-Time Linux Kernel O presente trabalho em nível de doutorado foi avaliado e aprovado por banca examinadora composta pelos seguintes membros: Prof. Marco Di Natale, Dr. Scuola Superiore Sant’Anna Prof. Giuseppe Lipari, Dr.
    [Show full text]
  • Linuxcon Europe 2011
    LinuxCon Europe 2011 LTTng 2.0 : Application, Library and Kernel tracing within your Linux distribution. E-mail: [email protected] Mathieu Desnoyers October 26th, 2011 1 > Buzzword compliant ! ● LTT: Linux Trace Toolkit ● “ng” : Next Generation ● 2.0 ! LTTng 2.0 ! ● All we miss is a recursive acronym. ;) Mathieu Desnoyers October 26th, 2011 2 > Presenter ● Mathieu Desnoyers ● EfficiOS Inc. ● http://www.efficios.com ● Author/Maintainer of ● LTTng, LTTng-UST, Babeltrace, LTTV, Userspace RCU Mathieu Desnoyers October 26th, 2011 3 > Benefits of low-impact tracing in a multi-core world ● Understanding interaction between – Kernel – Libraries – Applications – Virtual Machines ● Debugging ● Performance tuning ● Monitoring Mathieu Desnoyers October 26th, 2011 4 > Tracing use-cases ● Telecom – Operator, engineer tracing systems concurrently with different instrumentation sets. – In development and maintenance phases. ● Embedded – System development, maintenance of deployed systems. ● Server/Desktop software – Qemu/KVM, MariaDB. Mathieu Desnoyers October 26th, 2011 5 > Why do we need a LTTng 2.0 ? ● Need more flexible trace data layout format – Introduce Common Trace Format (CTF) ● Introduction of user-space tracing (UST) – Leverage common control infrastructure for kernel and user-space tracing – Simplification of the kernel-level infrastructure ● Need more flexible ring buffer – Snapshot, mmap and splice, global and per- cpu, kernel and user-space, configurable crash dump support. Mathieu Desnoyers October 26th, 2011 6 > LTTng 2.0
    [Show full text]
  • Performance Model Extraction Using Kernel Event Tracing
    Performance Model Extraction Using Kernel Event Tracing by Shieryn Tjandra A thesis submitted to the Faculty of Graduate and Postdoctoral Affairs in partial fulfillment of the requirements for the degree of Master of Applied Science in Electrical and Computer Engineering Department of Systems and Computer Engineering Faculty of Engineering Carleton University Ottawa, Ontario, Canada, K1S 5B6 © Copyright 2019, Shieryn Tjandra Abstract Models are used in performance analysis when the analyst needs to be able to predict the effect of system changes that go beyond what can be measured. The model can be obtained from a combination of system knowledge and experimentation. This thesis addresses an experimental approach to obtaining layered queueing network (LQN) models of distributed systems. It applies and extends an approach called SAME (Software Architecture and Model Extraction)which was developed to interpret application-level traces, to interpreting Kernel-level traces. Kernel-level traces have the benefit that application instrumentation is not required, and communication with attached devices can be modeled, but they lack application context information. The research shows that modeling from Kernel traces is feasible in systems which communicate via TCP messages, including Java remote procedure calls. This covers most web-based systems. Systems using middleware pose special problems. The combination of Kernel and application-level tracing was included in some experiments. Tools are described that adapt the Kernel traces to SAME, and that extract CPU demand parameter calibration information. ii Acknowledgements Study in Canada was not an easy decision for me. With all supports, I could finish my study. I would first like to thank God for giving me a chance to fulfil my dream and give me strength whenever I feel exhausted.
    [Show full text]
  • The Lttng Tracer: a Low Impact Performance and Behavior Monitor for GNU/Linux
    The LTTng tracer: A low impact performance and behavior monitor for GNU/Linux Mathieu Desnoyers Michel R. Dagenais École Polytechnique de Montréal École Polytechnique de Montréal [email protected] [email protected] Abstract presented. The approach taken to allow nested types, variable fields and dynamic alignment of data in the trace buffers will be revealed. It will Efficient tracing of system-wide execution, show the mechanisms deployed to facilitate use allowing integrated analysis of both kernel and extension of this tool by adding custom in- space and user space, is something difficult to strumentation and analysis involving kernel, li- achieve. The following article will present you braries and user space programs. a new tracer core, Linux Trace Toolkit Next Generation (LTTng), that has taken over the It will also introduce LTTng’s trace analyzer previous version known as LTT. It has the same and graphical viewer counterpart: Linux Trace goals of low system disturbance and architec- Toolkit Viewer (LTTV). The latter implements ture independance while being fully reentrant, extensible analysis of the trace information scalable, precise, extensible, modular and easy through collaborating text and graphical plu- to use. For instance, LTTng allows tracepoints gins.1 It can simultaneously display multi- in NMI code, multiple simultaneous traces and ple multi-GBytes traces of multi-processor sys- a flight recorder mode. LTTng reuses and en- tems. hances the existing LTT instrumentation and RelayFS. This paper will focus on the approaches taken 1 Tracing goals by LTTng to fulfill these goals. It will present the modular architecture of the project. It With the increasing complexity of newer com- will then explain how NMI reentrancy requires puter systems, the overall performance of appli- atomic operations for writing and RCU lists for cations often depends on a combination of sev- tracing behavior control.
    [Show full text]