https://scholars.lib.ntu.edu.tw/handle/123456789/487849
標題: | Ahead-of-Time Compilation of Stack-Based JVM Bytecode on Resource-Constrained Devices. | 作者: | Reijers, Niels CHI-SHENG SHIH |
公開日期: | 2017 | 起(迄)頁: | 84-95 | 來源出版物: | Proceedings of the 2017 International Conference on Embedded Wireless Systems and Networks, EWSN 2017, Uppsala, Sweden, February 20-22, 2017 | 摘要: | Many virtual machines have been developed for tiny devices with only a few KB of RAM and tens to a few hundred KB of flash memory. They pack an impressive set of features in a very limited space, but suffer from a large performance penalty: a slowdown of one to two orders of magnitude compared to optimised native code is typical for most VMs, reducing throughput and increasing power consumption. Compiling the VM’s bytecode to native code to improve performance has been studied extensively for larger devices, but has not received much attention in the context of sensor networks, where the restricted resources mean most modern techniques cannot be applied. Simply replacing each VM instruction with a predefined sequence of native instructions is known to improve performance, but there is still a large gap to native C performance and the trade off is that the resulting code is several times larger than the compiled C equivalent, limiting the amount of code that can be loaded onto a device. This paper presents techniques to mitigate this code size overhead, making translation to native code a more attractive option, and to further improve performance. We start by analysing the overhead resulting from the basic approach using a set of benchmarks with different characteristics: sort, binary search, fft, rc5, xxtea and md5. We identify three distinct sources of overhead, two of which are related to the JVM’s stack-based architecture, and propose a set of optimisations to target each of them. Combined these optimisations reduce code size overhead by 59%. While they do increase the size of the VM, the break even point at which this fixed cost is compensated for is well within the range of memory typically available on a sensor device, allowing us to load more code on a device. Performance overhead is reduced by 79%, resulting in an average performance that is only 68% slower than optimised C. © 2017 is held by the authors. |
URI: | https://scholars.lib.ntu.edu.tw/handle/123456789/487849 https://www.scopus.com/inward/record.uri?eid=2-s2.0-85061718572&partnerID=40&md5=40234270302b9670ce7cfd95f25d7211 |
顯示於: | 資訊工程學系 |
在 IR 系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。