JShrink: in-depth investigation into debloating modern Java applications

JShrink: in-depth investigation into debloating modern Java applications
复制标题

DOI:
10.1145/3368089.3409738
复制
发表时间:
2020-11
期刊:
Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering
影响因子:
--
通讯作者:
Bobby R. Bruce;Tianyi Zhang;Jaspreet Arora;G. Xu;Miryung Kim
Bobby R. Bruce;Tianyi Zhang;Jaspreet Arora;G. Xu;Miryung Kim
中科院分区:
其他
文献类型:
--
作者:
Bobby R. Bruce;Tianyi Zhang;Jaspreet Arora;G. Xu;Miryung Kim

文献摘要

被引文献

相似文献

现代软件是臃肿的。对新功能的需求导致开发人员包含越来越多的功能,其中许多功能随着软件的发展而变得不需要或不使用。这种现象被称为软件膨胀,导致软件消耗更多的资源。如何有效、自动地对软件进行解loat是软件工程中一个长期存在的问题。自20世纪90年代后期以来,已经提出了各种去浮技术。然而,这些技术中的许多技术都是建立在纯静态分析的基础上的,并且还没有在动态语言特性流行的现代Java应用程序的上下文中进行扩展和评估。为此,我们开发了一个端到端的字节码debloating框架称为JShrink。它通过动态分析和类型依赖分析增强了传统的静态可达性分析,并更新了现有的字节码转换,以适应现代Java中的新语言功能。我们强调了几个微妙的技术挑战,必须妥善处理,并通过回归测试检查行为保存的debloated软件。我们发现(1)JShrink能够将我们真实世界的Java基准测试套件的性能降低高达47%(平均14%);(2)考虑动态语言特性对于确保行为保持确实至关重要-减少了98%的纯静态等价物Jax和84%的ProGuard的测试失败;(3)与纯动态方法相比,静态分析与动态剖析相结合使被拆除的软件对看不见的测试执行更健壮-在26个项目中的22个中,被拆除的软件在新的测试下成功运行。
Modern software is bloated. Demand for new functionality has led developers to include more and more features, many of which become unneeded or unused as software evolves. This phenomenon, known as software bloat, results in software consuming more resources than it otherwise needs to. How to effectively and automatically debloat software is a long-standing problem in software engineering. Various debloating techniques have been proposed since the late 1990s. However, many of these techniques are built upon pure static analysis and have yet to be extended and evaluated in the context of modern Java applications where dynamic language features are prevalent. To this end, we develop an end-to-end bytecode debloating framework called JShrink. It augments traditional static reachability analysis with dynamic profiling and type dependency analysis and renovates existing bytecode transformations to account for new language features in modern Java. We highlight several nuanced technical challenges that must be handled properly and examine behavior preservation of debloated software via regression testing. We find that (1) JShrink is able to debloat our real-world Java benchmark suite by up to 47% (14% on average); (2) accounting for dynamic language features is indeed crucial to ensure behavior preservation---reducing 98% of test failures incurred by a purely static equivalent, Jax, and 84% for ProGuard; and (3) compared with purely dynamic approaches, integrating static analysis with dynamic profiling makes the debloated software more robust to unseen test executions---in 22 out of 26 projects, the debloated software ran successfully under new tests.