"Slimming" a Java virtual machine by way of cold code removal and optimistic partial program loading

"Slimming" a Java virtual machine by way of cold code removal and optimistic partial program loading
复制标题

通过冷代码去除和乐观部分程序加载的方式“瘦身”Java虚拟机

DOI:
10.1016/j.scico.2010.04.008
复制
发表时间:
2011
期刊:
Sci. Comput. Program.
影响因子:
--
通讯作者:
M. Franz
M. Franz
中科院分区:
--
文献类型:
--
作者:
Gregor Wagner;A. Gal;M. Franz

文献摘要

被引文献

相似文献

嵌入式系统提供的存储容量有限。此限制与现代虚拟机平台的需求相冲突,现代虚拟机平台要求每个客户端设备上存在大量库代码。这些相互冲突的要求通常可以通过提供标准库的专门嵌入式版本来解决,但即使这些精简的库也会消耗大量资源。我们提出了一种基于零足迹客户端范例的“始终连接”移动设备的解决方案。在我们的方法中,所有代码都驻留在远程服务器上。仅将可能需要的应用程序和库的部分传输到移动客户端设备。由于很难静态预测运行时需要哪些库部分,因此我们将静态分析、机会性脱靶链接和延迟代码加载结合起来,提前传输很有可能执行的代码,而其他代码(例如异常代码)保留在服务器上,仅按需传输。这使我们不仅可以执行死代码消除,还可以积极消除未使用的代码。我们的方法的粒度是灵活的,从类文件一直到单个基本块。我们的方法使总代码大小减少了高达 95%。
Embedded systems provide limited storage capacity. This limitation conflicts with the demands of modern virtual machine platforms, which require large amounts of library code to be present on each client device. These conflicting requirements are often resolved by providing specialized embedded versions of the standard libraries, but even these stripped down libraries consume significant resources. We present a solution for “always connected” mobile devices based on a zero footprint client paradigm. In our approach, all code resides on a remote server. Only those parts of applications and libraries that are likely to be needed are transferred to the mobile client device. Since it is difficult to predict statically which library parts will be needed at run time, we combine static analysis, opportunistic off-target linking and lazy code loading to transfer code with a high likelihood of execution ahead of time while the other code, such as exception code, remains on the server and is transferred only on demand. This allows us to perform not only dead code elimination, but also aggressive elimination of unused code. The granularity of our approach is flexible from class files all the way down to individual basic blocks. Our method achieves total code size reductions of up to 95%.