eclipse omr: a modern toolkit for building language runtimes
TRANSCRIPT
![Page 1: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/1.jpg)
EclipseOMR
AModernToolkitforBuildingLanguageRun:mes
MarkStoodleyOMRProjectTechnicalLead
![Page 2: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/2.jpg)
About me
• Mark Stoodley [email protected] @mstoodle
• Senior software developer in Toronto, Canada working for IBM Runtime Technologies
• Spent the last 14 years building JIT compilers in JVMs
• OMR Project Technical Lead
2
![Page 3: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/3.jpg)
hBp://www.eclipse.org/omrhBps://github.com/eclipse/omr
InteractwithteamviamailinglistorGitHubIssues([email protected])
DualLicense:
EclipsePublicLicenseV1.0Apache2.0
Contributors:pleasesignEclipseCLAJ!hBp://www.eclipse.org/legal/CLA.php
EclipseOMRisLive!!
3
![Page 4: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/4.jpg)
4
• Ini:alcontribu:onfromIBMonMarch7isabout200KLOC• Projectteamisveryexcitedtobemovingforwardintheopen!
![Page 5: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/5.jpg)
OMRis…
5
![Page 6: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/6.jpg)
OMRis…
forBuildingLanguageRun:mes
6
![Page 7: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/7.jpg)
OMRis…
forBuildingLanguageRun:mes
7
![Page 8: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/8.jpg)
OMRis…
AModernToolkitforBuildingLanguageRun:mes
8
![Page 9: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/9.jpg)
Whatdoes
BuildingLanguageRun-mes
mean?
9
![Page 10: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/10.jpg)
Java Execution Environment
What’sinaLanguageRun:meforJava?
JavaPlaaormAbstrac:on Layer
JavaGarbage Collector
JavaDiagnos:cServices
Source Code Bytecode/AST Compiler
10
JavaJust-In-TimeCompiler
Interpreter Java
SourceJava
BytecodeCompiler
JavaBytecodeInterpreter
![Page 11: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/11.jpg)
Ruby Execution Environment
What’sinaLanguageRun:meforRuby?
RubyPlaaormAbstrac:on Layer
RubyGarbage Collector
RubyDiagnos:cServices
Source Code Bytecode/AST Compiler
11
RubyJust-In-TimeCompiler
Interpreter RubySource
RubyBytecodeCompiler
RubyBytecodeInterpreter
![Page 12: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/12.jpg)
Python Execution Environment
What’sinaLanguageRun:meforPython?
PythonPlaaormAbstrac:on Layer
PythonGarbage Collector
PythonDiagnos:cServices
Source Code Bytecode/AST Compiler
12
PythonJust-In-TimeCompiler
Interpreter PythonSource
PythonBytecodeCompiler
PythonBytecodeInterpreter
![Page 13: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/13.jpg)
• Investment in one runtime has no leverage in other runtimes
• Cloud => many languages => expensive to advance platform
But all language runtimes are completely different implementations
13
![Page 14: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/14.jpg)
Java Execution Environment
OMRstartedfromIBMJ9Java…
J9JavaPlaaormAbstrac:on Layer
J9JavaGarbage Collector
J9JavaDiagnos:cServices
Source Code Bytecode/AST Compiler
14
J9JavaJust-In-TimeCompiler
Interpreter Java
SourceJ9JavaBytecodeCompiler
J9JavaBytecodeInterpreter
![Page 15: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/15.jpg)
J9Java
JITCompilerGlue
J9 Java Execution Environment
Byconcentra:ng“Java”nessintoa“glue”layerforeachcorecomponent
OMRPlaaormAbstrac:on Layer
OMRGarbage Collector
OMRDiagnos:cServices
Source Code Bytecode/AST Compiler
15
Interpreter Java
SourceJ9JavaBytecodeCompiler
J9JavaBytecodeInterpreter
J9JavaDiagnos:cGlue
J9JavaGCGlue
OMRJustinTime
(JIT)Compiler
![Page 16: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/16.jpg)
1. OMRhasnolanguageseman:cs2. OMRisnotalanguagerun:me3. OMRcanbecomepartofanylanguagerun:me
16
![Page 17: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/17.jpg)
…toolkitdoesn’tseemquiteright…
17
![Page 18: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/18.jpg)
…toolkitnotquiteright…
OMRprovidesHighQualityLanguageRun:me
Ingredients
18
![Page 19: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/19.jpg)
IngredientsNowAvailable!port plaaormabstrac:on(por:ng)librarythread crossplaaormpthread-likethreadinglibrarygc garbagecollec:onframeworkformanagedheapsvm APIstomanageper-interpreterandper-threadcontextsomrtrace tracinglibraryforcommunica:onwithIBMHealthCenter
monitoringtoolsomrsigcompat signalhandlingcompa:bilitylibraryexample demonstra:oncodetoshowhowalanguagerun:memight
consumesomeOMRcomponents,alsousedfortes:ngfvtest alanguageindependenttestframeworksothatOMR
componentscanbetestedoutsideofalanguagerun:me+afewothers…aliBlelessthan200KLOCatthispoint
19
![Page 20: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/20.jpg)
Moreingredientscomingsoon!diag: morediagnos:csupportforrun:mestoaidrun:me
developersandusershcagentcore: coreIBMHealthCenteragentcodetoconnectwitha
run:megc: addinggenera:onalandotherpolicies/technologiesjit: JustInTimecompilerandna:vecodegenera:ontoolsdocs: <gasp>weneedmoreoverviewdocumenta:ontests: moreteststoensurehighqualitycontribu:ons
20
![Page 21: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/21.jpg)
Howdoyoutest
languagerun:mecomponents
withnolanguageseman:cs?
21
![Page 22: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/22.jpg)
Mockitup!• fvtestdirectory
– LeveragesGoogletestunittestframework– Componenttestsfor:
• Port,gc,signals,threads,vmfork,trace,agents• U:li:esanddatastructures,methoddic:onary• etc.
• “maketest”formsthebasisforhighqualitycontribu:ons– Contribu:onscannotcausenewfailuresin“maketest”
22
![Page 23: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/23.jpg)
Canitreallywork?
Weaskedourselvesthesameques:on…
23
![Page 24: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/24.jpg)
Soweputittothetest!
Ruby+OMRPython+OMR
SOM++(Smalltalk)+OMR
…alsousedinIBMSDKforJava8…andconsumeddailyaswebuildthenextIBMSDKforJava
Goal:testdriveintegra:onintoexis:ngrun:mecommuni:es
COMPATIBILITYiscri:cal
24
![Page 25: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/25.jpg)
Ruby+OMRTechnologyPreview
• WeportedOMRintoCRuby– Focusoneasyintegra:onandcompa:bility– AllCextensionsworkas-is– ItrunsRails!
• PresentedatRubyKaigi2015,FOSDEM&jFokus2016
• Availableongithub:– Downloaddockerimagesfor64-bitX86,OpenPOWER,andLinuxONE@hBps://goo.gl/P3yXuy
25
![Page 26: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/26.jpg)
Diagnos:cTooling
26
![Page 27: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/27.jpg)
HealthCenter
• Providesaliveviewofrun:medetails• WorkswithIBMJDK,IBMNode.js,andRuby+OMRTechnologyPreview
• hBp://goo.gl/u3VITI
27
![Page 28: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/28.jpg)
Health Center – CRuby Method Profiling
28
![Page 29: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/29.jpg)
Health Center – OMR GC Statistics from CRuby
29
![Page 30: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/30.jpg)
GarbageCollec:onandMemoryVisualizer
30
• ProvidesagraphicaldetailsonGCeventspostmortemfromverbose:gclogs
• WorkswithIBMJDK,IBMNode.jsandRuby+OMRTechnologyPreview
• hBps://goo.gl/YwNrmI
![Page 31: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/31.jpg)
GarbageCollec:onandMemoryVisualizer
31
![Page 32: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/32.jpg)
Performance
Upto2.5XfasteronsomebenchmarkswithRuby+OMRJIT!
32
![Page 33: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/33.jpg)
112.84122.57
0
20
40
60
80
100
120
140
Ruby2.2.2 Ruby2.2.2+OMR
IsRubyFastYet?
33
![Page 34: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/34.jpg)
28.4
17.2
5.5
1.10
5
10
15
20
25
30
Ruby2.2.2 Ruby2.2.2+OMR Ruby2.2.2+OMR+JIT OMRIlBuilder
Pow(2,N)
34
Time(secon
ds)
![Page 35: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/35.jpg)
• Weknowitworks;wetriedit!
• IBMJavaSDKwillcon:nuetoconsumeOMRtechnologyandworkdirectlyinopenOMRproject
• Projectisopentoall;wewelcomeothers– Newcontributors!– Newplaaorms!– Newlanguages!– Newtoolinterfaces!– Newtechnologytohelpbuildrun:mes!
35
![Page 36: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/36.jpg)
WrapUp• EclipseOMR:highqualitylanguagerun:mecomponents
1. hasnolanguageseman:cs2. isnotalanguagerun:me3. canbecomepartofanylanguagerun:me
• WeareliveatEclipseasanincubator!– hBp://www.eclipse.org/omr– hBps://github.com/eclipse/omr– [email protected]– ContactusviamailinglistorGItHubissues
• DualEclipse1.0+Apache2.0license
• Wewouldlovetoseeyouallthere!36
![Page 37: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/37.jpg)
• Almost no one starts a new project saying: – First, I’ll write the firmware from scratch … – First, I’ll write the file system from scratch … – First, I’ll write the display drivers from scratch …
• We would like to make these statements just as unlikely: – First, I’ll write the cross platform port library from scratch … – First, I’ll write a garbage collector technology from scratch … – First, I’ll write the JIT compiler technology from scratch …
37
APar:ngThought
![Page 38: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/38.jpg)
• Almost no one starts a new project saying: – First, I’ll write the firmware from scratch … – First, I’ll write the file system from scratch … – First, I’ll write the display drivers from scratch …
• We would like to make these statements just as unlikely: – First, I’ll write the cross platform port library from scratch … – First, I’ll write the garbage collector from scratch … – First, I’ll write the JIT compiler from scratch …
38
APar:ngThought
![Page 39: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/39.jpg)
BoFsessiontonightat7pminLakeAnneA
Na:vecodegenera:onfordynamiclanguages
LearnabitmoreabouttheOMRJITanditsna:vecodegenera:onservices
39
![Page 40: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/40.jpg)
LearnmoreaboutOMR!• AVMisaVMisaVM:TheSecretPathtoHighPerformanceMul:LanguageRun:mes(MarkStoodley,JVM
LanguagesSummit2015)hBps://www.youtube.com/watch?v=kOnyJurioyw
• BeyondtheCoffeeCup:LeveragingJavaRun:meTechnologiesforthePolyglot(DarylMaier,JavaOne2015)hBp://www.slideshare.net/0xdaryl/javaone-2015-con7547-beyond-the-coffee-cup-leveraging-java-run:me-technologies-for-polyglot
• What’sinanObject?JavaGarbageCollec:onforthePolyglot(CharlieGracie,JavaOne2015)hBp://www.slideshare.net/charliegracie1/javaone-whats-in-an-object
• BuildingYourOwnLanguageRun:me(AngelaLin,RobertYoung,CraigLehmann,XiaoliLiang,CASCON2015)hBps://ibm.box.com/s/7xdg25we2ezmdjjbqdys30d7dl1iyo49
• It’sDangeroustoGCalone.Takethis!(RobertYoungandCraigLehmann,RubyKaigi2015)hBp://www.slideshare.net/craiglehmann/the-omr-gc-talk-ruby-kaigi-2015
• ExperimentsinsharingJavaVMTechnologywithCRuby(MaBhewGaudet,RubyKaigi2015) hBp://www.slideshare.net/MaBhewGaudet/experiments-in-sharing-java-vm-technology-with-cruby
• RubyandOMR:Experimentsinu:lizingOMRtechnologiesinRuby(MRI)(CharlieGracie,FOSDEM2016)hBp://www.slideshare.net/CharlieGracie/ruby-and-omr
• AJVMsJourneyintoPolyglotRun:mes(CharlieGracie,jFokus2016)hBps://t.co/efCKf6aCB4
• OMR:Amoderntoolkitforbuildinglanguagerun:mes(MarkStoodley,EclipseConMarch2016)[You’rereadingitrightnow!]
• Ruby+OMRTechnologyPreviewgithubprojectwithdockerimagesforLinuxonLinuxONE,OpenPOWER,andX86hBps://github.com/rubyomr-preview/rubyomr-preview
• Contact:– MarkStoodley([email protected],@mstoodle) OMRProjectTechnicalLead
40
![Page 41: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/41.jpg)
Trademarks,Copyrights,Disclaimers
IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion.
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of other IBM trademarks is available on the web at "Copyright and trademark information" at http://www.ibm.com/legal/copytrade.shtml Other company, product, or service names may be trademarks or service marks of others. THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN ADDITION, THIS INFORMATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM WITHOUT NOTICE. IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, NOR SHALL HAVE THE EFFECT OF, CREATING ANY WARRANTIES OR REPRESENTATIONS FROM IBM (OR ITS SUPPLIERS OR LICENSORS), OR ALTERING THE TERMS AND CONDITIONS OF ANY AGREEMENT OR LICENSE GOVERNING THE USE OF IBM PRODUCTS OR SOFTWARE. © Copyright International Business Machines Corporation 2016. All rights reserved.
41
![Page 42: Eclipse OMR: a modern toolkit for building language runtimes](https://reader034.vdocument.in/reader034/viewer/2022042723/58f26c1a1a28abe7698b458d/html5/thumbnails/42.jpg)
Addi:onalImportantDisclaimers• THEINFORMATIONCONTAINEDINTHISPRESENTATIONISPROVIDEDFORINFORMATIONAL
PURPOSESONLY.• WHILSTEFFORTSWEREMADETOVERIFYTHECOMPLETENESSANDACCURACYOFTHE
INFORMATIONCONTAINEDINTHISPRESENTATION,ITISPROVIDED“ASIS”,WITHOUTWARRANTYOFANYKIND,EXPRESSORIMPLIED.
• ALLPERFORMANCEDATAINCLUDEDINTHISPRESENTATIONHAVEBEENGATHEREDINACONTROLLEDENVIRONMENT.YOUROWNTESTRESULTSMAYVARYBASEDONHARDWARE,SOFTWAREORINFRASTRUCTUREDIFFERENCES.
• ALLDATAINCLUDEDINTHISPRESENTATIONAREMEANTTOBEUSEDONLYASAGUIDE.• INADDITION,THEINFORMATIONCONTAINEDINTHISPRESENTATIONISBASEDONIBM’SCURRENT
PRODUCTPLANSANDSTRATEGY,WHICHARESUBJECTTOCHANGEBYIBM,WITHOUTNOTICE.• IBMANDITSAFFILIATEDCOMPANIESSHALLNOTBERESPONSIBLEFORANYDAMAGESARISING
OUTOFTHEUSEOF,OROTHERWISERELATEDTO,THISPRESENTATIONORANYOTHERDOCUMENTATION.
• NOTHINGCONTAINEDINTHISPRESENTATIONISINTENDEDTO,ORSHALLHAVETHEEFFECTOF:• -CREATINGANYWARRANTORREPRESENTATIONFROMIBM,ITSAFFILIATEDCOMPANIESORITS
ORTHEIRSUPPLIERSAND/ORLICENSORS
42