SlideShare una empresa de Scribd logo
1 de 66
Descargar para leer sin conexión
Adventures with Mono Runtime on Mobile Platforms
.NET Stammtisch Linz
Bernhard Urban
beurba@microsoft.com
https://www.xamarin.com
https://www.mono-project.com
July 23, 2019
foundation
1 / 13
2 / 13
Xamarin
3 / 13
The Mono Runtime — Overview
Execution modes
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
FullAOT
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
FullAOT
Interpreter
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
FullAOT
Interpreter
Supported platforms
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
FullAOT
Interpreter
Supported platforms
Linux, macOS, Windows, *BSD, AIX, IBM i, . . .
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
FullAOT
Interpreter
Supported platforms
Linux, macOS, Windows, *BSD, AIX, IBM i, . . .
iOS, tvOS, watchOS & Android
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
FullAOT
Interpreter
Supported platforms
Linux, macOS, Windows, *BSD, AIX, IBM i, . . .
iOS, tvOS, watchOS & Android
XBox, PlayStation, WiiU, . . .
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
FullAOT
Interpreter
Supported platforms
Linux, macOS, Windows, *BSD, AIX, IBM i, . . .
iOS, tvOS, watchOS & Android
XBox, PlayStation, WiiU, . . .
amd64, x86, armv7, armv8, powerpc, s390x
4 / 13
The Mono Runtime — Overview
Execution modes
Just-In-Time compiler
Ahead-Of-Time compiler
normal AOT
FullAOT
Interpreter
Supported platforms
Linux, macOS, Windows, *BSD, AIX, IBM i, . . .
iOS, tvOS, watchOS & Android
XBox, PlayStation, WiiU, . . .
amd64, x86, armv7, armv8, powerpc, s390x
WebAssembly
4 / 13
Embedding the Mono Runtime
Embedding Mono
link Mono into your application
5 / 13
Embedding the Mono Runtime
Embedding Mono
link Mono into your application
allows execution of .NET, e.g. useful for scripting
5 / 13
Embedding the Mono Runtime
Embedding Mono
link Mono into your application
allows execution of .NET, e.g. useful for scripting
Users
5 / 13
Embedding the Mono Runtime
Embedding Mono
link Mono into your application
allows execution of .NET, e.g. useful for scripting
Users
Game Studios
5 / 13
Embedding the Mono Runtime
Embedding Mono
link Mono into your application
allows execution of .NET, e.g. useful for scripting
Users
Game Studios
Unity
5 / 13
Embedding the Mono Runtime
Embedding Mono
link Mono into your application
allows execution of .NET, e.g. useful for scripting
Users
Game Studios
Unity
Blazor: check out https://learn-blazor.com/
5 / 13
Embedding the Mono Runtime
Embedding Mono
link Mono into your application
allows execution of .NET, e.g. useful for scripting
Users
Game Studios
Unity
Blazor: check out https://learn-blazor.com/
Xamarin.Android & Xamarin.iOS
5 / 13
Platform & Device landscape
iOS on iPhone/iPad.
6 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
6 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
6 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
6 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
x86 64: JIT.
6 / 13
FullAOT
7 / 13
FullAOT
iOS does not allow JIT compilation
7 / 13
FullAOT
iOS does not allow JIT compilation
Normal AOT uses JIT occasionally at runtime
7 / 13
FullAOT
iOS does not allow JIT compilation
Normal AOT uses JIT occasionally at runtime
All trampolines and wrappers must be included in the AOT image
7 / 13
FullAOT
iOS does not allow JIT compilation
Normal AOT uses JIT occasionally at runtime
All trampolines and wrappers must be included in the AOT image
Side-effect: System.Reflection.Emit does not work
7 / 13
What about generics?
8 / 13
What about generics?
public T return_t<T> (T arg) {
return arg;
}
8 / 13
What about generics?
public T return_t<T> (T arg) {
return arg;
}
// "Generic sharing for value types"
public void return_t (T& ret, T& arg, ptr hidden_arg) {
int size = rgctx_fetch (hidden_arg);
memcpy (ret, arg, size);
}
8 / 13
What about generics?
public T return_t<T> (T arg) {
return arg;
}
// "Generic sharing for value types"
public void return_t (T& ret, T& arg, ptr hidden_arg) {
int size = rgctx_fetch (hidden_arg);
memcpy (ret, arg, size);
}
int i = return_t<int> (5);
8 / 13
What about generics?
public T return_t<T> (T arg) {
return arg;
}
// "Generic sharing for value types"
public void return_t (T& ret, T& arg, ptr hidden_arg) {
int size = rgctx_fetch (hidden_arg);
memcpy (ret, arg, size);
}
int i = return_t<int> (5);
// calling chain
caller
⇒ callee
8 / 13
What about generics?
public T return_t<T> (T arg) {
return arg;
}
// "Generic sharing for value types"
public void return_t (T& ret, T& arg, ptr hidden_arg) {
int size = rgctx_fetch (hidden_arg);
memcpy (ret, arg, size);
}
int i = return_t<int> (5);
// calling chain
caller
⇒ gsharedvt_arg_trampoline
⇒ callee
8 / 13
What about generics?
public T return_t<T> (T arg) {
return arg;
}
// "Generic sharing for value types"
public void return_t (T& ret, T& arg, ptr hidden_arg) {
int size = rgctx_fetch (hidden_arg);
memcpy (ret, arg, size);
}
int i = return_t<int> (5);
// calling chain
caller
⇒ gsharedvt_arg_trampoline
⇒ gsharedvt_in_trampoline
⇒ callee
8 / 13
System.Reflection.Emit?
System.ExecutionEngineException:
Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod ()
9 / 13
System.Reflection.Emit?
System.ExecutionEngineException:
Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod ()
9 / 13
System.Reflection.Emit?
System.ExecutionEngineException:
Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod ()
Runtime interpreter enables System.Reflection.Emit
9 / 13
System.Reflection.Emit?
System.ExecutionEngineException:
Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod ()
Runtime interpreter enables System.Reflection.Emit
Faster “inner dev loop”
No need to run the AOT compiler
Smaller app bundle size ⇒ faster deploy
9 / 13
System.Reflection.Emit?
System.ExecutionEngineException:
Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod ()
Runtime interpreter enables System.Reflection.Emit
Faster “inner dev loop”
No need to run the AOT compiler
Smaller app bundle size ⇒ faster deploy
Best of both worlds: “Mixed Mode” with FullAOT
9 / 13
System.Reflection.Emit?
System.ExecutionEngineException:
Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod ()
Runtime interpreter enables System.Reflection.Emit
Faster “inner dev loop”
No need to run the AOT compiler
Smaller app bundle size ⇒ faster deploy
Best of both worlds: “Mixed Mode” with FullAOT
Ships with upcoming release of Xamarin.iOS (Preview available)
9 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
x86 64: JIT.
tvOS on Apple TV.
10 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
x86 64: JIT.
tvOS on Apple TV.
arm64: FullAOT and interpreter.
10 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
x86 64: JIT.
tvOS on Apple TV.
arm64: FullAOT and interpreter.
x86 64: JIT.
10 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
x86 64: JIT.
tvOS on Apple TV.
arm64: FullAOT and interpreter.
x86 64: JIT.
watchOS on Apple Watch.
10 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
x86 64: JIT.
tvOS on Apple TV.
arm64: FullAOT and interpreter.
x86 64: JIT.
watchOS on Apple Watch.
armv7k: FullAOT and bitcode.
10 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
x86 64: JIT.
tvOS on Apple TV.
arm64: FullAOT and interpreter.
x86 64: JIT.
watchOS on Apple Watch.
armv7k: FullAOT and bitcode.
arm64 32: interpreter (WIP) and bitcode.
10 / 13
Platform & Device landscape
iOS on iPhone/iPad.
armv7: FullAOT.
arm64: FullAOT and interpreter.
x86: JIT.
x86 64: JIT.
tvOS on Apple TV.
arm64: FullAOT and interpreter.
x86 64: JIT.
watchOS on Apple Watch.
armv7k: FullAOT and bitcode.
arm64 32: interpreter (WIP) and bitcode.
x86: JIT.
10 / 13
Xamarin.Android
Simliar to Linux, except for interop between C# and Java
Two Garbage collectors have to work together
11 / 13
Xamarin.Android
Simliar to Linux, except for interop between C# and Java
Two Garbage collectors have to work together
War story: Samsung Galaxy S7
11 / 13
Xamarin.Android
Simliar to Linux, except for interop between C# and Java
Two Garbage collectors have to work together
War story: Samsung Galaxy S7
First bug report: “Xamarin.Android apps on the Samsung Galaxy S7
fails to start with the error System.ExecutionEngineException
SIGILL“.
11 / 13
Xamarin.Android
Simliar to Linux, except for interop between C# and Java
Two Garbage collectors have to work together
War story: Samsung Galaxy S7
First bug report: “Xamarin.Android apps on the Samsung Galaxy S7
fails to start with the error System.ExecutionEngineException
SIGILL“.
Co-worker in the US got the device.
11 / 13
Xamarin.Android
Simliar to Linux, except for interop between C# and Java
Two Garbage collectors have to work together
War story: Samsung Galaxy S7
First bug report: “Xamarin.Android apps on the Samsung Galaxy S7
fails to start with the error System.ExecutionEngineException
SIGILL“.
Co-worker in the US got the device. He could not reproduce it.
11 / 13
Xamarin.Android
Simliar to Linux, except for interop between C# and Java
Two Garbage collectors have to work together
War story: Samsung Galaxy S7
First bug report: “Xamarin.Android apps on the Samsung Galaxy S7
fails to start with the error System.ExecutionEngineException
SIGILL“.
Co-worker in the US got the device. He could not reproduce it.
US edition: Ships with Snapdragon 820.
11 / 13
Xamarin.Android
Simliar to Linux, except for interop between C# and Java
Two Garbage collectors have to work together
War story: Samsung Galaxy S7
First bug report: “Xamarin.Android apps on the Samsung Galaxy S7
fails to start with the error System.ExecutionEngineException
SIGILL“.
Co-worker in the US got the device. He could not reproduce it.
US edition: Ships with Snapdragon 820.
World edition: Ships with Exynos 8890.
11 / 13
Xamarin.Android
Simliar to Linux, except for interop between C# and Java
Two Garbage collectors have to work together
War story: Samsung Galaxy S7
First bug report: “Xamarin.Android apps on the Samsung Galaxy S7
fails to start with the error System.ExecutionEngineException
SIGILL“.
Co-worker in the US got the device. He could not reproduce it.
US edition: Ships with Snapdragon 820.
World edition: Ships with Exynos 8890.
Could reproduce it with Xamarin Test Cloud.
11 / 13
War story: Samsung Galaxy S7
$ grep SIGILL *.log
custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0
custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0
custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70
custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0
custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0
custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0
12 / 13
War story: Samsung Galaxy S7
$ grep SIGILL *.log
custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0
custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0
custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70
custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0
custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0
custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0
void __clear_cache (char *address, size_t size) {
static int cache_line_size = 0;
if (!cache_line_size)
cache_line_size = get_current_cpu_cache_line_size ();
for (int i = 0; i < size; i += cache_line_size)
flush_cache_line (address + i);
}
War story: Samsung Galaxy S7
$ grep SIGILL *.log
custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0
custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0
custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70
custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0
custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0
custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0
void __clear_cache (char *address, size_t size) {
static int cache_line_size = 0;
if (!cache_line_size)
cache_line_size = get_current_cpu_cache_line_size ();
for (int i = 0; i < size; i += cache_line_size)
flush_cache_line (address + i);
}
War story: Samsung Galaxy S7
$ grep SIGILL *.log
custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0
custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0
custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70
custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0
custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0
custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0
void __clear_cache (char *address, size_t size) {
static int cache_line_size = 0;
if (!cache_line_size)
cache_line_size = get_current_cpu_cache_line_size ();
for (int i = 0; i < size; i += cache_line_size)
flush_cache_line (address + i);
}
12 / 13
War story: Samsung Galaxy S7
$ grep SIGILL *.log
custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0
custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0
custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70
custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0
custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0
custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0
void __clear_cache (char *address, size_t size) {
static int cache_line_size = 0;
if (!cache_line_size)
cache_line_size = get_current_cpu_cache_line_size ();
for (int i = 0; i < size; i += cache_line_size)
flush_cache_line (address + i);
}
64byte buckets:
0x00-0x3f: always flushed
0x40-0x7f: only flushed when cacheline size is 64 byte.
0x80-0xbf: always flushed
0xc0-0xff: only flushed when cacheline size is 64 byte.
12 / 13
Thanks
Visit us
https://www.mono-project.com
Chat with us
https://gitter.im/mono/mono
Mail me
beurba@microsoft.com
foundation
13 / 13

Más contenido relacionado

Último

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 

Último (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 

Destacado

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Destacado (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Adventures with Mono Runtime on Mobile Platforms

  • 1. Adventures with Mono Runtime on Mobile Platforms .NET Stammtisch Linz Bernhard Urban beurba@microsoft.com https://www.xamarin.com https://www.mono-project.com July 23, 2019 foundation 1 / 13
  • 4. The Mono Runtime — Overview Execution modes 4 / 13
  • 5. The Mono Runtime — Overview Execution modes Just-In-Time compiler 4 / 13
  • 6. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler 4 / 13
  • 7. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT 4 / 13
  • 8. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT FullAOT 4 / 13
  • 9. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT FullAOT Interpreter 4 / 13
  • 10. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT FullAOT Interpreter Supported platforms 4 / 13
  • 11. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT FullAOT Interpreter Supported platforms Linux, macOS, Windows, *BSD, AIX, IBM i, . . . 4 / 13
  • 12. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT FullAOT Interpreter Supported platforms Linux, macOS, Windows, *BSD, AIX, IBM i, . . . iOS, tvOS, watchOS & Android 4 / 13
  • 13. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT FullAOT Interpreter Supported platforms Linux, macOS, Windows, *BSD, AIX, IBM i, . . . iOS, tvOS, watchOS & Android XBox, PlayStation, WiiU, . . . 4 / 13
  • 14. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT FullAOT Interpreter Supported platforms Linux, macOS, Windows, *BSD, AIX, IBM i, . . . iOS, tvOS, watchOS & Android XBox, PlayStation, WiiU, . . . amd64, x86, armv7, armv8, powerpc, s390x 4 / 13
  • 15. The Mono Runtime — Overview Execution modes Just-In-Time compiler Ahead-Of-Time compiler normal AOT FullAOT Interpreter Supported platforms Linux, macOS, Windows, *BSD, AIX, IBM i, . . . iOS, tvOS, watchOS & Android XBox, PlayStation, WiiU, . . . amd64, x86, armv7, armv8, powerpc, s390x WebAssembly 4 / 13
  • 16. Embedding the Mono Runtime Embedding Mono link Mono into your application 5 / 13
  • 17. Embedding the Mono Runtime Embedding Mono link Mono into your application allows execution of .NET, e.g. useful for scripting 5 / 13
  • 18. Embedding the Mono Runtime Embedding Mono link Mono into your application allows execution of .NET, e.g. useful for scripting Users 5 / 13
  • 19. Embedding the Mono Runtime Embedding Mono link Mono into your application allows execution of .NET, e.g. useful for scripting Users Game Studios 5 / 13
  • 20. Embedding the Mono Runtime Embedding Mono link Mono into your application allows execution of .NET, e.g. useful for scripting Users Game Studios Unity 5 / 13
  • 21. Embedding the Mono Runtime Embedding Mono link Mono into your application allows execution of .NET, e.g. useful for scripting Users Game Studios Unity Blazor: check out https://learn-blazor.com/ 5 / 13
  • 22. Embedding the Mono Runtime Embedding Mono link Mono into your application allows execution of .NET, e.g. useful for scripting Users Game Studios Unity Blazor: check out https://learn-blazor.com/ Xamarin.Android & Xamarin.iOS 5 / 13
  • 23. Platform & Device landscape iOS on iPhone/iPad. 6 / 13
  • 24. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. 6 / 13
  • 25. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. 6 / 13
  • 26. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. 6 / 13
  • 27. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. x86 64: JIT. 6 / 13
  • 29. FullAOT iOS does not allow JIT compilation 7 / 13
  • 30. FullAOT iOS does not allow JIT compilation Normal AOT uses JIT occasionally at runtime 7 / 13
  • 31. FullAOT iOS does not allow JIT compilation Normal AOT uses JIT occasionally at runtime All trampolines and wrappers must be included in the AOT image 7 / 13
  • 32. FullAOT iOS does not allow JIT compilation Normal AOT uses JIT occasionally at runtime All trampolines and wrappers must be included in the AOT image Side-effect: System.Reflection.Emit does not work 7 / 13
  • 34. What about generics? public T return_t<T> (T arg) { return arg; } 8 / 13
  • 35. What about generics? public T return_t<T> (T arg) { return arg; } // "Generic sharing for value types" public void return_t (T& ret, T& arg, ptr hidden_arg) { int size = rgctx_fetch (hidden_arg); memcpy (ret, arg, size); } 8 / 13
  • 36. What about generics? public T return_t<T> (T arg) { return arg; } // "Generic sharing for value types" public void return_t (T& ret, T& arg, ptr hidden_arg) { int size = rgctx_fetch (hidden_arg); memcpy (ret, arg, size); } int i = return_t<int> (5); 8 / 13
  • 37. What about generics? public T return_t<T> (T arg) { return arg; } // "Generic sharing for value types" public void return_t (T& ret, T& arg, ptr hidden_arg) { int size = rgctx_fetch (hidden_arg); memcpy (ret, arg, size); } int i = return_t<int> (5); // calling chain caller ⇒ callee 8 / 13
  • 38. What about generics? public T return_t<T> (T arg) { return arg; } // "Generic sharing for value types" public void return_t (T& ret, T& arg, ptr hidden_arg) { int size = rgctx_fetch (hidden_arg); memcpy (ret, arg, size); } int i = return_t<int> (5); // calling chain caller ⇒ gsharedvt_arg_trampoline ⇒ callee 8 / 13
  • 39. What about generics? public T return_t<T> (T arg) { return arg; } // "Generic sharing for value types" public void return_t (T& ret, T& arg, ptr hidden_arg) { int size = rgctx_fetch (hidden_arg); memcpy (ret, arg, size); } int i = return_t<int> (5); // calling chain caller ⇒ gsharedvt_arg_trampoline ⇒ gsharedvt_in_trampoline ⇒ callee 8 / 13
  • 40. System.Reflection.Emit? System.ExecutionEngineException: Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod () 9 / 13
  • 41. System.Reflection.Emit? System.ExecutionEngineException: Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod () 9 / 13
  • 42. System.Reflection.Emit? System.ExecutionEngineException: Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod () Runtime interpreter enables System.Reflection.Emit 9 / 13
  • 43. System.Reflection.Emit? System.ExecutionEngineException: Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod () Runtime interpreter enables System.Reflection.Emit Faster “inner dev loop” No need to run the AOT compiler Smaller app bundle size ⇒ faster deploy 9 / 13
  • 44. System.Reflection.Emit? System.ExecutionEngineException: Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod () Runtime interpreter enables System.Reflection.Emit Faster “inner dev loop” No need to run the AOT compiler Smaller app bundle size ⇒ faster deploy Best of both worlds: “Mixed Mode” with FullAOT 9 / 13
  • 45. System.Reflection.Emit? System.ExecutionEngineException: Attempting to JIT compile method MyClass:DynamicallyGeneratedMethod () Runtime interpreter enables System.Reflection.Emit Faster “inner dev loop” No need to run the AOT compiler Smaller app bundle size ⇒ faster deploy Best of both worlds: “Mixed Mode” with FullAOT Ships with upcoming release of Xamarin.iOS (Preview available) 9 / 13
  • 46. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. x86 64: JIT. tvOS on Apple TV. 10 / 13
  • 47. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. x86 64: JIT. tvOS on Apple TV. arm64: FullAOT and interpreter. 10 / 13
  • 48. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. x86 64: JIT. tvOS on Apple TV. arm64: FullAOT and interpreter. x86 64: JIT. 10 / 13
  • 49. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. x86 64: JIT. tvOS on Apple TV. arm64: FullAOT and interpreter. x86 64: JIT. watchOS on Apple Watch. 10 / 13
  • 50. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. x86 64: JIT. tvOS on Apple TV. arm64: FullAOT and interpreter. x86 64: JIT. watchOS on Apple Watch. armv7k: FullAOT and bitcode. 10 / 13
  • 51. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. x86 64: JIT. tvOS on Apple TV. arm64: FullAOT and interpreter. x86 64: JIT. watchOS on Apple Watch. armv7k: FullAOT and bitcode. arm64 32: interpreter (WIP) and bitcode. 10 / 13
  • 52. Platform & Device landscape iOS on iPhone/iPad. armv7: FullAOT. arm64: FullAOT and interpreter. x86: JIT. x86 64: JIT. tvOS on Apple TV. arm64: FullAOT and interpreter. x86 64: JIT. watchOS on Apple Watch. armv7k: FullAOT and bitcode. arm64 32: interpreter (WIP) and bitcode. x86: JIT. 10 / 13
  • 53. Xamarin.Android Simliar to Linux, except for interop between C# and Java Two Garbage collectors have to work together 11 / 13
  • 54. Xamarin.Android Simliar to Linux, except for interop between C# and Java Two Garbage collectors have to work together War story: Samsung Galaxy S7 11 / 13
  • 55. Xamarin.Android Simliar to Linux, except for interop between C# and Java Two Garbage collectors have to work together War story: Samsung Galaxy S7 First bug report: “Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error System.ExecutionEngineException SIGILL“. 11 / 13
  • 56. Xamarin.Android Simliar to Linux, except for interop between C# and Java Two Garbage collectors have to work together War story: Samsung Galaxy S7 First bug report: “Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error System.ExecutionEngineException SIGILL“. Co-worker in the US got the device. 11 / 13
  • 57. Xamarin.Android Simliar to Linux, except for interop between C# and Java Two Garbage collectors have to work together War story: Samsung Galaxy S7 First bug report: “Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error System.ExecutionEngineException SIGILL“. Co-worker in the US got the device. He could not reproduce it. 11 / 13
  • 58. Xamarin.Android Simliar to Linux, except for interop between C# and Java Two Garbage collectors have to work together War story: Samsung Galaxy S7 First bug report: “Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error System.ExecutionEngineException SIGILL“. Co-worker in the US got the device. He could not reproduce it. US edition: Ships with Snapdragon 820. 11 / 13
  • 59. Xamarin.Android Simliar to Linux, except for interop between C# and Java Two Garbage collectors have to work together War story: Samsung Galaxy S7 First bug report: “Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error System.ExecutionEngineException SIGILL“. Co-worker in the US got the device. He could not reproduce it. US edition: Ships with Snapdragon 820. World edition: Ships with Exynos 8890. 11 / 13
  • 60. Xamarin.Android Simliar to Linux, except for interop between C# and Java Two Garbage collectors have to work together War story: Samsung Galaxy S7 First bug report: “Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error System.ExecutionEngineException SIGILL“. Co-worker in the US got the device. He could not reproduce it. US edition: Ships with Snapdragon 820. World edition: Ships with Exynos 8890. Could reproduce it with Xamarin Test Cloud. 11 / 13
  • 61. War story: Samsung Galaxy S7 $ grep SIGILL *.log custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0 custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0 custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70 custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0 custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0 custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0 12 / 13
  • 62. War story: Samsung Galaxy S7 $ grep SIGILL *.log custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0 custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0 custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70 custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0 custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0 custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0 void __clear_cache (char *address, size_t size) { static int cache_line_size = 0; if (!cache_line_size) cache_line_size = get_current_cpu_cache_line_size (); for (int i = 0; i < size; i += cache_line_size) flush_cache_line (address + i); }
  • 63. War story: Samsung Galaxy S7 $ grep SIGILL *.log custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0 custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0 custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70 custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0 custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0 custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0 void __clear_cache (char *address, size_t size) { static int cache_line_size = 0; if (!cache_line_size) cache_line_size = get_current_cpu_cache_line_size (); for (int i = 0; i < size; i += cache_line_size) flush_cache_line (address + i); }
  • 64. War story: Samsung Galaxy S7 $ grep SIGILL *.log custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0 custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0 custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70 custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0 custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0 custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0 void __clear_cache (char *address, size_t size) { static int cache_line_size = 0; if (!cache_line_size) cache_line_size = get_current_cpu_cache_line_size (); for (int i = 0; i < size; i += cache_line_size) flush_cache_line (address + i); } 12 / 13
  • 65. War story: Samsung Galaxy S7 $ grep SIGILL *.log custom_01.log:E/mono (13964): SIGILL at ip=0x0000007f4f15e8d0 custom_02.log:E/mono (13088): SIGILL at ip=0x0000007f8ff76cc0 custom_03.log:E/mono (12824): SIGILL at ip=0x0000007f68e93c70 custom_04.log:E/mono (12876): SIGILL at ip=0x0000007f4b3d55f0 custom_05.log:E/mono (13008): SIGILL at ip=0x0000007f8df1e8d0 custom_06.log:E/mono (14093): SIGILL at ip=0x0000007f6c21edf0 void __clear_cache (char *address, size_t size) { static int cache_line_size = 0; if (!cache_line_size) cache_line_size = get_current_cpu_cache_line_size (); for (int i = 0; i < size; i += cache_line_size) flush_cache_line (address + i); } 64byte buckets: 0x00-0x3f: always flushed 0x40-0x7f: only flushed when cacheline size is 64 byte. 0x80-0xbf: always flushed 0xc0-0xff: only flushed when cacheline size is 64 byte. 12 / 13
  • 66. Thanks Visit us https://www.mono-project.com Chat with us https://gitter.im/mono/mono Mail me beurba@microsoft.com foundation 13 / 13