Status and Future of CINT Reflex as Reflection Database Object-Oriented CINT Multi-Threading Masaharu Goto, Agilent Philippe Canal, Fermilab Stefan Roiser,

Slides:



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

Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
Reflex Dictionary Generator Antti Hahto
LLVM-based C++ Interpreter For ROOT Axel Naumann, CERN Lukasz Janyst, CERN Philippe Canal, Fermilab.
The Java Language. Topics of this Course  Introduction to Java  The Java Language  Object Oriented Programming in Java  Exceptions Handling  Threads.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
Memory Management 2010.
Computer Organization and Architecture
Guide To UNIX Using Linux Third Edition
Regression testing Tor Stållhane. What is regression testing – 1 Regression testing is testing done to check that a system update does not re- introduce.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Bertrand Bellenot root.cern.ch ROOT I/O in JavaScript Reading ROOT files from any web browser ROOT Users Workshop
1 Chapter-01 Introduction to Computers and C++ Programming.
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
Sept 11, 2003ROOT Day1, Suzanne Panacek39 ROOT An object oriented HEP analysis framework. Day 1.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Introduction to .Net Framework
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
CINT Retrospect ROOT Workshop Mar 2013 Agilent Technologies Masaharu Goto.
M.Frank CERN/LHCb - Persistency Workshop, Dec.2004 Agenda: 2 separate talks! Don’t mangle together what does not belong together 1.Schema Evolution Tests.
1 v1.6 08/02/2006 Overview of Eclipse Lectures 1.Overview 2.Installing and Running 3.Building and Running Java Classes 4.Refactoring 5.Debugging 6.Testing.
JSP Java Server Pages Softsmith Infotech.
CINT & Reflex: New Reflection Data Structures Masa(haru) Goto Agilent Philippe Canal Fermilab/CD Stefan Roiser, Axel Naumann PH/SFT.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Axel Naumann University of Nijmegen / NIKHEF, NL ROOT 2004 Users Workshop The Future of THtml Plans and Status of ROOT’s documentation facility.
CInt Function Stub Removal ROOT Team Meeting CERN Leandro Franco (Joint work with Diego Marcos)
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
CINT C++ Interpreter update ROOT2001 at Fermi-Lab Masaharu Goto.
© All rights reserved. U.S International Tech Support
SiD Workshop October 2013, SLACDmitry Onoprienko SiD Workshop SLAC, October 2013 Dmitry Onoprienko SLAC, SCA FreeHEP based software status: Jas 3, WIRED,
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Lecture 3 Classes, Structs, Enums Passing by reference and value Arrays.
THtml  THtml will generate >=1 doc.root file .html pages generated from doc.root files by April (Feb doesn't exist)  Bertrand: extract doc for online.
CS536 Semantic Analysis Introduction with Emphasis on Name Analysis 1.
Getting rid of the “G__” thingies ROOT Team Meeting CERN Diego Marcos && Leandro Franco.
SKYPIAX, how to add Skype capabilities to FreeSWITCH (and Asterisk) CHICAGO, USA, September 2009.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
ROOT Tutorials - Session 51 ROOT Tutorials – Session 5 Dictionary Generation, rootcint, Simple I/O, Hands-on Fons Rademakers.
Cling – The New C++ Interpreter for ROOT 6
Cint : C++ interpreter Frequently Asked Questions Digest 14 Oct 2002 at CERN Masaharu Goto.
Full and Para Virtualization
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
THtml rev 2.0 Status and Plans of ROOT’s documentation facility Axel Naumann / Fermilab.
CSCI-383 Object-Oriented Programming & Design Lecture 25.
ROOT Team Meeting Axel Naumann CERN PH/SFT Crienftlex Extended Version. And also Director’s Cut. Crienftlex.
D. Duellmann - IT/DB LCG - POOL Project1 The LCG Dictionary and POOL Dirk Duellmann.
CINT & Reflex – The Future CINT’s Future Layout Reflex API Work In Progress: Use Reflex to store dictionary data Smaller memory footprint First step to.
Axel Naumann. Nada FTE  LLVM + cling would take 4 years  when done, move to next hot-spot in ROOT Axel Naumann ROOT Team Meeting2.
CINT/Reflex workshop 1 Rene Brun 4 May 2005 Summary of the CINT/Reflex workshop 2-6 May 2005
ACAT 2008 Axel Naumann (CERN), Philippe Canal (Fermilab) The Role of Interpreters in High Performance Computing.
Optimization of Python-bindings Wim T.L.P. Lavrijsen, LBNL ROOT Meeting, CERN; 01/15/10 C O M P U T A T I O N A L R E S E A R C H D I V I S I O N.
HYDRA Framework. Setup of software environment Setup of software environment Using the documentation Using the documentation How to compile a program.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
ROOT / Reflex ‘07+ Stefan Roiser Missed last team meeting b/c.
Smalltalk Implementation Harry Porter, October 2009 Smalltalk Implementation: Optimization Techniques Prof. Harry Porter Portland State University 1.
Chapter 2 Memory and process management
Security in Java Real or Decaf? cs205: engineering software
Smart Integration Express
Tonga Institute of Higher Education
ROOT Support and Developments at FNAL
SPL – PS1 Introduction to C++.
Presentation transcript:

Status and Future of CINT Reflex as Reflection Database Object-Oriented CINT Multi-Threading Masaharu Goto, Agilent Philippe Canal, Fermilab Stefan Roiser, CERN Paul Russo, Fermilab Axel Naumann*, CERN (*) 100% CINT

Axel Naumann ROOT Status and Future of CINT What is it? How does ROOT rely on it? CINT's current status CINT and Reflex: the new CINT7 CINT's future: –Dictionary developments –Object oriented design –Multi-threading support

Axel Naumann ROOT What is CINT? Reflection data manager Dictionary generator C++ Parser Code and library manager Interpreter Byte-code compiler Started in 1991 by Masaharu Goto, originally in C >300k real LOC (excluding comments / empty lines) ROOT is major "customer" of CINT

Axel Naumann ROOT What is CINT? Reflection CINT manages reflection data (type information): 1.Which types are defined? Use case: THtml generates doc for all known classes root [0] THtml h root [1] h.MakeAll(kTRUE) htmldoc/TAxis.html 345 htmldoc/TBaseClass.html 344 htmldoc/TBenchmark.html 343 htmldoc/TBits.html 342 htmldoc/TBox.html 341 htmldoc/TBrowser.html 340 htmldoc/TBtree.html 339 htmldoc/TBuffer.html...

Axel Naumann ROOT What is CINT? Reflection CINT manages reflection data (type information): 2.Which members do they have? 3.Where are they? (Member offset from object address) Use case: I/O writes all members to file root [0] TH1::Class()->GetStreamerInfo()->ls() StreamerInfo for class: TH1, version=5... Short_t fBarOffset offset=656 Short_t fBarWidth offset=658 Double_t fEntries offset=664 Double_t fTsumw offset=672 Double_t fTsumw2 offset=680

Axel Naumann ROOT What is CINT? Reflection CINT manages reflection data (type information): 4.Which functions does TNeuron have? Use case: function lookup in interpreter root [0] TNeuron neuron root [1] neuron.MoreCoffee() Error: Can't call TNeuron::MoreCoffee()

Axel Naumann ROOT What is CINT? Reflection CINT manages reflection data (type information): 5.Call a function Use case: Signal / Slot mechanism in GUI, e.g. sort TBrowser entries by name if name column header is clicked Connect("Clicked()", "TRootBrowser", fBrowser, Form("SetSortMode(=%d)", kViewArrangeByName));

Axel Naumann ROOT What is CINT? Reflection CINT manages reflection data (type information): 1.Which types are defined? 2.Which members do they have? 3.Where are they? 4.Which functions does TNeuron have? 5.Call a function

Axel Naumann ROOT What Is CINT? Reflection data manager Dictionary generator C++ Parser Code and library manager Interpreter ROOT's dictionary generator rootcint is based on CINT (genreflex+GCCXML is an alternative)

Axel Naumann ROOT What Is CINT? Reflection data manager Dictionary generator C++ Parser Code and library manager Interpreter CINT remembers which macros, libraries were loaded; can re-parse for template instantiations

Axel Naumann ROOT What Is CINT? Reflection data manager Dictionary generator C++ Parser Code and library manager Interpreter ROOT prompt.x Macro.C gROOT->ProcessLine(...)

Axel Naumann ROOT Current Status Major developments since last workshop: Many limitations removed, e.g. concerning array vs. scalar, auto-loading Many new features, e.g. AMD64, MS VisualC support Reduced memory footprint (-10MB when running ROOT’s benchmarks.C) New build system both for CINT itself (configure) and ROOT’s CINT (cintdlls-Makefile) Bug fixes

CINT, Reflex Reflex: package to store reflection (=type info) data Clean C++ API: Type, Scope, Member, e.g. Type::GetDeclaringScope() Scope::SubTypes_Begin() Member::GetType() To replace CINT’s C structs: Easier to maintain due to grouping of functionality (object oriented database), access control, etc Fully dynamic, thus smaller memory footprint Axel Naumann ROOT

CINT + Reflex = CINT7 Needs (more than expected) changes: in CINT, e.g. due to non-modular code in Reflex, because CINT is a challenging user (unloading of macros, delayed dictionary initialization, etc) Preview (30% done) in $ROOTSYS/cint7 Work in progress, parallel to maintenance of CINT5/6 Will become default once stable Axel Naumann ROOT

CINT’s Future Detailed plan of work: Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems)

Dictionary Size Dictionary mainly consists of call wrappers: translate string "TObject::GetName()" to function call Function calls to setup dictionary: add "TObject", add its function "GetName()" etc Public re-definition of classes to inspect their (otherwise private) members Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems)

Dictionary Size Dictionary mainly consists of call wrappers: translate string "TObject::GetName()" to function call Function calls to setup dictionary: add "TObject", add its function "GetName()" etc Public re-definition of classes to inspect their (otherwise private) members Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems) Extract address of "TObject::GetName()" from library, forward calls directly to that address

Dictionary Size Dictionary mainly consists of call wrappers: translate string "TObject::GetName()" to function call Function calls to setup dictionary: add "TObject", add its function "GetName()" etc Public re-definition of classes to inspect their (otherwise private) members Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems Extract address of "TObject::GetName()" from library, forward calls directly to that address Store dictionary data (Reflex objects) in ROOT file, ROOT I/O instead of compiled dictionary

Dictionary Size Dictionary mainly consists of call wrappers: translate string "TObject::GetName()" to function call Function calls to setup dictionary: add "TObject", add its function "GetName()" etc Public re-definition of classes to inspect their (otherwise private) members Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems Extract address of "TObject::GetName()" from library, forward calls directly to that address Store dictionary data (Reflex objects) in ROOT file, ROOT I/O instead of compiled dictionary Calculate member inspection data on the fly or examine (compiler dependent) memory layout

On-Demand Dictionary Currently: dictionaries for all types On-demand: automatically generate and cache only needed dictionaries On-demand dictionary example: 1.access MyClass but no dictionary yet 2.automatically parse MyClass's header 3.create dictionary for MyClass 4.compile (ACLiC) / load dictionary Great for templates: no 100 dicts for 100 template specializations "just in case" Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems

Object-Oriented CINT For ease of maintenance: Refactor code to convert current C-based to object oriented design Started planning of new layout: interpreter parser code manager dictionary database: Reflex dictionary generator byte-code compiler Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems)

Multi-Threading Support For ease of maintenance and thread safety: Refactor code to convert current C-based to object oriented design Started planning of new layout: interpreter: can have multiple per thread parser: one for each interpreter code manager: libraries / macros dictionary database: Reflex (+ thread safety); libraries / macros dictionary generator: "static" byte-code compiler: "static" Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems) 1/process: shared libs, 1/interpreter: macros

Byte-Code Compiler Byte-code: custom format for efficient execution of macros Byte-code compiler: converts macros into byte-code, optimizes it Problems with scope resolution, loops; difficult to maintain Status: re-implementation by Masa (CINT6) Axel Naumann ROOT finish CINT7 (Reflex) 2.minimize dictionaries (direct lib calls, dict.root) 3.on-the-fly dictionaries (template dicts) 4.object-oriented CINT (class G__Interpreter) 5.multi-threading support 6.byte-code compiler (loop, scoping problems)

Summary CINT amazingly stable: very few changes needed, virtually no API changes Well maintained Shortcomings known, remedy: long list of planned improvements Development plans are long scale, with continuous flow of improvements Benefits arrive on a regular bases! Axel Naumann ROOT