MPI Version 2 Asaf Yaffe July 2006. Agenda Why redesign MPI Requirements Design Concepts –Events –Event Groups Event Filters Enabling/Disabling Events.

Slides:



Advertisements
Similar presentations
Eclipse TPTP TPTP Heap and Thread Profilers High-level Design Rev 1.0 Asaf Yaffe July, 2006.
Advertisements

TPTP 4.4 New Java Profiler (JVMTI) Test and Performance Tools Platform (TPTP) TPTP 4.4 Thread Profiler Pause/Resume and Attach/Detach Design Asaf Yaffe.
Generalized Requests. The current definition They are defined in MPI 2 under the hood of the chapter 8 (External Interfaces) Page 166 line 16 The objective.
© Copyrights 1998 Algorithmic Research Ltd. All rights Reserved D a t a S e c u r i t y A c r o s s t h e E n t e r p r i s e Algorithmic Research a company.
Chain of Responsibility Pattern Gof pp Yuyang Chen.
Matt Klein 7/2/2009.  Intent  Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
Reza Gorgan Mohammadi AmirKabir University of Technology, Department of Computer Engineering & Information Technology Advanced design.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
1 Run time vs. Compile time The compiler must generate code to handle issues that arise at run time Representation of various data types Procedure linkage.
CS 2511 Fall  Abstraction Abstract class Interfaces  Encapsulation Access Specifiers Data Hiding  Inheritance  Polymorphism.
Introduction to Classes and Objects CS-2303, C-Term Introduction to Classes and Objects CS-2303 System Programming Concepts (Slides include materials.
C++ fundamentals.
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
242/102/49 0/51/59 181/172/166 Primary colors 248/152/29 PMS 172 PMS 137 PMS 546 PMS /206/ /227/ /129/123 Secondary colors 114/181/204.
CSE 331 Software Design & Implementation Hal Perkins Autumn 2012 Java Classes, Interfaces, and Types 1.
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
1 Client API Goals: evolvable, easy to use Design decision: –event-driven, non-blocking programming model –Data items are immutable Main data structure:
By: R Jayampathi Sampath
CINEMA’s UbiComp Subsystem Stefan Berger and Henning Schulzrinne Department of Computer Science Columbia University
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
Rethinking Game Architecture with Immutability Jacob Dufault Faculty Advisor: Dr. Phil Bernhard, Dept of Computer Science, Florida Institute of Technology.
Java SNMP Oplet Tal Lavian. Goals Portable across a range of devices Extensible Simple and convenient for client use Consistent with SNMP model Hide unnecessary.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Programming Languages and Paradigms Object-Oriented Programming (Part II)
Jun Li DHCP Option for Access Network Information draft-lijun-dhc-clf-nass-option-01.
CHEP 2003 March 22-28, 2003 POOL Data Storage, Cache and Conversion Mechanism Motivation Data access Generic model Experience & Conclusions D.Düllmann,
PI Data Archive Server COM Points Richard Beeson.
ICN and DTN NetInf over BP using BPQ Elwyn Davies Folly Consulting Ltd/Trinity College Dublin or
Chapter 12 1 TOPIC 13B l Buttons and Action Listeners Window Interfaces Using Swing Objects.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
FTP Server API Implementing the FTP Server Registering FTP Command Callbacks Data and Control Port Close Callbacks Other Server Calls.
Connect. Communicate. Collaborate PerfsonarUI plug-in tutorial Nina Jeliazkova ISTF, Bulgaria.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Object Oriented Programming.  Interface  Event Handling.
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
Inheritance. Inheritance - Introduction Idea behind is to create new classes that are built on existing classes – you reuse the methods and fields and.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 5: Threads Overview Multithreading Models Threading Issues Pthreads Solaris.
Greenstone Internals How to Build a Digital Library Ian H. Witten and David Bainbridge.
Interfaces About Interfaces Interfaces and abstract classes provide more structured way to separate interface from implementation
Eclipse Debug Views Update Policy. 2 Agenda  Background  Requirements  How does it work now?  How to make it more flexible?
Implementation Basics in C# code Minimal C++ code Application logic in Java code.
(1) ICS 313: Programming Language Theory Chapter 11: Abstract Data Types (Data Abstraction)
1 FESA architecture v.1.0 Framework Configuration & Data-entry Tool 5 th December 2003.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 21 Java Servlets Wed. 11/22/00 based on material.
Programming in java Packages Access Protection Importing packages Java program structure Interfaces Why interface Defining interface Accessing impln thru.
L10: Model-View-Controller General application structure. User Interface: Role, Requirements, Problems Design patterns: Model – View – Controller, Observer/Observable.
1 An infrastructure for context-awareness based on first order logic 송지수 ISI LAB.
PIX/PDQ – Today and Tomorrow Vassil Peytchev Epic.
INFSO-RI Enabling Grids for E-sciencE BAR: The Current Status Charaka Palansuriya EPCC.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Ext JS - Direct Bridging The Gap A DMSBT Presentation By Timothy Chandler.
Nokia Internal Use Only Outline Status of the PAWS protocol document Open Issues – Review extensibility and IANA registries.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
Delegates and Events 14: Delegates and Events
INFOD-WG Implementation
Programming Models for Distributed Application
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Model-View-Controller Patterns and Frameworks
Delegates & Events 1.
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Distribution Infrastructures
Student: Popa Andrei-Sebastian
5. 3 Coding with Denotations
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Introduction to Classes and Objects
Presentation transcript:

MPI Version 2 Asaf Yaffe July 2006

Agenda Why redesign MPI Requirements Design Concepts –Events –Event Groups Event Filters Enabling/Disabling Events –Data Requests Sample MPI Client Code

Why Redesign MPI? The current design does not scale well –SData is cluttered with unrelated fields and will be even more so when new events and data is added –Extending SData to support more than 32 data types is clumsy –Event selectivity model fits only call-graph events Does not allow different selectivity function callback prototypes Usability –Implicit grouping of events (for selectivity and enable/disable) is documented but not reflected in the formal API –The DataRequest mechanism is complex Function arguments arent natural –.NET and Java specific extensions are not cleanly separated This issue has been addressed separately and is not part of this design

Requirements Support multiple selectivity models for events Event handlers should work with event- specific data –Should include only relevant data items Selectivity and Enable/Disable operations should be applied to groups of related events and not to a specific event –e.g. Call Graph events, Heap events

MPI v2 API Design Concepts

Events (1/2) Martini provides information to profilers through a publish- subscribe event model Clients handle events by implementing Event Observers and registering them with the Martini runtime –A specific MPI Event Observer interface is defined for each event All Event Observer interfaces derive from a generic IEventObserver interface –The interface defines a minimal set of shared operations EventDataTypes() –specifies the data items to send with the event –The generic interface does not define a HandleEvent callback Each Event Observer interface defines an event-specific HandleEvent callback function HandleEvent callbacks differ in their event data type argument These callbacks are used by MPI to dispatch the event to the client

Events (2/2) An observer interface for the New Method event Each event handler is represented by a specific interface. To respond to an event, the client implements and registers the Observer which represents the event it is interested in An observer interface for the Object Free event best seen in slide show mode

Event Groups (1/2) Event Groups enables some operations to be applied on a group of events rather than on individual events –Groups are not new to MPI. In the previous version they were implicitly defined and documented, but the concept was not reflected in the API definition –Examples Event selectivity defined for the Method Enter event is automatically applied to the New Method and Method Leave events Enabling (disabling) the Method Enter event automatically enables (disables) the New Method and Method Leave events In MPI v2, related events are explicitly grouped together –These groups are hard-coded in the API. –Each group is identified by a unique name (defined by an EEventGroup enumerator). –Enabling/disabling events and setting event filter operations are defined for event groups, rather than for individual events

Event Groups (2/2) Supported Event Groups –EG_CALL_GRAPH: New Method, Method Enter and Method Leave –EG_HEAP: Object Alloc, Object Free –EG_MONITOR: Monitor events (TBD) More groups can be added if necessary The following operations are supported for Event Groups only (not for individual events) –Enabling or disabling events –Defining event selectivity

Event Filters (1/2) Filters define the selectivity criterion for events –Associated with Event Groups –Applied to all events in the group –Decoupled from Event Observers The event selectivity is not tied to a specific event Clients define filters by implementing Event Filter interfaces, and registering them with MPI using a specific API (SetEventGroupFilter) –Each Event Group has a corresponding Filter interface which defines a ShouldNotify() operation. The signature of this operation is specific to each group. –ShouldNotify() is the callback used by MPI to query the client for selectivity criterion (for example, during BCI for generating Method Enter/Leave events)

Event Filters (2/2)

Enabling and Disabling Events Enabling and Disabling Events is supported for Event Groups –Cant enable/disable a specific event Clients enable or disable events by using the following APIs –EnableEventGroup(EEventGroup group) –DisableEventGroup(EEventGroup group)

Data Requests No one-size-fits-all Data Request operation A Data Request operation is defined for each data domain (module, class, method, thread, object) –GetModuleInfo(), GetClassInfo(), GetMethodInfo(), etc… –Each domain defines its own structures (SModuleInfo, SClassInfo, etc…) –Structures are not shared between different domains –Structures may be shared with relevant event data Improved usability –The query key (method id, module id, etc) is specified as an API parameter –Resolves the duality of the SData structure used in MPI v1.

The MPI v2 API (1/2) RegisterEvent API –Applicability: profiler initialization only –Paramters: [in] Client ID [in] Event Observer object SetEventGroupFilter API –Applicability: profiler initialization only –Parameters: [in] Client ID [in] Event Group (one of EEventGroup values) [in] Event Filter object Enable/DisableEventGroup –Applicability: profiler initialization and/or MPI live phase –Parameters: [in] Client ID [in] Event Group (one of EEventGroup values)

The MPI v2 API (2/2) GetModule/Class/Method/Thread/ObjectInfo APIs –Applicability: MPI live phase only –Parameters: [in] Client ID [in] Query key (module/class/method/thread/object id) [in] Requested Data Items (Bit Set) [out] module/class/method/thread/object data All other APIs are same as in MPI v1.

Sample MPI Client Code // Define New Method event observer class CNewMethodEvent: public INewMethodEventObserver { BitSet EventDataTypes() { return DR_METHOD_ID | DR_METHOD_NAME | DR_METHOD_SIGNATURE; } void HandleEvent(SNewMethodData &data) { printf("New Method Event received: %d, %s(%s)\n", data.id, data.name, data.signature); } }; // Define Object Allocated event observer class CObjectAllocEvent: public IObjectAllocEventObserver { BitSet EventDataTypes() { return DR_THREAD_ID | DR_OBJECT_ID | DR_OBJECT_INFO; } void HandleEvent(SHeapData &data) { cout << "Object Alloc Event received" << endl; } };

Sample MPI Client Code Defining Event Filters // Define Heap Events selectivity: // track allocations for class mystuff.Foo only class CHeapFilter : public IHeapFilter { bool ShouldNotify(SHeapFilter &filter) { if (strcmp(filter.szClassName, "mystuff.Foo") == 0) { return true; } return false; } };

Sample MPI Client Code Registering Events CNewMethodEvent newMethodEvent; CObjectAllocEvent objectAllocEvent; TResult res; // Register to non-selective EV_NEW_METHOD (initially enabled) res = mpi->RegisterEvent(myClientId, newMethodEvent); // Register to selective EV_OBJECT_ALLOC (initially enabled) res = mpi->RegisterEvent(myClientId, objectAllocEvent); CHeapFilter heapFilter; mpi->SetEventGroupFilter(myClientId, EG_HEAP, heapFilter);