SlideShare uma empresa Scribd logo
1 de 77
Baixar para ler offline
A Tour to Spur for
Non-VM Experts
Guille Polito, Christophe Demarey
ESUG 2016, 22/08, Praha
From a user point of view
We are working on the new Pharo Kernel
● Bootstrap: create an image from scratch
- Classes
- Global objects
- Processes and contexts
● Image Initialization: What is the correct order?
BTW, see our talk on this ;)
Mission Pharo Kernel, Thursday 10 am
What is this talk about?
Dec 14, 2015; 11:08am
[IMPORTANT] Starting migration to Spur
VM
Initial Motivation to look into Spur
1) How do we move to Spur
as fast as possible?
2) Should we /
How do we adapt to it?
3) What are the risks?
Motivation of this talk #1: Education
Explain what is Spur
Determine if a problem comes
from image side or VM side?
Motivation of this talk #2:
Understanding the Impact
Is my application compatible?
Will It break? Do I have to port it?
Part 1:
Demolishing Myths
What is Spur?
Spur is not a new Virtual Machine
Its underlying execution engine is the same as in Cog
(same bytecode, same interpreter, same JIT compiler)
Spur is not a new Garbage Collector
It just implements a new garbage collector
(which, BTW, is not new...)
Spur is not a new Object Format.
It just implements a new object format
(which, BTW, is just the means to an end)
So... what is Spur?
Spur is a new Memory Manager for Cog VM.
- New object representation in memory
(that allows ephemerons, pinned objects,...)
- New memory organization of Pharo images
(that allows to better manage resources)
Spur in a Nutshell
It's a Cog VM
+ 64 bits support
+ faster: x1.8 speedup
+ larger images (> 2 Go)
+ ephemeron support
and more ...
Spur > 64-bits support
● No more need to install 32-bits libraries
● Images with size > 2 Go
Spur > faster access to classes
Class Table
● Direct access to
class objects
0
1
2
3
4
5
6
7
8
Array (hash=0)
String (hash=6)
Next page...
Spur > faster
Garbage Collector
● “Young objects die young (and fast)”
● Added survivor segments (future and past) to
the young space
=> allows more minor GC instead of major GC
future
Old space Young Space
past
eden
Major GC (mark & sweep)
Minor GC
(scavenger)
Spur > Fast become
No more hangs in large images when using #become:
(e.g. Moose with a big famix model)
Why? Spur introduces forwarders
● prevents to scan the whole memory
● replaces pointers when they are accessed
● implemented by a partial read barrier1
Cheap in most cases (just one indirection)
Costly if you rely a lot on primitives fallback
1. Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support
of Live Object-Oriented Programming. ISMM'15
Spur > faster
Immediate objects
New immediate objects
● Character
● Float (only 64-bits)
Speed-up in wide strings
Speed-up in float arithmetic and memory saving
Spur > other features
Spur object format:
● All classes are compact
=> only two kind of headers (3 before Spur)
● Support for pinned-objects (see UFFI talk on Friday)
● Ongoing support of read-only objects
● Still 2 unused bits
Spur > scalability
● Memory is now divided in several segments
● No more need to have a contiguous chunk of
memory
Memory
segment
Memory
segment
Memory
segment
Memory
segment
Spur > reliability
● Ephemeron finalization support
● Avoid memory leaks
BTW, see our OTHER talk on this ;)
A Weak Pharo story, Thursday, 3 pm
Part 2:
Porting applications and
frameworks to Spur
Cog
Spur
How do I port
my application
to Spur?
Porting Applications
Porting Applications
Porting Applications
Porting Applications
Okay, maybe just wait that your developer friends
port your favorite frameworks.
Porting Frameworks/Libraries
Porting Basics #1
The number hierarchy changed
● Beware if you have visitors
● Beware if you have overrides
Porting Frameworks/Libraries
Porting Basics #2
Character is now immediate
● Beware if you have overrides that use the
internal state
Porting Frameworks/Libraries
Porting Basics #3
New (enhanced) ephemeron finalization
● If you need finalization you'll probably want to
use the new one
BTW, see our OTHER talk on this ;)
Porting Frameworks/Libraries
A Weak Pharo story, Thursday, 3 pm
Porting Basics #4
Native Boost is being deprecated
● If you are using FFI, you will need to review your
bindings
Porting Frameworks/Libraries
Native Boost UFFI
Spur Behind the Scenes
VM development hosted on GitHub:
OpenSmalltalk / opensmalltalk-vm
Why is it a good news?
● Brings together the VM community
● Easier to contribute
– Pull requests
– Issue tracker
– Documentation:
https://github.com/OpenSmalltalk/opensmalltalk-
vm/blob/Cog/CONTRIBUTING.md
VM build all flavors through
Travis CI
Still missing VM tests. Upcoming?
Where to find VM binaries?
● Pharo
http://files.pharo.org/vm/
Squeak, NewSpeak
https://bintray.com/opensmalltalk/vm/cog
Conclusion
Should I move to Spur?
Bounce
BubbleSort
DeltaBlue
Fannkuch
GraphSearch
Json
Mandelbrot
Nbody
PageRank
Permute
Queens
QuickSort
Sieve
Storage
Towers
0
0,2
0,4
0,6
0,8
1
1,2
1,4
1,6
1,8
Pre-Spur
Spur
by Stefan Marr, Apr 06, 2015
Should I move to Spur?
✔ 64-bits support
✔ Increased performances: x1.8 speedup
✔ Scalability, Reliability and open to new
features
– image not compacting anymore (will be fixed soon)
EXTRA SLIDES!
1) Class tables
2) Forwarders
3) Ephemeron Finalization
4) The Scavenger GC
Dissecting Spur...
Chapter 1
Classes are in Tables
(and they hide in tables)
1.1 The old object header...
1.1 Compact classes
Smalltalk compactClassesArray
1.1 Cons of the old object header
● A full word is used to indicate an object's class
– 4G classes in 32 bits
– 16E (2^60) classes in 64 bits (!!)
● Three different headers
=> checks for the header type are common
1.2 New class header
1.2 Class table
0
1
2
3
4
5
6
7
8
Array (hash=0)
String (hash=6)
Next page...
1.2 Class table
class idx = 0
0
1
2
3
4
5
6
7
8
Array (hash=0)
String (hash=6)
Next page...
1.2 Pros of the new object header
● 2^22 classes (4M). Still enough and efficient.
● Compatible with 64bits
● All classes are compact => only two kind of headers
1.2 Hidden objects
0
1
2
3
4
5
6
7
8
Array (hash=0)
String (hash=6)
Next page...
Class idx = 1
1.2 Hidden objects?
● The class table is an object (and lives in the heap)
● Its class index is “hidden”:
– Array allInstances
will iterate objects by class index
● In the class table:
– Indexes 0-15 are reserved for tagged objects
– Indexes 16-32 are reserved for hidden classes
1.3 Maintaining the class table
Classes are normal objects...
They are created with no special primitives...
But...
How does the VM know an object is a
class to put it into the class table?
1.3 Identifying classes by definition
A class is an object that is instantiated:
A class enters the class table
upon instantiation
1.3 But the index is the hash!
But... hashes are assigned lazily for all objects:
Classes, on instance-side,
define a special hash method
Behavior >> basicIdentityHash
<primitive: 175>
self primitiveFailed
Object >> basicIdentityHash
<primitive: 75>
self primitiveFailed
Chapter 1 - Conclusions
● Classes are organized in tables
● All classes are compact
● Simpler object header
● Still place for 4M classes
● On the image side, is almost transparent
Chapter 2
The forwarder plague
2.1 Become
● Swaps two objects
– (actually, swaps two object's identity)
● Useful for:
– Updating and migrating objects
– Install proxies
– Replace an object's behavior
2.1 The old become
● Full scanned all memory
● And was SLOOOOOW
2.1 Lazy become
ba
Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient
Support of Live Object-Oriented Programming. ISMM'15
2.1 Lazy become
b becomeForward: a.
User's code
Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient
Support of Live Object-Oriented Programming. ISMM'15
ba
2.1 Lazy become
Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient
Support of Live Object-Oriented Programming. ISMM'15
b becomeForward: a.
User's code
a forwarder!
2.1 Lazy Become
Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient
Support of Live Object-Oriented Programming. ISMM'15
b becomeForward: a.
b doSomething
User's code
a forwarder!
2.2 The read barrier
● A full read barrier would be too expensive
– (on every read, on every primitive, on every
message send...)
● The read barrier is implemented in two places:
– Message send lookup failure
– Primitive failure
Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient
Support of Live Object-Oriented Programming. ISMM'15
2.2 Message send lookup failure
method := (self lookupSelector: selector inClass: class).
method ifNil: [
(receiver isForwarder) ifTrue: [
receiver := receiver forward.
“scan also the objects in the stack” ].
method := (self lookupSelector: selector inClass: class).
].
Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient
Support of Live Object-Oriented Programming. ISMM'15
2.2 Primitive failure
self performPrimitive: primitiveNumber.
self primitiveFailed ifTrue: [
“scan the stack looking for forwarders and retry”
self performPrimitive: primitiveNumber.
].
Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient
Support of Live Object-Oriented Programming. ISMM'15
2 Conclusions
● Become does not need full scan anymore
● A forwarder replaces the object in place
● Two-way become copies object at the end
● Forwarders are bypassed using a partial read barrier:
– Message lookup failure
– Primitive failure
● No noticeable overhead
3.5 Scavenger GC
● “Young Objects Die Young (and quick)”
● Young objects are created in eden
● Objects are “tenured” after surviving several
generations
● Tenured objects go to old space
3.5 Scavenger GC
Old space New Space
future past
eden
3.5 Scavenger GC
Old space New Space
future past
eden
● Mark and Sweep (marking collector)
● Runs “every blue moon” on the entire memory
● Slow
● Scavenger (copying collector)
● Runs often, only in new space
● Object tenure (to old space)
depends on the ratio of
allocation
3.5 Scavenger GC
New Space
future past eden
1) Future is always empty during execution
3.5 Scavenger GC
New Space
future past eden
1) Future is always empty during execution
2) On a GC, past and eden objects that are referenced are copied to future
3.5 Scavenger GC
New Space
past future eden
1) Future is always empty during execution
2) On a GC, past and eden objects that are referenced are copied to future
3) Then, future and past spaces are swapped
3.5 Scavenger GC
Two questions remain:
● How does the scavenger do a GC without
iterating the entire heap?
● How does he know object ages?
3.5 Scavenger GC
Two questions remain:
● How does the scavenger do a GC without
iterating the entire heap?
● How does he know object ages?
It maintains a set of “objects in new space referenced from old space”
By their addresses! Lower addresses are younger....
Is that all?
● Pinned objects?
● The finalization queue?
● Memory segments, bridges, …?
● (The not working) Memory compaction?
● New immediate objects?
● ...

Mais conteúdo relacionado

Mais procurados

Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarMaarten Balliauw
 
C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...Gianluca Padovani
 
Intro to Python Workshop San Diego, CA (January 19, 2013)
Intro to Python Workshop San Diego, CA (January 19, 2013)Intro to Python Workshop San Diego, CA (January 19, 2013)
Intro to Python Workshop San Diego, CA (January 19, 2013)Kendall
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Carlos Miguel Ferreira
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in javaRaghu nath
 
Best Python Online Training with Live Project by Expert
Best Python Online Training with Live Project by Expert Best Python Online Training with Live Project by Expert
Best Python Online Training with Live Project by Expert QA TrainingHub
 
Multithreading programming in java
Multithreading programming in javaMultithreading programming in java
Multithreading programming in javaElizabeth alexander
 
NDK Primer (AnDevCon Boston 2014)
NDK Primer (AnDevCon Boston 2014)NDK Primer (AnDevCon Boston 2014)
NDK Primer (AnDevCon Boston 2014)Ron Munitz
 
Introduction to programming with python
Introduction to programming with pythonIntroduction to programming with python
Introduction to programming with pythonPorimol Chandro
 
Introduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsIntroduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsShashank L
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in javaMonika Mishra
 
WeakReferences (java.lang.ref and more)
WeakReferences (java.lang.ref and more)WeakReferences (java.lang.ref and more)
WeakReferences (java.lang.ref and more)Mohannad Hassan
 
Intro to Objective C
Intro to Objective CIntro to Objective C
Intro to Objective CAshiq Uz Zoha
 

Mais procurados (20)

Multithreading Design Patterns
Multithreading Design PatternsMultithreading Design Patterns
Multithreading Design Patterns
 
Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinar
 
Cetis Talk 27 Jan2009
Cetis Talk 27 Jan2009Cetis Talk 27 Jan2009
Cetis Talk 27 Jan2009
 
C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...
 
Intro to Python Workshop San Diego, CA (January 19, 2013)
Intro to Python Workshop San Diego, CA (January 19, 2013)Intro to Python Workshop San Diego, CA (January 19, 2013)
Intro to Python Workshop San Diego, CA (January 19, 2013)
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.
 
Java Threads
Java ThreadsJava Threads
Java Threads
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
 
Concurrency
ConcurrencyConcurrency
Concurrency
 
Best Python Online Training with Live Project by Expert
Best Python Online Training with Live Project by Expert Best Python Online Training with Live Project by Expert
Best Python Online Training with Live Project by Expert
 
Multithreading programming in java
Multithreading programming in javaMultithreading programming in java
Multithreading programming in java
 
NDK Primer (AnDevCon Boston 2014)
NDK Primer (AnDevCon Boston 2014)NDK Primer (AnDevCon Boston 2014)
NDK Primer (AnDevCon Boston 2014)
 
Beginning Python
Beginning PythonBeginning Python
Beginning Python
 
Multithreading by rj
Multithreading by rjMultithreading by rj
Multithreading by rj
 
Introduction to programming with python
Introduction to programming with pythonIntroduction to programming with python
Introduction to programming with python
 
Introduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsIntroduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actors
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
 
WeakReferences (java.lang.ref and more)
WeakReferences (java.lang.ref and more)WeakReferences (java.lang.ref and more)
WeakReferences (java.lang.ref and more)
 
Intro to Objective C
Intro to Objective CIntro to Objective C
Intro to Objective C
 
The Java Memory Model
The Java Memory ModelThe Java Memory Model
The Java Memory Model
 

Destaque

Garage RDBMS
Garage RDBMSGarage RDBMS
Garage RDBMSESUG
 
[TUTORIAL] PetitParser
[TUTORIAL] PetitParser[TUTORIAL] PetitParser
[TUTORIAL] PetitParserESUG
 
Toward a Platform for Visual Debugging
Toward a Platform for Visual DebuggingToward a Platform for Visual Debugging
Toward a Platform for Visual DebuggingESUG
 
A First Analysis of String APIs: the Case of Pharo
A First Analysis of String APIs: the Case of PharoA First Analysis of String APIs: the Case of Pharo
A First Analysis of String APIs: the Case of PharoESUG
 
Mocks, Proxies, and Transpilation as Development Strategies for Web Development
Mocks, Proxies, and Transpilation as Development Strategies for Web DevelopmentMocks, Proxies, and Transpilation as Development Strategies for Web Development
Mocks, Proxies, and Transpilation as Development Strategies for Web DevelopmentESUG
 
The Glamorous Toolkit: Towards a novel live IDE
The Glamorous Toolkit: Towards a novel live IDEThe Glamorous Toolkit: Towards a novel live IDE
The Glamorous Toolkit: Towards a novel live IDEESUG
 
governmentclassdiscussionboard2phase 1
governmentclassdiscussionboard2phase 1governmentclassdiscussionboard2phase 1
governmentclassdiscussionboard2phase 1Krista Fluty
 
Current CSR developments in the mining sector in Peru
Current CSR developments in the mining sector in PeruCurrent CSR developments in the mining sector in Peru
Current CSR developments in the mining sector in PeruAndres Recalde
 
The Cog VM evolution
The Cog VM evolutionThe Cog VM evolution
The Cog VM evolutionESUG
 
Presentación Lmeg Virtual Experience
Presentación Lmeg Virtual Experience Presentación Lmeg Virtual Experience
Presentación Lmeg Virtual Experience LME-G
 
Pragmas: Literal Messages as Powerful Method Annotations
Pragmas: Literal Messages as Powerful Method AnnotationsPragmas: Literal Messages as Powerful Method Annotations
Pragmas: Literal Messages as Powerful Method AnnotationsESUG
 
Federal Vs State Governments GOVT201IP1
Federal Vs State Governments GOVT201IP1Federal Vs State Governments GOVT201IP1
Federal Vs State Governments GOVT201IP1Krista Fluty
 
Tony Hsieh Delivering Happiness @ Stanford GSB
Tony Hsieh Delivering Happiness @ Stanford GSBTony Hsieh Delivering Happiness @ Stanford GSB
Tony Hsieh Delivering Happiness @ Stanford GSBDesigning Happiness
 

Destaque (15)

Garage RDBMS
Garage RDBMSGarage RDBMS
Garage RDBMS
 
[TUTORIAL] PetitParser
[TUTORIAL] PetitParser[TUTORIAL] PetitParser
[TUTORIAL] PetitParser
 
Toward a Platform for Visual Debugging
Toward a Platform for Visual DebuggingToward a Platform for Visual Debugging
Toward a Platform for Visual Debugging
 
A First Analysis of String APIs: the Case of Pharo
A First Analysis of String APIs: the Case of PharoA First Analysis of String APIs: the Case of Pharo
A First Analysis of String APIs: the Case of Pharo
 
Mocks, Proxies, and Transpilation as Development Strategies for Web Development
Mocks, Proxies, and Transpilation as Development Strategies for Web DevelopmentMocks, Proxies, and Transpilation as Development Strategies for Web Development
Mocks, Proxies, and Transpilation as Development Strategies for Web Development
 
The Glamorous Toolkit: Towards a novel live IDE
The Glamorous Toolkit: Towards a novel live IDEThe Glamorous Toolkit: Towards a novel live IDE
The Glamorous Toolkit: Towards a novel live IDE
 
governmentclassdiscussionboard2phase 1
governmentclassdiscussionboard2phase 1governmentclassdiscussionboard2phase 1
governmentclassdiscussionboard2phase 1
 
Current CSR developments in the mining sector in Peru
Current CSR developments in the mining sector in PeruCurrent CSR developments in the mining sector in Peru
Current CSR developments in the mining sector in Peru
 
senthil int
senthil intsenthil int
senthil int
 
Santos 2
Santos 2Santos 2
Santos 2
 
The Cog VM evolution
The Cog VM evolutionThe Cog VM evolution
The Cog VM evolution
 
Presentación Lmeg Virtual Experience
Presentación Lmeg Virtual Experience Presentación Lmeg Virtual Experience
Presentación Lmeg Virtual Experience
 
Pragmas: Literal Messages as Powerful Method Annotations
Pragmas: Literal Messages as Powerful Method AnnotationsPragmas: Literal Messages as Powerful Method Annotations
Pragmas: Literal Messages as Powerful Method Annotations
 
Federal Vs State Governments GOVT201IP1
Federal Vs State Governments GOVT201IP1Federal Vs State Governments GOVT201IP1
Federal Vs State Governments GOVT201IP1
 
Tony Hsieh Delivering Happiness @ Stanford GSB
Tony Hsieh Delivering Happiness @ Stanford GSBTony Hsieh Delivering Happiness @ Stanford GSB
Tony Hsieh Delivering Happiness @ Stanford GSB
 

Semelhante a A tour on Spur for non-VM experts

JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...Maarten Balliauw
 
Exploring .NET memory management - A trip down memory lane - Copenhagen .NET ...
Exploring .NET memory management - A trip down memory lane - Copenhagen .NET ...Exploring .NET memory management - A trip down memory lane - Copenhagen .NET ...
Exploring .NET memory management - A trip down memory lane - Copenhagen .NET ...Maarten Balliauw
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETMaarten Balliauw
 
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management....NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...NETFest
 
Container Torture: Run any binary, in any container
Container Torture: Run any binary, in any containerContainer Torture: Run any binary, in any container
Container Torture: Run any binary, in any containerDocker, Inc.
 
ConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory laneConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory laneMaarten Balliauw
 
Here comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdfHere comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdfKrystian Zybała
 
Vulnerability, exploit to metasploit
Vulnerability, exploit to metasploitVulnerability, exploit to metasploit
Vulnerability, exploit to metasploitTiago Henriques
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuningosa_ora
 
Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2ice799
 
From Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndromeFrom Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndromeJavier Arias Losada
 
Debugging With Id
Debugging With IdDebugging With Id
Debugging With Idguest215c4e
 
Industry - Program analysis and verification - Type-preserving Heap Profiler ...
Industry - Program analysis and verification - Type-preserving Heap Profiler ...Industry - Program analysis and verification - Type-preserving Heap Profiler ...
Industry - Program analysis and verification - Type-preserving Heap Profiler ...ICSM 2011
 
Sensepost assessment automation
Sensepost assessment automationSensepost assessment automation
Sensepost assessment automationSensePost
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Pythoninfodox
 
Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Kiran Jonnalagadda
 

Semelhante a A tour on Spur for non-VM experts (20)

JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
Exploring .NET memory management - A trip down memory lane - Copenhagen .NET ...
Exploring .NET memory management - A trip down memory lane - Copenhagen .NET ...Exploring .NET memory management - A trip down memory lane - Copenhagen .NET ...
Exploring .NET memory management - A trip down memory lane - Copenhagen .NET ...
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
 
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management....NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
 
Container Torture: Run any binary, in any container
Container Torture: Run any binary, in any containerContainer Torture: Run any binary, in any container
Container Torture: Run any binary, in any container
 
ConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory laneConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory lane
 
Here comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdfHere comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdf
 
Vulnerability, exploit to metasploit
Vulnerability, exploit to metasploitVulnerability, exploit to metasploit
Vulnerability, exploit to metasploit
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuning
 
Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2
 
Threading in C#
Threading in C#Threading in C#
Threading in C#
 
C# basics
C# basicsC# basics
C# basics
 
From Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndromeFrom Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndrome
 
Debugging With Id
Debugging With IdDebugging With Id
Debugging With Id
 
Debugging
DebuggingDebugging
Debugging
 
Industry - Program analysis and verification - Type-preserving Heap Profiler ...
Industry - Program analysis and verification - Type-preserving Heap Profiler ...Industry - Program analysis and verification - Type-preserving Heap Profiler ...
Industry - Program analysis and verification - Type-preserving Heap Profiler ...
 
Sensepost assessment automation
Sensepost assessment automationSensepost assessment automation
Sensepost assessment automation
 
Steelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with PythonSteelcon 2014 - Process Injection with Python
Steelcon 2014 - Process Injection with Python
 
Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)Python and Zope: An introduction (May 2004)
Python and Zope: An introduction (May 2004)
 
0507 057 01 98 * Adana Cukurova Klima Servisleri
0507 057 01 98 * Adana Cukurova Klima Servisleri0507 057 01 98 * Adana Cukurova Klima Servisleri
0507 057 01 98 * Adana Cukurova Klima Servisleri
 

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

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

A tour on Spur for non-VM experts

  • 1. A Tour to Spur for Non-VM Experts Guille Polito, Christophe Demarey ESUG 2016, 22/08, Praha
  • 2. From a user point of view We are working on the new Pharo Kernel ● Bootstrap: create an image from scratch - Classes - Global objects - Processes and contexts ● Image Initialization: What is the correct order? BTW, see our talk on this ;) Mission Pharo Kernel, Thursday 10 am
  • 3. What is this talk about? Dec 14, 2015; 11:08am [IMPORTANT] Starting migration to Spur VM
  • 4. Initial Motivation to look into Spur 1) How do we move to Spur as fast as possible? 2) Should we / How do we adapt to it? 3) What are the risks?
  • 5. Motivation of this talk #1: Education Explain what is Spur Determine if a problem comes from image side or VM side?
  • 6. Motivation of this talk #2: Understanding the Impact Is my application compatible? Will It break? Do I have to port it?
  • 9. Spur is not a new Virtual Machine Its underlying execution engine is the same as in Cog (same bytecode, same interpreter, same JIT compiler)
  • 10. Spur is not a new Garbage Collector It just implements a new garbage collector (which, BTW, is not new...)
  • 11. Spur is not a new Object Format. It just implements a new object format (which, BTW, is just the means to an end)
  • 12. So... what is Spur? Spur is a new Memory Manager for Cog VM. - New object representation in memory (that allows ephemerons, pinned objects,...) - New memory organization of Pharo images (that allows to better manage resources)
  • 13.
  • 14. Spur in a Nutshell It's a Cog VM + 64 bits support + faster: x1.8 speedup + larger images (> 2 Go) + ephemeron support and more ...
  • 15. Spur > 64-bits support ● No more need to install 32-bits libraries ● Images with size > 2 Go
  • 16. Spur > faster access to classes Class Table ● Direct access to class objects 0 1 2 3 4 5 6 7 8 Array (hash=0) String (hash=6) Next page...
  • 17. Spur > faster Garbage Collector ● “Young objects die young (and fast)” ● Added survivor segments (future and past) to the young space => allows more minor GC instead of major GC future Old space Young Space past eden Major GC (mark & sweep) Minor GC (scavenger)
  • 18. Spur > Fast become No more hangs in large images when using #become: (e.g. Moose with a big famix model) Why? Spur introduces forwarders ● prevents to scan the whole memory ● replaces pointers when they are accessed ● implemented by a partial read barrier1 Cheap in most cases (just one indirection) Costly if you rely a lot on primitives fallback 1. Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support of Live Object-Oriented Programming. ISMM'15
  • 19. Spur > faster Immediate objects New immediate objects ● Character ● Float (only 64-bits) Speed-up in wide strings Speed-up in float arithmetic and memory saving
  • 20. Spur > other features Spur object format: ● All classes are compact => only two kind of headers (3 before Spur) ● Support for pinned-objects (see UFFI talk on Friday) ● Ongoing support of read-only objects ● Still 2 unused bits
  • 21. Spur > scalability ● Memory is now divided in several segments ● No more need to have a contiguous chunk of memory Memory segment Memory segment Memory segment Memory segment
  • 22. Spur > reliability ● Ephemeron finalization support ● Avoid memory leaks BTW, see our OTHER talk on this ;) A Weak Pharo story, Thursday, 3 pm
  • 23. Part 2: Porting applications and frameworks to Spur Cog Spur
  • 24. How do I port my application to Spur?
  • 28. Porting Applications Okay, maybe just wait that your developer friends port your favorite frameworks.
  • 30. Porting Basics #1 The number hierarchy changed ● Beware if you have visitors ● Beware if you have overrides Porting Frameworks/Libraries
  • 31. Porting Basics #2 Character is now immediate ● Beware if you have overrides that use the internal state Porting Frameworks/Libraries
  • 32. Porting Basics #3 New (enhanced) ephemeron finalization ● If you need finalization you'll probably want to use the new one BTW, see our OTHER talk on this ;) Porting Frameworks/Libraries A Weak Pharo story, Thursday, 3 pm
  • 33. Porting Basics #4 Native Boost is being deprecated ● If you are using FFI, you will need to review your bindings Porting Frameworks/Libraries Native Boost UFFI
  • 34. Spur Behind the Scenes
  • 35. VM development hosted on GitHub: OpenSmalltalk / opensmalltalk-vm
  • 36. Why is it a good news? ● Brings together the VM community ● Easier to contribute – Pull requests – Issue tracker – Documentation: https://github.com/OpenSmalltalk/opensmalltalk- vm/blob/Cog/CONTRIBUTING.md
  • 37. VM build all flavors through Travis CI Still missing VM tests. Upcoming?
  • 38. Where to find VM binaries? ● Pharo http://files.pharo.org/vm/ Squeak, NewSpeak https://bintray.com/opensmalltalk/vm/cog
  • 40. Should I move to Spur? Bounce BubbleSort DeltaBlue Fannkuch GraphSearch Json Mandelbrot Nbody PageRank Permute Queens QuickSort Sieve Storage Towers 0 0,2 0,4 0,6 0,8 1 1,2 1,4 1,6 1,8 Pre-Spur Spur by Stefan Marr, Apr 06, 2015
  • 41. Should I move to Spur? ✔ 64-bits support ✔ Increased performances: x1.8 speedup ✔ Scalability, Reliability and open to new features – image not compacting anymore (will be fixed soon)
  • 43. 1) Class tables 2) Forwarders 3) Ephemeron Finalization 4) The Scavenger GC Dissecting Spur...
  • 44. Chapter 1 Classes are in Tables (and they hide in tables)
  • 45. 1.1 The old object header...
  • 46. 1.1 Compact classes Smalltalk compactClassesArray
  • 47. 1.1 Cons of the old object header ● A full word is used to indicate an object's class – 4G classes in 32 bits – 16E (2^60) classes in 64 bits (!!) ● Three different headers => checks for the header type are common
  • 48. 1.2 New class header
  • 49. 1.2 Class table 0 1 2 3 4 5 6 7 8 Array (hash=0) String (hash=6) Next page...
  • 50. 1.2 Class table class idx = 0 0 1 2 3 4 5 6 7 8 Array (hash=0) String (hash=6) Next page...
  • 51. 1.2 Pros of the new object header ● 2^22 classes (4M). Still enough and efficient. ● Compatible with 64bits ● All classes are compact => only two kind of headers
  • 52. 1.2 Hidden objects 0 1 2 3 4 5 6 7 8 Array (hash=0) String (hash=6) Next page... Class idx = 1
  • 53. 1.2 Hidden objects? ● The class table is an object (and lives in the heap) ● Its class index is “hidden”: – Array allInstances will iterate objects by class index ● In the class table: – Indexes 0-15 are reserved for tagged objects – Indexes 16-32 are reserved for hidden classes
  • 54. 1.3 Maintaining the class table Classes are normal objects... They are created with no special primitives... But... How does the VM know an object is a class to put it into the class table?
  • 55. 1.3 Identifying classes by definition A class is an object that is instantiated: A class enters the class table upon instantiation
  • 56. 1.3 But the index is the hash! But... hashes are assigned lazily for all objects: Classes, on instance-side, define a special hash method Behavior >> basicIdentityHash <primitive: 175> self primitiveFailed Object >> basicIdentityHash <primitive: 75> self primitiveFailed
  • 57. Chapter 1 - Conclusions ● Classes are organized in tables ● All classes are compact ● Simpler object header ● Still place for 4M classes ● On the image side, is almost transparent
  • 59. 2.1 Become ● Swaps two objects – (actually, swaps two object's identity) ● Useful for: – Updating and migrating objects – Install proxies – Replace an object's behavior
  • 60. 2.1 The old become ● Full scanned all memory ● And was SLOOOOOW
  • 61. 2.1 Lazy become ba Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support of Live Object-Oriented Programming. ISMM'15
  • 62. 2.1 Lazy become b becomeForward: a. User's code Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support of Live Object-Oriented Programming. ISMM'15 ba
  • 63. 2.1 Lazy become Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support of Live Object-Oriented Programming. ISMM'15 b becomeForward: a. User's code a forwarder!
  • 64. 2.1 Lazy Become Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support of Live Object-Oriented Programming. ISMM'15 b becomeForward: a. b doSomething User's code a forwarder!
  • 65. 2.2 The read barrier ● A full read barrier would be too expensive – (on every read, on every primitive, on every message send...) ● The read barrier is implemented in two places: – Message send lookup failure – Primitive failure Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support of Live Object-Oriented Programming. ISMM'15
  • 66. 2.2 Message send lookup failure method := (self lookupSelector: selector inClass: class). method ifNil: [ (receiver isForwarder) ifTrue: [ receiver := receiver forward. “scan also the objects in the stack” ]. method := (self lookupSelector: selector inClass: class). ]. Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support of Live Object-Oriented Programming. ISMM'15
  • 67. 2.2 Primitive failure self performPrimitive: primitiveNumber. self primitiveFailed ifTrue: [ “scan the stack looking for forwarders and retry” self performPrimitive: primitiveNumber. ]. Eliot Miranda, Clément Bera. A Partial Read Barrier for Efficient Support of Live Object-Oriented Programming. ISMM'15
  • 68. 2 Conclusions ● Become does not need full scan anymore ● A forwarder replaces the object in place ● Two-way become copies object at the end ● Forwarders are bypassed using a partial read barrier: – Message lookup failure – Primitive failure ● No noticeable overhead
  • 69. 3.5 Scavenger GC ● “Young Objects Die Young (and quick)” ● Young objects are created in eden ● Objects are “tenured” after surviving several generations ● Tenured objects go to old space
  • 70. 3.5 Scavenger GC Old space New Space future past eden
  • 71. 3.5 Scavenger GC Old space New Space future past eden ● Mark and Sweep (marking collector) ● Runs “every blue moon” on the entire memory ● Slow ● Scavenger (copying collector) ● Runs often, only in new space ● Object tenure (to old space) depends on the ratio of allocation
  • 72. 3.5 Scavenger GC New Space future past eden 1) Future is always empty during execution
  • 73. 3.5 Scavenger GC New Space future past eden 1) Future is always empty during execution 2) On a GC, past and eden objects that are referenced are copied to future
  • 74. 3.5 Scavenger GC New Space past future eden 1) Future is always empty during execution 2) On a GC, past and eden objects that are referenced are copied to future 3) Then, future and past spaces are swapped
  • 75. 3.5 Scavenger GC Two questions remain: ● How does the scavenger do a GC without iterating the entire heap? ● How does he know object ages?
  • 76. 3.5 Scavenger GC Two questions remain: ● How does the scavenger do a GC without iterating the entire heap? ● How does he know object ages? It maintains a set of “objects in new space referenced from old space” By their addresses! Lower addresses are younger....
  • 77. Is that all? ● Pinned objects? ● The finalization queue? ● Memory segments, bridges, …? ● (The not working) Memory compaction? ● New immediate objects? ● ...