Abstract
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.
Original language | English |
---|---|
Title of host publication | CC 2018 - Proceedings of the 27th International Conference on Compiler Construction, Co-located with CGO 2018 |
Editors | J. Xue, C. Dubach |
Publisher | Association for Computing Machinery, Inc |
Pages | 196-206 |
ISBN (Electronic) | 9781450356442 |
DOIs | |
Publication status | Published - 24 Feb 2018 |
Externally published | Yes |
Event | 27th International Conference on Compiler Construction, CC 2018 - Vienna, Austria Duration: 24 Feb 2018 → 25 Feb 2018 |
Conference
Conference | 27th International Conference on Compiler Construction, CC 2018 |
---|---|
Country/Territory | Austria |
City | Vienna |
Period | 24/02/18 → 25/02/18 |