Faculty of Informatics – Università della Svizzera italiana (USI)

NodeProf


NodeProf is an instrumentation and profiling framework for Graal.js

NodeProf extends the Truffle instrumentation framework and supports the same event set as Jalangi, a source-code instrumentation framework for JavaScript. NodeProf provides two programming models, i.e., 1) a JavaScript model which is compatible with existing Jalangi analyses in JavaScript, allowing developers to write new analyses directly in JavaScript, and 2) a Java API which can directly apply optimizations at the abstract syntax tree (AST) level (e.g., node specialization, node caching, and Graal compiler directives) and thus further benefits from the partial evaluation of the Graal compiler. With both APIs, our analyses can run up to three orders of magnitude faster than Jalangi. Moreover, the instrumentation can be dynamically switched on and off. Because of these new features, NodeProf enables many new dynamic analyses that are impossible to perform with other existing tools. NodeProf supports the latest ECMAScript features (such as endExpression, async/await, return, and for-loop).


Downloads


NodeProf is an open-source project hosted on GitHub.


Key Publications


[1] Haiyang Sun, Daniele Bonetta, Christian Humer, Walter Binder: Efficient Dynamic Analysis for Node.js. CC 2018: 196-206 [pdf][presentation at VMM’20 (video)]