Recently, I sat down with engineering director John Pampuch and engineering manager David Cox. The major developer, Tony Printezis, was unfortunately unavailable.
So, what is GCview?
John: GCview is a tool for people to look at virtual machines like V8 to analyze internal heap operations.
David: It’s a framework to monitor and visually percent any memory management technology like garbage collection.
In discussion, it seems that GCview is a generic and easily adaptable visualization and monitoring framework targeted (but not limited) to memory management systems (garbage collectors, malloc/free implementations, hardware caches, etc.). A system can be visualized by mapping its operation, data structures, heap layout, and other attributes onto GCView abstractions.
David: Its roots come from a similar tool known as GCspy, of which Tony was the original author. GCview is a new design and a completely separate code base.
What is GCview used for?
David: It’s for VM developers to get a deep dive into the activities of garbage collection. It allows knowledgeable developers to also help understand performance aspects of web applications.
John: It’s important to note that this tool does require some level of expertise to make the best use and looking at memory management systems. It helps identify the underlying causes, but the memory management system itself is responsible for offering the tweakable parameters to improve the identified problems.
In some ways, GCview seems (to me) similar to the Check Engine light on my car. When it appears, I understand I have a problem but may not know what the problem is. A monitoring tool allows me to see the diagnostic code that caused the problem, but doesn’t necessarily allow me to directly correct it. That may take expertise and tools that I may not have available. GCView shows me more than just simple diagnostic code, but fixing the problem still requires expertise and tools.
Why did Adobe build GCview?
John: We believe there is a need for deeper understanding of how memory management systems work in browsers today. We also think that there is room for significant improvement in web VMs.
David: It’s in everyone’s best interest to see the performance of web applications improve. Building GCview, particularly in tying to open source will allow this to innovate and grow for improvement of the web.
So, what’s inside GCview?
David: The GCview core consists of three parts which can be hosted in the same place and be easily adopted in the required system:
A) Data Stream Spec - A JSON specification that defines the format of a data stream representing the state of the system being monitored over time as mapped onto GCview abstractions. The data stream can either be written to a file for future analysis or transmitted over the network for online monitoring.
C) Data Tracking Code – C++ code that keeps track of the data needed to monitor a particular system after it has been mapped onto GCview abstractions along with facilities to export this data in the appropriate format.
How do I get started?
David: Well, the easiest way is to grab the source and point your browser at the index.html file. That will start GCview where you can load one of the sample traces in the source as well and begin to play and understand what GCview is showing you.
What’s next for the project?
John: We hope the open source community will help improve and expand the GCview features and capabilities. Some obvious directions would be inclusion into the Chrome dev tools. Perhaps a great next step would be to see this picked up and baked into Chrome together data on V8. The area covered by GCview today is just the beginning and we can’t wait to see what innovations other developers can bring to it.
Any final comments?
John: Releasing GCview under open source makes this tool and framework available for all sorts of interesting memory management systems.
David: We can’t wait to see what this develops into and where the community will take it.
Thanks for your time today guys. We appreciate the effort behind GCview and, honestly, the coolness factor that GCview offers to the web application community.