Marian Ivanov (New) Root Memory checker. Outlook ● Motivation ● New memory checker – Implementation – User interface – Examples ● AliRoot observations.

Slides:



Advertisements
Similar presentations
Constructor. 2 constructor The main use of constructors is to initialize objects. A constructor is a special member function, whose name is same as class.
Advertisements

Introduction to Memory Management. 2 General Structure of Run-Time Memory.
CPU Review and Programming Models CT101 – Computing Systems.
Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
1 Chapter 11: File-System Interface  File Concept  Access Methods  Directory Structure  File System Mounting  File Sharing  Protection  Chapter.
Day 10 Threads. Threads and Processes  Process is seen as two entities Unit of resource allocation (process or task) Unit of dispatch or scheduling (thread.
Processes CSCI 444/544 Operating Systems Fall 2008.
Chapter 3.7 Memory and I/O Systems. 2 Memory Management Only applies to languages with explicit memory management (C or C++) Memory problems are one of.
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
CPS110: Implementing threads/locks on a uni-processor Landon Cox.
1 I/O Management in Representative Operating Systems.
. Memory Management. Memory Organization u During run time, variables can be stored in one of three “pools”  Stack  Static heap  Dynamic heap.
SIMULATING ERRORS IN WEB SERVICES International Journal of Simulation: Systems, Sciences and Technology 2004 Nik Looker, Malcolm Munro and Jie Xu.
Software Development and Software Loading in Embedded Systems.
1 CSC 2405: Computer Systems II Spring 2012 Dr. Tom Way.
OOP Languages: Java vs C++
There are different types of translator. An Interpreter Interpreters translate one instruction at a time from a high level language into machine code every.
Micro Focus Net Express / Server Express in GDT Update.
chap13 Chapter 13 Programming in the Large.
Natalia Yastrebova What is Coverity? Each developer should answer to some very simple, yet difficult to answer questions: How do I find new.
Programming Languages and Paradigms Object-Oriented Programming (Part II)
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
Axel Naumann University of Nijmegen / NIKHEF, NL ROOT 2004 Users Workshop The Future of THtml Plans and Status of ROOT’s documentation facility.
Pointers OVERVIEW.
1 Writing a Good Program 8. Elementary Data Structure.
 Managing the heap  Resource acquisition is initialization (RAII)  Overriding operator new and delete  Class-based memory pools.
Lecture 3 Classes, Structs, Enums Passing by reference and value Arrays.
Standard Template Library The Standard Template Library was recently added to standard C++. –The STL contains generic template classes. –The STL permits.
1 N. BrunerUniv. of New Mexico MuTr Software  Online  Calibration  Offline.
More on MIPS programs n SPIM does not support everything supported by a general MIPS assembler. For example, –.end doesn’t work Use j $ra –.macro doesn’t.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
File Systems cs550 Operating Systems David Monismith.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
Statistical feature extraction, calibration and numerical debugging Marian Ivanov.
The iOS Platform and SDK. iOS iPhoneiPad Mini iPad.
1 Classes II Chapter 7 2 Introduction Continued study of –classes –data abstraction Prepare for operator overloading in next chapter Work with strings.
Chapter 12: Programming in the Large By: Suraya Alias 1-1.
Win32 Programming Lesson 19: Introduction to DLLs.
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science The University of Arizona, Tucson
PROGRAMMING 1 – HELPER INSTRUCTIONS ACKNOWLEDGEMENT: THE SLIDES ARE PREPARED FROM SLIDES PROVIDED BY NANCY M. AMATO AND JORY DENNY 1.
By Anand George SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)
NCHU System & Network Lab Lab #6 Thread Management Operating System Lab.
Kernel Structure and Infrastructure David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis, MO
Analysis experience at GSIAF Marian Ivanov. HEP data analysis ● Typical HEP data analysis (physic analysis, calibration, alignment) and any statistical.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
1 G4UIRoot Isidro González ALICE ROOT /10/2002.
Calibration algorithm and detector monitoring - TPC Marian Ivanov.
A user interface, like the one created by the DOS operating system, that makes use of typed commands.
AAF tips and tricks Arsen Hayrapetyan Yerevan Physics Institute, Armenia.
Operating System Structure Lecture: - Operating System Concepts Lecturer: - Pooja Sharma Computer Science Department, Punjabi University, Patiala.
IBM’s OS/2 by Chris Axford Chris Evans Elizabeth McGinnis Erik Swensson.
Debugging Tools for Charm++ Applications Filippo Gioachin University of Illinois at Urbana-Champaign.
WORKING OF SCHEDULER IN OS
(New) Root Memory checker
Marian Ivanov, Anar Manafov
Protection of System Resources
Day 12 Threads.
Checking Memory Management
6.001 SICP Stacks and recursion
Kernel Structure and Infrastructure
Process Description and Control
CSc 352 Debugging Tools Saumya Debray Dept. of Computer Science
Lecture Topics: 11/1 General Operating System Concepts Processes
Indirection.
Lecture 7: Flexible Address Translation
System Calls System calls are the user API to the OS
Computer Organization & Compilation Process
RUN-TIME STORAGE Chuen-Liang Chen Department of Computer Science
Dynamic Binary Translators and Instrumenters
CS Introduction to Operating Systems
Presentation transcript:

Marian Ivanov (New) Root Memory checker

Outlook ● Motivation ● New memory checker – Implementation – User interface – Examples ● AliRoot observations

Motivation ● The AliRoot use to much memory – Memory checker needed ● Valgrind and vtune – too slow – difficult to run realistic simulation reconstruction ( factor 50 slow down) ● We need some automatic procedure to check the quality of code – Optimally done during the nightly builds + Sending message to the top violators – Number of new – deletes – Total and current allocated space – development in time – Selective queries – per libraries – per functions

Implementation – Classes - Information ● TinfoStamp – memory alocation information – TotalCount, CurrentCount, TotalSize, CurrentSize – Code ID, StampNumber ● TcodeInfo – Code information – address of the code – TinfoStamps – current, last, max memory stamp, max alloc count – Integrated from all called function ● TstackInfo – Array of code information – stack – TinfoStamps – current, last, max memory stamp, max alloc count

Containers ● MemStatManager – std vector of CodeInfos – std vector of StackInfos – std vector of StampInfos – (evolving in time) ● Information dumped to the output tree – 1. On demand – 2. Automatic dump after reaching the predefined size

Principles ● Hook for alloc and free – Possibility to enable and disable ● Alloc hook: – Get the stack trace – Register the new stack trace if not registered yet – Register memory for given stack (increase counters) ● Free hook – Unregister memory for stack created given pointer (decrease counters)

User interface – acquiring data ● Start – TMemStatDraw draw(100000,1000); ● User specify the auto stamp size - Allocated size, Number of allocation ● Make stamps – (inside the code - macro) – draw.AddStamp("Start"); – funF(); – draw.AddStamp("funF"); ● Destructor – Close the file with stamps

User interface – quering of information ● Initialization from file - TMemStatDraw draw("memstat.root") ● Select code information – draw.SelectCode("testMemstat","fun",TMemStatDraw::kOR) – draw.SortCode(TMemStatDraw::kAllocSize,TMemStatDraw::kCurrent); – draw.PrintCode(10,10) ● Select stack information – draw.SelectStack(TMemStatDraw::kOR) – draw.SortStack(TMemStatDraw::kAllocSize,TMemStatDraw::kCurrent); – draw.PrintStack(10,10)

Time development

AliRoot example (print) draw.Print("stackdeep 20");

Drawing draw.Draw("stackdeep 20"); A lot of space for improvement

Future plans ● The code committed in AliRoot ● The system dependent function in separate class TMemStatDepend – e.g Backtrace information – Not (yet) implemented on all platforms ● GUI – Not working yet – Space for optimization – Not critical part ● Integration to the AliRoot ? – Problems with platforms – My local version of AliSysInfo::AddStamp call memory checker