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 proceedingspeer-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 mech- anism to provide services such as stop-the-world garbage collec- tion, debugging, and modification to running code such as installing or replacing classes. Languages implemented on these virtual ma- chines 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 run- ning on a virtual machine. We describe an API for using safepoints in languages that were implemented under the Truffle language im- plementation 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 re- spect to peak performance and statistically insignificant overhead with respect to compilation time. We compare this to other tech- niques that could be used to implement the same functionality and demonstrate the large overhead that they incur.
Original languageEnglish
Title of host publicationProceeding 10th Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems Workshop
PublisherACM New York
Number of pages10
ISBN (Print)978-1-4503-3657-4
Publication statusPublished - 2015

Fields of science

  • 102 Computer Sciences
  • 102009 Computer simulation
  • 102011 Formal languages
  • 102013 Human-computer interaction
  • 102022 Software development
  • 102024 Usability research
  • 102029 Practical computer science

JKU Focus areas

  • Computation in Informatics and Mathematics
  • Engineering and Natural Sciences (in general)

Cite this