Techniques and applications for guest-language safepoints

Benoit Daloze, Chris Seaton, Daniele Bonetta, Hanspeter Mössenböck

Research output: Chapter in Book / Report / Conference proceedingConference contributionAcademicpeer-review

Abstract

Safepoints are a virtual machine mechanism that allows one thread to suspend other threads in a known state so that runtime actions can be performed without interruption and with data structures in a consistent state. Many virtual machines use safepoints as a mechanism to provide services such as stop-the-world garbage collection, debugging, and modification to running code such as installing or replacing classes. Languages implemented on these virtual machines may have access to these services, but not directly to the safepoint mechanism itself. We show that safepoints have many useful applications for the implementation of guest languages running on a virtual machine. We describe an API for using safepoints in languages that were implemented under the Truffle language implementation framework on the Java Virtual Machine and show several applications of the API to implement useful guest-language functionality. We present an efficient implementation of this API, when running in combination with the Graal dynamic compiler.We also demonstrate that our safepoints cause zero overhead with respect to peak performance and statistically insignificant overhead with respect to compilation time. We compare this to other techniques that could be used to implement the same functionality and demonstrate the large overhead that they incur.
Original languageEnglish
Title of host publicationProceedings of the 10th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems, ICOOOLPS 2015
PublisherAssociation for Computing Machinery, Inc
ISBN (Electronic)9781450336574
DOIs
Publication statusPublished - 4 Jul 2015
Externally publishedYes
Event10th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems, ICOOOLPS 2015 - Prague, Czech Republic
Duration: 4 Jul 201510 Jul 2015

Conference

Conference10th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems, ICOOOLPS 2015
Country/TerritoryCzech Republic
CityPrague
Period4/07/1510/07/15

Fingerprint

Dive into the research topics of 'Techniques and applications for guest-language safepoints'. Together they form a unique fingerprint.

Cite this