SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
Copyright © 2015 Instantiations, Inc.
23rd ESUG Conference
Brescia, Italy
July 13-19, 2015
Dino2
The Evolution of the
VA Smalltalk Virtual Machine
John O’Keefe
Chief Technical Officer
Instantiations, Inc.
Copyright © 2015 Instantiations, Inc.
Dino2
• Why am I giving the presentation instead of a
real VM guy?
Copyright © 2014 Instantiations, Inc.
Dino2
• Because the real
VM guy is busy!!
• Seth and Kate’s
daughter Adelyn, born
June 19
Copyright © 2015 Instantiations, Inc.
Dino2
Agenda
• Driving forces
• VAST VM history
• Do we need a new VM?
• Challenges
• How we did it
• Results
• Demo
• Still to do
• Q&A
Copyright © 2015 Instantiations, Inc.
Dino2
Driving Forces
• 64-bit support required
• Dramatically expands available memory space
• Interface with 64-bit DLLs/SOs
• Simplify maintenance and enhancement of the
VAST VM
• Enables use of modern tool chains
• Replaces current proprietary modeling language with C
Copyright © 2015 Instantiations, Inc.
Dino2
VAST VM History
• Extremely stable - basically unchanged in 25+
years
• Developed using proprietary Smalltalk VM
Modeling Language
• Maximize efficiency on constrained hardware
• Cross-platform model
• No dependency on C compiler
Smalltalk
Model Code
x86
Power
PC
SPARC
Portable
Assembler
Copyright © 2015 Instantiations, Inc.
Dino2
Do We Need a NEW VM?
• Smalltalk Modeling Language
• Obscure – hard to learn/extend
• Obfuscates the algorithms
• Portable Assembler
• Does not take advantage of new machine architectures
• Generated machine code
• Non-standard calling conventions
• Standard debuggers don’t work
• Hard to map performance tools result back to model
• JIT
• Must be hand-built to match machine architecture
Copyright © 2015 Instantiations, Inc.
Dino2
Sample Smalltalk Model code
VMprCharacterTestBit
self
systemPrimitive: 'VMprCharacterTestBit'
receiverClass: Character
body: [| receiver byteArray bit addr |
receiver := registerModel allocateDataRegister.
byteArray := registerModel allocateAddressRegister.
bit := registerModel allocateDataRegister.
byteArray gets: (self parm: 1 of: 1).
([self isImmediate: byteArray] || [(self isBytes: byteArray) not]) do: [
self failAsmPrimitiveViaCache: PrimErrInvalidClass arg: 1].
receiver gets: (self receiverForParms: 1).
self convertToCharacter: receiver.
bit gets: receiver.
bit &= 7.
receiver shiftRightLogical: 3.
(receiver greaterThanOrEqualUnsigned: (byteArray at: (constant field: 'size' of: K8ObjectHeader))) do: [
self failAsmPrimitiveViaCache: PrimErrInvalidSize arg: 1].
registerModel region: [
addr := registerModel allocateAddressRegister asBytePointer.
addr gets: (constant addressOfLabel: (label global data named: 'K8SetBits')).
bit loadUnsigned: (addr indexedBy: bit)].
receiver loadUnsigned: ((byteArray asBytePointer at: constant objectHeaderSize) index: receiver).
and setFlags source: bit dest: receiver.
condition zero do: [receiver gets: false] else: [receiver gets: true].
self return: receiver parms: 1]
Copyright © 2015 Instantiations, Inc.
Dino2
Sample C code
EsPrimitive(VMprCharacterTestBit)
{
U_16 value;
EsObject byteArray;
U_8 bit;
byteArray = EsPrimitiveArgument(1, 1);
if (!EsIsBytes(byteArray))
EsPrimitiveFailed(EsPrimErrInvalidClass, 1);
value = EsCharacterToU16(EsPrimitiveReceiver(1));
bit = (U_8)(value & 7); /* 0 to 7 bit number within byte */
value = (value >> 3) + 1; /* 1 to (MAX_CHARACTER_VALUE/8)+1 byte number within table */
if (value > (byteArray->size))
EsPrimitiveFailed(EsPrimErrInvalidSize, 1);
EsPrimitiveSucceed((((EsByteAt(byteArray, value)) & (1<<bit)) ? EsTrue : EsFalse), 1);
}
Copyright © 2015 Instantiations, Inc.
Dino2
Challenges
• Minimal existing test cases
• If the basic image tests run, the VM is OK
• ‘VM in C’ performance
• 32-bit x86 VM loses an available register (-)
• C compilers produce far superior code; example:
instruction reordering (+)
• Many benchmarks (both micro and macro) ported and
developed
• Tool chain convergence
• Image conversion
• Impedance mis-match
• “Jump where ever I want to”, stack and register mgmt
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Moved to cmake and gcc based tool chain
• Use ‘register intrinsics’ for performance
• Nightly build and test
• Minimal assembler
• Low-level arithmetic, exception handling, OLE support
• Incremental changes
• Shim code developed to cross old/new boundary
• VM always works
• 64-bit ‘clean’ changes as we go
• Detour from plan: Interpreter was done all in one piece
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Example: Garbage Collector
• 3 major components: Scavenger, Mark-Compact,
Allocator
• Components converted one-at-a-time
• Millions of lines of trace output produced to verify
everything worked the same
• Incremental changes means we always had a working
VM to test the changes
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Just in time image conversion (64-bit VM)
• 32-bit images and image components (ICs) converted
on first use
• Image can be saved in 64-bit format
• 32-bit ICs loadable from 64-bit image
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
There’s no magic in software, just hard work with a result that
may appear to be magic!
• The image has to change -- because 64-bitness
shows through
• Foreign Function Interfaces (FFI) aka PlatformFunctions
• Memory mapping objects (OSObjects)
• Goal is to minimize changes in user code
• So most of the changes are in VAST framework code
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Elastic PlatformFunctions
• Holds template for making FFI call
• Parameter sizes and offsets were fixed
• Changed parameter sizes and offsets from fixed to
relative
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Elastic OSStructures
• Accessors were based on fixed size and structure offsets
• Changed accessors from absolute to relative offset
• Compute fixed offsets on image startup
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Elastic OSStructure Example (C)
#ifdef _WIN32
#include <pshpack1.h>
#endif
typedef struct NMHDR
{
HWND hwndFrom;
UINT_PTR idFrom;
UINT code; // NM_ code
};
typedef struct TVKEYDOWN {
NMHDR hdr;
WORD wVKey;
UINT flags;
};
#ifdef _WIN32
#include <poppack.h>
#endif
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Elastic OSStructure Example (Smalltalk)
"Define NMHDR Struct“
OSNmhdr members: #(#hwndFrom #idFrom #code) types: #(pointer pointer
uint32).
"Define TVKEYDOWN Struct - Pack1 if 32-bit“
OSTvKeydown members: #(hdr wVKey flags) types: #(OSNmhdr uint16 uint32).
System is64BitVM ifFalse: [OSTvKeydown updateAlignmentType: AlignNone]. "Pack
on byte boundary“
-----------------------------------------------------------------------------------------------
OSTvKeydown>>#flags
"Answer the member: UINT flags.
32/64-bit compatible“
^ self uint32At: #flags
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Additional Benefits of Elastic OSStructures
• Custom Packing for data structures
• OSStructure members: #(a b) types: #(int8 int8) alignment:
Align2 "pack2"
• Custom Padding
• OSStructure members: #(a b) types: #(int8 pad[3] int32)
alignment: AlignNone "pack1/manual pad“
• Embedded OSStructures
• OSStructureA members #(a) types: #(int8)
• OSStructureB members #(a b) types: #(int8 OSStructureA)
• Nested Anonymous Structures/Unions
• OSStructure members: #(a (b c) ) types: #(int32 ((int32 int32)) )
• struct { int a; struct { int b; int c; } }
• OSStructure members: #(a (b c) ) types: #(int32 (int32 double) )
• struct { int a; union { int b; double c; } }
• -
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Additional Benefits of Elastic OSStructures
• Pointer Types
• OSStructure members #(a b) types: #(pointer int32) "4 bytes on
32-bit, 8 bytes on 64-bit"
• OSStructure members #(a b) types: #('uint8*' int32) "Also a
pointer with additional type info"
• Arrays
• OSStructure members #(a b) types: #('int8[10]' int32) "Array
types are supported
• OSVariableStructure members: #(a b) types: #(int8 pointer[])
"Flexible array types supported
Copyright © 2015 Instantiations, Inc.
Dino2
How We Did It
• Additional Benefits of Elastic OSStructures
• Dependency Analyzer
• Don't need to define OSStructures in order of their dependencies
• Invalid Circular dependencies will be detected
• Extensible Base Types
• You can add your own types, either globally or method override
• We do a method override for TCHAR for future Unicode support
• Currently a char8, but may later be a char32. Existing definitions using
TCHAR are now future proofed for this change
Copyright © 2015 Instantiations, Inc.
Dino2
Results
• 64-bit VM is just a recompile
• No separate 32-to-64 bit image converter
• Interpreter benchmarks are > 80% of current VM
• Before algorithm tuning
• Before C tuning
• User code is largely unaware of change
Copyright © 2015 Instantiations, Inc.
Dino2
Demo
Copyright © 2015 Instantiations, Inc.
Dino2
Still To Do
• 80% done means more work to do
• Performance tuning (algorithms and C)
• JIT
• 64-bit Packager
• Improved garbage collector
• Installation and setup
• UNIX
Copyright © 2015 Instantiations, Inc.
Dino2
When can we have it?
• Windows - 3 delivery dates
• Alpha
• 1Q2016
• Early customer involvement program; entry by invitation
• Beta
• 2Q2016
• Open registration
• Production
• V9.0 on normal product delivery schedule
• UNIX later
Copyright © 2015 Instantiations, Inc.
Contact us
• General information
• info@instantiations.com
• Sales
• sales@instantiations.com
• Support
• support@instantiations.com
• Me
• john_okeefe@instantiations.com
Copyright © 2015 Instantiations, Inc.
Thank you for your attention
Questions?

Mais conteúdo relacionado

Destaque

Containerization Is More than the New Virtualization
Containerization Is More than the New VirtualizationContainerization Is More than the New Virtualization
Containerization Is More than the New VirtualizationC4Media
 
Top 8 youth program director resume samples
Top 8 youth program director resume samplesTop 8 youth program director resume samples
Top 8 youth program director resume samplestonychoper1905
 
Class seven sura akhlas
Class seven sura akhlasClass seven sura akhlas
Class seven sura akhlasCambriannews
 
Class seven i like folk songs
Class seven i like folk songsClass seven i like folk songs
Class seven i like folk songsCambriannews
 
PRESSURE DROP STUDIES IN WAVY CORRUGATED PLATE HEAT EXCHANGERS
PRESSURE DROP STUDIES IN WAVY CORRUGATED PLATE HEAT EXCHANGERSPRESSURE DROP STUDIES IN WAVY CORRUGATED PLATE HEAT EXCHANGERS
PRESSURE DROP STUDIES IN WAVY CORRUGATED PLATE HEAT EXCHANGERSIAEME Publication
 
La dieta mediterránea
 La dieta mediterránea La dieta mediterránea
La dieta mediterráneaaulasaludable
 

Destaque (12)

Containerization Is More than the New Virtualization
Containerization Is More than the New VirtualizationContainerization Is More than the New Virtualization
Containerization Is More than the New Virtualization
 
Top 8 youth program director resume samples
Top 8 youth program director resume samplesTop 8 youth program director resume samples
Top 8 youth program director resume samples
 
Class seven sura akhlas
Class seven sura akhlasClass seven sura akhlas
Class seven sura akhlas
 
Manú SPA
Manú SPAManú SPA
Manú SPA
 
Don't or Doesn't
Don't or Doesn'tDon't or Doesn't
Don't or Doesn't
 
Don't doesn't ed
Don't doesn't edDon't doesn't ed
Don't doesn't ed
 
38
3838
38
 
Class seven i like folk songs
Class seven i like folk songsClass seven i like folk songs
Class seven i like folk songs
 
PRESSURE DROP STUDIES IN WAVY CORRUGATED PLATE HEAT EXCHANGERS
PRESSURE DROP STUDIES IN WAVY CORRUGATED PLATE HEAT EXCHANGERSPRESSURE DROP STUDIES IN WAVY CORRUGATED PLATE HEAT EXCHANGERS
PRESSURE DROP STUDIES IN WAVY CORRUGATED PLATE HEAT EXCHANGERS
 
Bakso somay 2
Bakso somay 2Bakso somay 2
Bakso somay 2
 
La dieta mediterránea
 La dieta mediterránea La dieta mediterránea
La dieta mediterránea
 
Medio ambiente
Medio ambienteMedio ambiente
Medio ambiente
 

Semelhante a Dino2 - the Amazing Evolution of the VA Smalltalk Virtual Machine

Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceESUG
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesAndreas Katzig
 
Continuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesContinuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesLuke Marsden
 
Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Weaveworks
 
Oh the compilers you'll build
Oh the compilers you'll buildOh the compilers you'll build
Oh the compilers you'll buildMark Stoodley
 
Jfokus 2016 - A JVMs Journey into Polyglot Runtimes
Jfokus 2016 - A JVMs Journey into Polyglot RuntimesJfokus 2016 - A JVMs Journey into Polyglot Runtimes
Jfokus 2016 - A JVMs Journey into Polyglot RuntimesCharlie Gracie
 
Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Weaveworks
 
Building Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDKBuilding Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDKDataLeader.io
 
The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015craig lehmann
 
Why use Gitlab
Why use GitlabWhy use Gitlab
Why use Gitlababenyeung1
 
Why and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company GrowsWhy and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company GrowsNGINX, Inc.
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth Pilli
 
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...Intel® Software
 
PyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using PythonPyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using Pythonpycontw
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...Sang Don Kim
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 
20191018 DevOpsDays Taipei 2019 從零開始的 Configuration Management
20191018 DevOpsDays Taipei 2019 從零開始的 Configuration Management20191018 DevOpsDays Taipei 2019 從零開始的 Configuration Management
20191018 DevOpsDays Taipei 2019 從零開始的 Configuration ManagementJiun-Yi Chen
 
SMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiSMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiTakuya ASADA
 

Semelhante a Dino2 - the Amazing Evolution of the VA Smalltalk Virtual Machine (20)

embedded C.pptx
embedded C.pptxembedded C.pptx
embedded C.pptx
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performance
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
 
Continuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with KubernetesContinuous Delivery the hard way with Kubernetes
Continuous Delivery the hard way with Kubernetes
 
Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes
 
Oh the compilers you'll build
Oh the compilers you'll buildOh the compilers you'll build
Oh the compilers you'll build
 
Jfokus 2016 - A JVMs Journey into Polyglot Runtimes
Jfokus 2016 - A JVMs Journey into Polyglot RuntimesJfokus 2016 - A JVMs Journey into Polyglot Runtimes
Jfokus 2016 - A JVMs Journey into Polyglot Runtimes
 
Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes Continuous Delivery the Hard Way with Kubernetes
Continuous Delivery the Hard Way with Kubernetes
 
Building Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDKBuilding Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDK
 
03 workshop
 03 workshop 03 workshop
03 workshop
 
The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015
 
Why use Gitlab
Why use GitlabWhy use Gitlab
Why use Gitlab
 
Why and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company GrowsWhy and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company Grows
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latest
 
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
 
PyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using PythonPyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using Python
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
20191018 DevOpsDays Taipei 2019 從零開始的 Configuration Management
20191018 DevOpsDays Taipei 2019 從零開始的 Configuration Management20191018 DevOpsDays Taipei 2019 從零開始的 Configuration Management
20191018 DevOpsDays Taipei 2019 從零開始的 Configuration Management
 
SMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiSMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgi
 

Mais de ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

Mais de ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Último

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Último (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Dino2 - the Amazing Evolution of the VA Smalltalk Virtual Machine

  • 1. Copyright © 2015 Instantiations, Inc. 23rd ESUG Conference Brescia, Italy July 13-19, 2015 Dino2 The Evolution of the VA Smalltalk Virtual Machine John O’Keefe Chief Technical Officer Instantiations, Inc.
  • 2. Copyright © 2015 Instantiations, Inc. Dino2 • Why am I giving the presentation instead of a real VM guy?
  • 3. Copyright © 2014 Instantiations, Inc. Dino2 • Because the real VM guy is busy!! • Seth and Kate’s daughter Adelyn, born June 19
  • 4. Copyright © 2015 Instantiations, Inc. Dino2 Agenda • Driving forces • VAST VM history • Do we need a new VM? • Challenges • How we did it • Results • Demo • Still to do • Q&A
  • 5. Copyright © 2015 Instantiations, Inc. Dino2 Driving Forces • 64-bit support required • Dramatically expands available memory space • Interface with 64-bit DLLs/SOs • Simplify maintenance and enhancement of the VAST VM • Enables use of modern tool chains • Replaces current proprietary modeling language with C
  • 6. Copyright © 2015 Instantiations, Inc. Dino2 VAST VM History • Extremely stable - basically unchanged in 25+ years • Developed using proprietary Smalltalk VM Modeling Language • Maximize efficiency on constrained hardware • Cross-platform model • No dependency on C compiler Smalltalk Model Code x86 Power PC SPARC Portable Assembler
  • 7. Copyright © 2015 Instantiations, Inc. Dino2 Do We Need a NEW VM? • Smalltalk Modeling Language • Obscure – hard to learn/extend • Obfuscates the algorithms • Portable Assembler • Does not take advantage of new machine architectures • Generated machine code • Non-standard calling conventions • Standard debuggers don’t work • Hard to map performance tools result back to model • JIT • Must be hand-built to match machine architecture
  • 8. Copyright © 2015 Instantiations, Inc. Dino2 Sample Smalltalk Model code VMprCharacterTestBit self systemPrimitive: 'VMprCharacterTestBit' receiverClass: Character body: [| receiver byteArray bit addr | receiver := registerModel allocateDataRegister. byteArray := registerModel allocateAddressRegister. bit := registerModel allocateDataRegister. byteArray gets: (self parm: 1 of: 1). ([self isImmediate: byteArray] || [(self isBytes: byteArray) not]) do: [ self failAsmPrimitiveViaCache: PrimErrInvalidClass arg: 1]. receiver gets: (self receiverForParms: 1). self convertToCharacter: receiver. bit gets: receiver. bit &= 7. receiver shiftRightLogical: 3. (receiver greaterThanOrEqualUnsigned: (byteArray at: (constant field: 'size' of: K8ObjectHeader))) do: [ self failAsmPrimitiveViaCache: PrimErrInvalidSize arg: 1]. registerModel region: [ addr := registerModel allocateAddressRegister asBytePointer. addr gets: (constant addressOfLabel: (label global data named: 'K8SetBits')). bit loadUnsigned: (addr indexedBy: bit)]. receiver loadUnsigned: ((byteArray asBytePointer at: constant objectHeaderSize) index: receiver). and setFlags source: bit dest: receiver. condition zero do: [receiver gets: false] else: [receiver gets: true]. self return: receiver parms: 1]
  • 9. Copyright © 2015 Instantiations, Inc. Dino2 Sample C code EsPrimitive(VMprCharacterTestBit) { U_16 value; EsObject byteArray; U_8 bit; byteArray = EsPrimitiveArgument(1, 1); if (!EsIsBytes(byteArray)) EsPrimitiveFailed(EsPrimErrInvalidClass, 1); value = EsCharacterToU16(EsPrimitiveReceiver(1)); bit = (U_8)(value & 7); /* 0 to 7 bit number within byte */ value = (value >> 3) + 1; /* 1 to (MAX_CHARACTER_VALUE/8)+1 byte number within table */ if (value > (byteArray->size)) EsPrimitiveFailed(EsPrimErrInvalidSize, 1); EsPrimitiveSucceed((((EsByteAt(byteArray, value)) & (1<<bit)) ? EsTrue : EsFalse), 1); }
  • 10. Copyright © 2015 Instantiations, Inc. Dino2 Challenges • Minimal existing test cases • If the basic image tests run, the VM is OK • ‘VM in C’ performance • 32-bit x86 VM loses an available register (-) • C compilers produce far superior code; example: instruction reordering (+) • Many benchmarks (both micro and macro) ported and developed • Tool chain convergence • Image conversion • Impedance mis-match • “Jump where ever I want to”, stack and register mgmt
  • 11. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Moved to cmake and gcc based tool chain • Use ‘register intrinsics’ for performance • Nightly build and test • Minimal assembler • Low-level arithmetic, exception handling, OLE support • Incremental changes • Shim code developed to cross old/new boundary • VM always works • 64-bit ‘clean’ changes as we go • Detour from plan: Interpreter was done all in one piece
  • 12. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Example: Garbage Collector • 3 major components: Scavenger, Mark-Compact, Allocator • Components converted one-at-a-time • Millions of lines of trace output produced to verify everything worked the same • Incremental changes means we always had a working VM to test the changes
  • 13. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Just in time image conversion (64-bit VM) • 32-bit images and image components (ICs) converted on first use • Image can be saved in 64-bit format • 32-bit ICs loadable from 64-bit image
  • 14. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It There’s no magic in software, just hard work with a result that may appear to be magic! • The image has to change -- because 64-bitness shows through • Foreign Function Interfaces (FFI) aka PlatformFunctions • Memory mapping objects (OSObjects) • Goal is to minimize changes in user code • So most of the changes are in VAST framework code
  • 15. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Elastic PlatformFunctions • Holds template for making FFI call • Parameter sizes and offsets were fixed • Changed parameter sizes and offsets from fixed to relative
  • 16. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Elastic OSStructures • Accessors were based on fixed size and structure offsets • Changed accessors from absolute to relative offset • Compute fixed offsets on image startup
  • 17. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Elastic OSStructure Example (C) #ifdef _WIN32 #include <pshpack1.h> #endif typedef struct NMHDR { HWND hwndFrom; UINT_PTR idFrom; UINT code; // NM_ code }; typedef struct TVKEYDOWN { NMHDR hdr; WORD wVKey; UINT flags; }; #ifdef _WIN32 #include <poppack.h> #endif
  • 18. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Elastic OSStructure Example (Smalltalk) "Define NMHDR Struct“ OSNmhdr members: #(#hwndFrom #idFrom #code) types: #(pointer pointer uint32). "Define TVKEYDOWN Struct - Pack1 if 32-bit“ OSTvKeydown members: #(hdr wVKey flags) types: #(OSNmhdr uint16 uint32). System is64BitVM ifFalse: [OSTvKeydown updateAlignmentType: AlignNone]. "Pack on byte boundary“ ----------------------------------------------------------------------------------------------- OSTvKeydown>>#flags "Answer the member: UINT flags. 32/64-bit compatible“ ^ self uint32At: #flags
  • 19. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Additional Benefits of Elastic OSStructures • Custom Packing for data structures • OSStructure members: #(a b) types: #(int8 int8) alignment: Align2 "pack2" • Custom Padding • OSStructure members: #(a b) types: #(int8 pad[3] int32) alignment: AlignNone "pack1/manual pad“ • Embedded OSStructures • OSStructureA members #(a) types: #(int8) • OSStructureB members #(a b) types: #(int8 OSStructureA) • Nested Anonymous Structures/Unions • OSStructure members: #(a (b c) ) types: #(int32 ((int32 int32)) ) • struct { int a; struct { int b; int c; } } • OSStructure members: #(a (b c) ) types: #(int32 (int32 double) ) • struct { int a; union { int b; double c; } } • -
  • 20. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Additional Benefits of Elastic OSStructures • Pointer Types • OSStructure members #(a b) types: #(pointer int32) "4 bytes on 32-bit, 8 bytes on 64-bit" • OSStructure members #(a b) types: #('uint8*' int32) "Also a pointer with additional type info" • Arrays • OSStructure members #(a b) types: #('int8[10]' int32) "Array types are supported • OSVariableStructure members: #(a b) types: #(int8 pointer[]) "Flexible array types supported
  • 21. Copyright © 2015 Instantiations, Inc. Dino2 How We Did It • Additional Benefits of Elastic OSStructures • Dependency Analyzer • Don't need to define OSStructures in order of their dependencies • Invalid Circular dependencies will be detected • Extensible Base Types • You can add your own types, either globally or method override • We do a method override for TCHAR for future Unicode support • Currently a char8, but may later be a char32. Existing definitions using TCHAR are now future proofed for this change
  • 22. Copyright © 2015 Instantiations, Inc. Dino2 Results • 64-bit VM is just a recompile • No separate 32-to-64 bit image converter • Interpreter benchmarks are > 80% of current VM • Before algorithm tuning • Before C tuning • User code is largely unaware of change
  • 23. Copyright © 2015 Instantiations, Inc. Dino2 Demo
  • 24. Copyright © 2015 Instantiations, Inc. Dino2 Still To Do • 80% done means more work to do • Performance tuning (algorithms and C) • JIT • 64-bit Packager • Improved garbage collector • Installation and setup • UNIX
  • 25. Copyright © 2015 Instantiations, Inc. Dino2 When can we have it? • Windows - 3 delivery dates • Alpha • 1Q2016 • Early customer involvement program; entry by invitation • Beta • 2Q2016 • Open registration • Production • V9.0 on normal product delivery schedule • UNIX later
  • 26. Copyright © 2015 Instantiations, Inc. Contact us • General information • info@instantiations.com • Sales • sales@instantiations.com • Support • support@instantiations.com • Me • john_okeefe@instantiations.com
  • 27. Copyright © 2015 Instantiations, Inc. Thank you for your attention Questions?