DualStack

Autor: Gilles Roussel, Jerome Pilliet, Rémi Forax
Rok vydání: 2015
Předmět:
Zdroj: JTRES
DOI: 10.1145/2822304.2822310
Popis: To improve and simplify the implementation of dynamically typed languages on top of the Java virtual machine, Java 7 introduced a new instructions set as well as a new API specified by the JSR 292 [2]. Android, the Google operating system for embedded devices, uses for its applicative part a Java-based virtual machine called Dalvik. Android 292 is our implementation of the JSR 292 on top of Dalvik which uses a C interpreter for direct method handles and a Java flexible interpreter for the "combiner" method handles. The implementation presented in [7] is slowed down by several allocations done by the C interpreter and the combiner interpreter.This paper describes how we minimize the allocation done by our implementation of the JSR 292 on Android. First we explain how we avoid allocations from the C interpreter using a stack frame allocation (fake stack frame). Then we detail how we handle allocations from the combiner interpreter using a stack object (dual stack) allocated in the heap and avoid allocations done by the continuation mechanism.At the end, we present a comparison of the execution time with and without the allocation minimization. Even though the invoke-dynamic instruction with the dual stack implementation is slowed down by doing a fair amount of computations, the comparison shows that the dual stack implementation greatly improves the execution time.
Databáze: OpenAIRE