Efficient dynamic analysis for node.Js

Haiyang Sun, Christian Humer, Daniele Bonetta, Walter Binder

Research output: Chapter in Book / Report / Conference proceedingConference contributionAcademicpeer-review

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 languageEnglish
Title of host publicationCC 2018 - Proceedings of the 27th International Conference on Compiler Construction, Co-located with CGO 2018
EditorsJ. Xue, C. Dubach
PublisherAssociation for Computing Machinery, Inc
Pages196-206
ISBN (Electronic)9781450356442
DOIs
Publication statusPublished - 24 Feb 2018
Externally publishedYes
Event27th International Conference on Compiler Construction, CC 2018 - Vienna, Austria
Duration: 24 Feb 201825 Feb 2018

Conference

Conference27th International Conference on Compiler Construction, CC 2018
Country/TerritoryAustria
CityVienna
Period24/02/1825/02/18

Fingerprint

Dive into the research topics of 'Efficient dynamic analysis for node.Js'. Together they form a unique fingerprint.

Cite this