Efficient dynamic analysis for Node.js

Efficient dynamic analysis for Node.js
复制标题

DOI:
10.1145/3178372.3179527
复制
发表时间:
2018-02
期刊:
Proceedings of the 27th International Conference on Compiler Construction
影响因子:
--
通讯作者:
Haiyang Sun;Daniele Bonetta;Christian Humer;Walter Binder
Haiyang Sun;Daniele Bonetta;Christian Humer;Walter Binder
中科院分区:
其他
文献类型:
--
作者:
Haiyang Sun;Daniele Bonetta;Christian Humer;Walter Binder

文献摘要

被引文献

相似文献

由于Node.js的流行,迫切需要针对Node.js的动态程序分析工具,帮助开发人员发现bug、性能瓶颈和不良编码实践。基于代码级检测的框架使动态分析接近于程序语义,并且比Node.js内置的分析工具更灵活。然而,现有的JavaScript代码级插装框架在插装Node.js内置模块库方面存在巨大的开销和困难。在本文中,我们介绍了一个新的JavaScript和Node.js动态分析框架NodeProf。在提供与代码级检测框架类似的灵活性的同时,NodeProf显著提高了分析性能,同时确保了全面的代码覆盖。NodeProf支持运行时(取消)激活分析,并且在没有活动分析时不会产生任何开销。NodeProf基于JavaScript运行时的动态检测,并利用自动部分求值来生成高效的机器码。此外,NodeProf利用了运行时提供的语言互操作性,因此允许用Java和JavaScript编写动态分析,并与Jalangi(最先进的代码级JavaScript工具框架)兼容。我们的实验表明,使用NodeProf运行相同动态分析的峰值性能可以比Jalangi快三个数量级。
Due to its popularity, there is an urgent need for dynamic program-analysis tools for Node.js, helping developers find bugs, performance bottlenecks, and bad coding practices. Frameworks based on code-level instrumentation enable dynamic analyses close to program semantics and are more flexible than Node.js built-in profiling tools. However, existing code-level instrumentation frameworks for JavaScript suffer from enormous overheads and difficulties in instrumenting the built-in module library of Node.js. In this paper, we introduce a new dynamic analysis framework for JavaScript and Node.js called NodeProf. While offering similar flexibility as code-level instrumentation frameworks, NodeProf significantly improves analysis performance while ensuring comprehensive code coverage. NodeProf supports runtime (de)activation of analyses and incurs zero overhead when no analysis is active. NodeProf is based on dynamic instrumentation of the JavaScript runtime and leverages automatic partial evaluation to generate efficient machine code. In addition, NodeProf makes use of the language interoperability provided by the runtime and thus allows dynamic analyses to be written in Java and JavaScript with compatibility to Jalangi, a state-of-the-art code-level JavaScript instrumentation framework. Our experiments show that the peak performance of running the same dynamic analyses using NodeProf can be up to three orders of magnitude faster than Jalangi.