“Whidbey” CLR Internals

Slides:



Advertisements
Similar presentations
1 Unit 1: Introduction To.Net. 2 Introduction to.Net Integrated Development Environment (IDE) Languages in the.NET Framework The Common Language Runtime.
Advertisements

By Sam Nasr September 28, 2004 Understanding MSIL.
SSCLI (Shared Source Common Language Infrastructure) (code name: Rotor)
Henrico Dolfing Business Segment Partners. Océ Document Technologies GmbH2 June, NET Framework Version 3.0.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
.Net Overview Giuseppe Attardi Università di Pisa.
1 Federating Identity and Authorization Across Organizations and Platforms Matthew Hur Lead Program Manager Microsoft Corporation
Thursday Evening 6.30VB.NET Introduction 7.30Break for food 8.00VB.NET Migration 8.45Q & A 9.00Done.
Module 1: Overview of the Microsoft.NET Framework.
SQL Server 2005 CLR Integration ADO.NET 2.0 Mike Taulty
1 Introducing ClickOnce: The New Application Deployment Model for Windows Forms and “Avalon” Jamie Cool Program Manager Microsoft.
Future Directions for Leveraging Advanced XML Tools and Building Custom XML Solutions Denise Draper DAT321 Microsoft Corporation.
Building Rights Management Enabled Applications For Windows "Longhorn" Steve Bourne Chandramouli Venkatesh Microsoft Corporation Steve Bourne Chandramouli.
1 Programming Windows Help Shane McRoberts Group Program Manager Microsoft Corporation Shane McRoberts Group Program Manager Microsoft.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 18 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
Using.NET Skills To Build Mobile Applications In Compact Framework Punit Shah Technical Lead | Microsoft |
David Evans CS201j: Engineering Software University of Virginia Computer Science Lecture 18: 0xCAFEBABE (Java Byte Codes)
Plataformas.NET para desenvolvimento de aplicações web José António Silva
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Data Access Design Patterns: Navigating the Data Access Maze Michael Pizzo Software Architect Microsoft Corporation Michael Pizzo Software Architect Microsoft.
1 Using XSD, CLR Types, And Serialization In Web Services Doug Purdy Program Manager Microsoft Corporation Doug Purdy Program Manager.
Microsoft.NET Framework Overview Abidi Mahmoud Seminarium on Component -based Software Engineering.
1 Keyboard, Speech, and Pen Input in Your Controls Kevin Gjerstad Lead Program Manager Kevin Gjerstad Lead Program Manager
Assemblies & Namespaces1. 2 Assemblies (1).NET applications are represented by an assembly An assembly is a collection of all software of which the application.
Module 1: Overview of the Microsoft.NET Platform.
“Indigo”: Building Peer-To-Peer Applications Todd R. Manion Program Manager Microsoft Corporation Todd R. Manion Program Manager.
What is.NET? CS 351 Ed Gellenbeck. Today What is.NET? What Problems Does.NET Solve? What are.NET Framework Components?
CF and.NET Working Together Using Web Services Geoff Snowman Developer Community Champion Microsoft Corporation.
1.NET Framework Overview: A Road Map Brad Abrams.NET Framework Team Microsoft Corporation Brad Abrams.NET Framework.
“Indigo”: Connected Application Technology Roadmap
1 Application Model Fundamentals Chris Anderson Software Architect Microsoft Corporation Chris Anderson Software Architect Microsoft.
 Joshua Goodman Group Program Manager Microsoft Corporation.
Microsoft.Net Sven Groot. Common Language Runtime Superset of ECMA Common Language Infrastructure Defines  Language-neutral platform  Intermediate Language.
ADO.NET 2.0: Advanced Data Access Patterns Pablo Castro DAT408 ADO.NET Technical Lead Microsoft Corporation.
“Avalon”: Using UI Automation to Improve Application Testability Robert Sinclair Group Manager Microsoft Corporation Robert Sinclair.
1 Integrating Real-time Collaboration into your Applications Stephanie Lindsey Program Manager Microsoft Corporation Stephanie.
1 Interop Best Practices and Common Pitfalls (That We Learned the Hard Way) Please write your name on a card in the back and place it in the box… Please.
NAMESPACE. Namespaces Namespaces are a way to define the classes and other types of information into one hierarchical structure. System is the basic namespace.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
SQL Server Notifications: Invalidating Cached Results Michael Pizzo Software Architect Microsoft Corporation Michael Pizzo Software.
Overview CNS 3260 C#.NET Software Development. 2.NET Framework Began in 2000 Developed in three years (2000 to 2003) Operating System Hardware.NET Framework.
Extending Workflow With Custom Activities Dennis Pilarinos COM328 Program Manager Microsoft Corporation.
1 Programming ADO.NET in Whidbey Pablo Castro/Brad Rhodes ADO.NET Team Microsoft Corporation Pablo Castro/Brad Rhodes.
Introducing the Microsoft® .NET Framework
Modernizing your. NET applications with. NET Standard,
Web Services On Devices: Rally Implementation
An Introduction to the Shared Source Common Language Infrastructure (SSCLI) Damien Watkins Copyright Watkins 2002.
Using Audio, Video, and Imaging in your Longhorn Applications
ASP.NET Core: Web apps, cloud apps, and containers
System.Search, aka “Find My Stuff”
Avalon – Using Data In Your Applications
ASP.NET Web Forms and Web Services
Transactional Programming In A Windows World
Introduction to .NET Framework Ch2 – Deitel’s Book
Building Innovative Apps using the Microsoft Developer Platform
Application Foundation
Michael Wallent General Manager Windows Client Platform
Mobile Application Development 2005 By Sam Nasr July 25, 2006
11/17/2018 9:30 PM Session Code: ARC 420
Learn. Imagine. Build. .NET Conf
Building Rich, Interactive Controls for Windows “Longhorn”
New User Interface Possibilities in Longhorn
"Avalon": Building Applications With Controls And Dialogs
People And Groups Controls In Windows "Longhorn"
.NET Base Type (CTS Data Type) Managed Extensions for C++ Keyword
NAMESPACE.
Session Code: CLI391 Windows Forms: Exploiting Windows “Longhorn” Features from Within Your Application Mark Boulter .NET Client Team Microsoft Corporation.
Mark Quirk Head of Technology Developer & Platform Group
Computer Architecture and System Programming Laboratory
.NET Framework Design Goals
Presentation transcript:

“Whidbey” CLR Internals 11/12/2018 12:39 PM Session Code: ARC413 “Whidbey” CLR Internals Jonathan Keljo jkeljo@microsoft.com Program Manager Microsoft Corporation © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11/12/2018 12:39 PM Tools Client Application Model Web & Service Application Model Data Systems Application Model Mobile PC & Devices Application Model Command Line Compact Framework Avalon Windows Forms ASP.NET / Indigo Win FS Yukon System.Console Mobile PC Optimized System.Web System.Storage System.Data.SqlServer System.Windows.Forms System.Windows NT Service System.Windows System.Windows.Forms System.ServiceProcess Presentation Data Communication System.Windows System.Search System.Data System.Messaging System. Discovery System.Collaboration UI Element Explorer Media Annotations SqlClient DataSet System.DirectoryServices RealTimeEndpoint Documents Controls Animation SqlTypes Mapping Active Directory TransientDataSession Monitoring System.Remoting Text Element Dialogs Controls SqlXML ObjectSpaces SignalingSession Logging System.Runtime.Remoting Uddi Shapes SideBar Control OdbcClient ObjectSpace Media Shape Notification Panel Relevance OleDbClient Query Activities Ink Navigation Design OracleClient Schema System.Web.Services System.MessageBus Web.Service Transport Queue System.Storage System.Windows.Forms System.Web.UI Port PubSub Item Core Description Forms Page WebControls Discovery Channel Router Relationship Contact Control Control Adaptors Service Policy Media Location Protocols Print Dialog HtmlControls Design Peer Group Audio Message Design MobileControls Video Document System.Net Images Event System.Web System.Help System.Speech HttpWebRequest NetworkInformation System.Xml Personalization FtpWebListener Sockets System.Drawing Recognition Synthesis Caching Schema Xpath SslClientStream Cache System.NaturalLanguageServices Serialization Query SessionState WebClient Fundamentals Base & Application Services Security Configuration Deployment/Management System.Timers System.Text System.Collections System.Windows. TrustManagement System.Web.Configuration System.Globalization System.Design System.Security System.Web Generic System.MessageBus.Configuration Administration System.Serialization System.IO System.Web. Security Authorization Permissions System.ComponentModel System.Configuration Management System.Threading Ports AccessControl Policy System.CodeDom System.Resources System.Message Bus.Security Credentials Principal System.Management System.Runtime System.Reflection Cryptography Token System.Deployment Serialization InteropServices System.EnterpriseServices System.Diagnostics CompilerServices System.Transactions © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Frameworks (BCL, WinFX, etc.) 11/12/2018 12:39 PM The Big Picture IDE Debugger Editor Compiler Source Files Frameworks (BCL, WinFX, etc.) EXE (IL) CLR JIT Loader GC Metadata Exceptions Interop Threading Remoting Security Debugging © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

C++ Templates … Stack <int> <double> <point> Main 11/12/2018 12:39 PM C++ Templates template <class T> class Stack { … T Pop() … } Template stack class Stack <int> <double> <point> … Main program Executable (x86) C++ Compiler Stack<int> … … Stack <double> … Stack <point> … Main program source © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

CLR Generics Stack <T> Main program class Stack<T> { … 11/12/2018 12:39 PM CLR Generics class Stack<T> { … T Pop() … } Template stack class .NET Compiler Stack <T> Main program Executable (IL) Stack<int> … … Stack <double> … Stack <point> … Main program source © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Generics in IL & Metadata 11/12/2018 12:39 PM Generics in IL & Metadata © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

IL Execution IL (Source line “T retval = _array[topOfStack]”) ldarg.0 11/12/2018 12:39 PM IL Execution IL (Source line “T retval = _array[topOfStack]”) ldarg.0 ldfld !0[] class GenericsDemo.GenericStack<!0>::_array ldloc.0 ldelem !0 stloc.1 Arguments [0] this Locals [0] topOfStack [1] null topOfStack topOfStack this._array[topOfStack] this._array[topOfStack] this._array[topOfStack] this._array this._array this this Evaluation Stack © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

GenericParamConstraint (0x2c) 11/12/2018 12:39 PM Generics in Metadata TypeDef (0x2) … Name Field List Method GenericStack Method (0x6) … Name Signature Param List .ctor 20 01 01 08 Pop 20 00 13 00 Push 20 01 01 13 00 Param (0x8) … Name initialSize toPush GenericParam (0x2a) Number … Owner Name T Field (0x4) … Name Signature _array 06 1d 13 00 _depth 06 08 GenericParamConstraint (0x2c) Owner Constraint System.Object … © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Param 1 Type is Generic Type Parameter 11/12/2018 12:39 PM Generic Signatures … 20 01 01 13 00 Push 20 00 13 00 Pop 20 01 01 08 .ctor Signature Name Method (0x6) Param (0x8) … Name initialSize toPush 20 01 01 13 00 Push Param 1 Type is Generic Type Parameter Instance Method (has “this”/”Me”) With 1 Parameter Void Return void Push(T toPush); 20 01 01 13 Param 1 is of type T 00 “Calling Convention” # Parameters Return Type Element Type Parameter Types Type Param Index © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Generics: Code Generation 11/12/2018 12:39 PM Generics: Code Generation © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Generics – Code Generation 11/12/2018 12:39 PM Generics – Code Generation MethodTable _array _depth 2 … Stack <int> MethodTable x86 .ctor <int> 4 2 … x86 Pop <int> … Stack<object> MethodTable x86 Push <int> MethodTable _array _depth 5 … x86 .ctor <object> MethodTable _array _depth 7 x86 Pop <object> … Stack<Form> MethodTable … x86 Push <object> © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Frameworks (BCL, WinFX, etc.) 11/12/2018 12:39 PM The Big Picture IDE Debugger Editor Compiler Source Files Frameworks (BCL, WinFX, etc.) EXE (IL) CLR JIT Loader GC Metadata Exceptions Interop Threading Remoting Security Debugging © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

EnC: Editing a Method 11/12/2018 12:39 PM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

EnC – Editing a Method (1) Delta IL & Delta Metadata 11/12/2018 12:39 PM EnC – Editing a Method (1) Delta IL & Delta Metadata Delta Metadata (Provided by debugger) Full Metadata (In Running Process) Method (0x6) RVA … Name 4 PrintStatistics Method (0x6) RVA … Name 2050 Main 20a8 PrintStatistics INV EnCLog (0x1e) Token FuncCode 06000002 … EnCMap (0x1f) Token 06000002 … 2050 Complete Original IL . Other Data 20a8 Delta Header IL Header for PrintStatistics nop ldc.i4.0 stloc.1 . 4 Delta IL 8940 8944 Delta IL © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

EnC – Editing a Method (2) Remap 11/12/2018 12:39 PM EnC – Editing a Method (2) Remap IL Virtual Execution System x86 Processor Original IL Variables Original x86 Stack … i sum Registers … numbers .locals init (int32, int32) . call Console.ReadLine pop nop ret numbers i sum . call FFFFD630 pop ebx pop esi pop edi avg avg New IL New x86 .locals init (int32, int32, double) . call Console.ReadLine pop nop ret . call FFFFD630 fild dword … fstp dword … mov ecx, edi pop ebx pop esi pop edi © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

EnC – Editing Within a Call 11/12/2018 12:39 PM EnC – Editing Within a Call IL Virtual Execution System x86 Processor Original IL Variables Original x86 Stack … i sum Registers … numbers .locals init (int32, int32) . call Console.ReadLine pop nop ret numbers i sum . call FFFFD630 pop ebx pop esi pop edi vars for ReadLine . avg avg New IL New x86 .locals init (int32, int32, double) . call Console.ReadLine pop nop ret . call FFFFD630 fild dword … fstp dword … mov ecx, edi pop ebx pop esi pop edi © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

EnC: Editing a Class 11/12/2018 12:39 PM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

EnC – Editing a Class (1) Delta Metadata 11/12/2018 12:39 PM EnC – Editing a Class (1) Delta Metadata Delta Metadata (Provided by debugger) Full Metadata (In Running Process) Field (0x4) … Name Signature _avg 06 0d _max 06 08 TypeDef (0x2) … Name Field List StatBuilder 04000001 03000001 EnCLog (0x1e) Token Func Code 02000001 2 04000019 04000020 … EnCMap (0x1f) Token 04000019 04000020 … FieldPtr (0X3) Token 04000001 04000002 04000019 04000020 … Field (0x4) … Name Signature _numbers 06 12 45 _sum 06 08 _avg 06 0d _max 06 08 © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

EnC – Editing a Class (2) Extending Existing Instances 11/12/2018 12:39 PM EnC – Editing a Class (2) Extending Existing Instances SyncBlock MethodTable _numbers _sum 500 SyncBlock MethodTable _numbers _sum 33 … SyncBlock MethodTable _numbers _sum 101 _max 8 _avg 5.5 © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Keeping Things Sane Runtime Power vs. Language Legality 11/12/2018 12:39 PM Keeping Things Sane Runtime Power vs. Language Legality Can do all kinds of crazy things with CLR’s support Left to the languages to decide what edits make sense Lots of potential work here EnC-friendly codegen Exception handling Managing cascading effects of edits © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Shameless Plug Language Implementers’ Lunch Thursday 11:30-1:30 11/12/2018 12:39 PM Shameless Plug Language Implementers’ Lunch Thursday 11:30-1:30 Programming Languages & Tools Track Lounge © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Community Resources Get Your Questions Answered! 11/12/2018 12:39 PM Community Resources Get Your Questions Answered! Newsgroups: microsoft.private.whidbey.clr Architecture & Infrastructure Lounge: 309 Foyer connect with Microsoft infrastructure product teams, and PDC 2003 Speakers PDC Weblogs: http://pdcbloggers.net © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11/12/2018 12:39 PM Resources Books The Common Language Infrastructure Annotated Standard. ISBN 0-3211-5493-2 Inside Microsoft .NET IL Assembler. ISBN 0-7356-1547-0 Essential .NET Volume 1. ISBN 0-201-73411-7 Shared Source CLI Essentials. ISBN 0-596-00351-X © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11/12/2018 12:39 PM Questions? © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

© 2003-2004 Microsoft Corporation. All rights reserved. 11/12/2018 12:39 PM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11/12/2018 12:39 PM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.