Labs/Test Pilot/Test Proposals/GC

From MozillaWiki
Jump to: navigation, search

Garbage Collection study

  • Champion: Paul Biggar (pbiggar@mozilla.com)
  • Status: draft
  • Duration: 5-7 days
  • Implementation: Not started.
  • Data to collect: A small number of integers describing a garbage collection. Identifiers of the scripts involved.
  • Tracking bug: 619561

Introduction

The JavaScript team is going to write a new Garbage Collector soon. To aid the design of the collector, we need to collect data about how scripts on the web use memory and produce garbage.

Questions to be answered (draft)

  • How much memory does a script use (peak, average)?
  • How often does a collector need to be run?
  • How old is an object when it's collected (HARD)
  • How much garbage is being destroyed during collection?


Data to be collected (draft)

  • the timestamp when GC starts
  • the timestamp when GC finishes its first phase (marking)
  • the timestamp when GC finishes its second phase (sweeping)
  • the timestamp when GC finishes completely
  • the size of the heap before
  • the size of the heap after
  • the URL of the script being run
  • the URL of the parent page

These are all integers. It is likely we will add some other integers to this list, but we expect there will be less than 20 integers in total.

Implementation proposal

The data we're looking to collect is not currently exposed, so we need to add instrumentation to allow this (see Bug 622638).

Description for users (draft)

"Collect metrics about the Garbage collection of JavaScript programs, to guide the development of a new Garbage Collector. We collect numbers such as how long a garbage collection takes, how much memory is freed each time, and how much memory is still used."

Status

We're currently blocking on:

  • exactly what data are we collecting?
  • Bug 622638: add instrumentation for GC test pilot