MemInsight: platform-independent memory debugging for JavaScript
Authors:
Open Access
- 30 August 2015
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 345-356
Abstract
JavaScript programs often suffer from memory issues that can either hurt performance or eventually cause memory exhaustion. While existing snapshot-based profiling tools can be helpful, the information provided is limited to the coarse granularity at which snapshots can be taken. We present MemInsight, a tool that provides detailed, time-varying analysis of the memory behavior of JavaScript applications, including web applications. MemInsight is platform independent and runs on unmodified JavaScript engines. It employs tuned source-code instrumentation to generate a trace of memory allocations and accesses, and it leverages modern browser features to track precise information for DOM (document object model) objects. It also computes exact object lifetimes without any garbage collector assistance, and exposes this information in an easily-consumable manner for further analysis. We describe several client analyses built into MemInsight, including detection of possible memory leaks and opportunities for stack allocation and object inlining. An experimental evaluation showed that with no modifications to the runtime, MemInsight was able to expose memory issues in several real-world applications.Keywords
This publication has 31 references indexed in Scilit:
- MemInsight: platform-independent memory debugging for JavaScript2015
- Finding reusable data structures2012
- AjaxScopeACM Transactions on the Web, 2010
- Generating object lifetime traces with MerlinACM Transactions on Programming Languages and Systems, 2006
- The Runtime Structure of Object Ownership2006
- Run‐time evaluation of opportunities for object inlining in JavaConcurrency and Computation: Practice and Experience, 2005
- Low-overhead memory leak detection using adaptive statistical profilingACM SIGPLAN Notices, 2004
- Object equality profiling2003
- LeakBot: An Automated and Lightweight Tool for Diagnosing Memory Leaks in Large Java ApplicationsLecture Notes in Computer Science, 2003
- Cyclic reference counting with lazy mark-scanInformation Processing Letters, 1992