JITProf: pinpointing JIT-unfriendly JavaScript code
Authors:
Open Access
- 30 August 2015
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 357-368
Abstract
Most modern JavaScript engines use just-in-time (JIT) compilation to translate parts of JavaScript code into efficient machine code at runtime. Despite the overall success of JIT compilers, programmers may still write code that uses the dynamic features of JavaScript in a way that prohibits profitable optimizations. Unfortunately, there currently is no way to measure how prevalent such JIT-unfriendly code is and to help developers detect such code locations. This paper presents JITProf, a profiling framework to dynamically identify code locations that prohibit profitable JIT optimizations. The key idea is to associate meta-information with JavaScript objects and code locations, to update this information whenever particular runtime events occur, and to use the meta-information to identify JIT-unfriendly operations. We use JITProf to analyze widely used JavaScript web applications and show that JIT-unfriendly code is prevalent in practice. Furthermore, we show how to use the approach as a profiling technique that finds optimization opportunities in a program. Applying the profiler to popular benchmark programs shows that refactoring these programs to avoid performance problems identified by JITProf leads to statistically significant performance improvements of up to 26.3% in 15 benchmarks.Keywords
Funding Information
- National Science Foundation (CCF-0747390, CCF-1018729, CCF-1423645, CCF-1018730)
This publication has 48 references indexed in Scilit:
- DLint: dynamically checking bad coding practices in JavaScript2015
- TypeDevil: Dynamic Type Inconsistency Analysis for JavaScript2015
- Statistical debugging for real-world performance problemsACM SIGPLAN Notices, 2014
- Improving JavaScript performance by deconstructing the type systemACM SIGPLAN Notices, 2014
- Portable and Efficient Run-time Monitoring of JavaScript Applications Using Virtual Machine Layering2014
- Understanding and detecting real-world performance bugs2012
- The Tau Parallel Performance SystemThe International Journal of High Performance Computing Applications, 2006
- Object equality profiling2003
- ParaProf: A Portable, Extensible, and Scalable Tool for Parallel Performance Profile Analysis2003
- An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypesACM SIGPLAN Notices, 1989