Bug 866775 - GC: Update the rooting analysis annotations to fix some false positives r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 30 Apr 2013 11:18:18 +0100
changeset 141269 1f73f3b8a2449ec6c142826f01d453f057573d7d
parent 141268 41b415cfb8606f8aca98655ad025754d57a35326
child 141270 1b5ab2426f16ff3b4f58b9cc07ae4278d1dc4611
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs866775
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 866775 - GC: Update the rooting analysis annotations to fix some false positives r=sfink
js/src/devtools/rootAnalysis/annotations.js
--- a/js/src/devtools/rootAnalysis/annotations.js
+++ b/js/src/devtools/rootAnalysis/annotations.js
@@ -46,16 +46,19 @@ var ignoreClasses = {
 
 var ignoreCallees = {
     "js::Class.trace" : true,
     "js::Class.finalize" : true,
     "JSRuntime.destroyPrincipals" : true,
     "nsISupports.AddRef" : true,
     "nsISupports.Release" : true, // makes me a bit nervous; this is a bug but can happen
     "nsAXPCNativeCallContext.GetJSContext" : true,
+    "js::ion::MDefinition.op" : true, // macro generated virtuals just return a constant
+    "js::ion::LInstruction.getDef" : true, // virtual but no implementation can GC
+    "js::ion::IonCache.kind" : true, // macro generated virtuals just return a constant
 };
 
 function fieldCallCannotGC(csu, fullfield)
 {
     if (csu in ignoreClasses)
         return true;
     if (fullfield in ignoreCallees)
         return true;
@@ -113,31 +116,34 @@ function ignoreGCFunction(fun)
     if (/refillFreeList/.test(fun) && /\(js::AllowGC\)0u/.test(fun))
         return true;
     return false;
 }
 
 function isRootedTypeName(name)
 {
     if (name == "mozilla::ErrorResult" ||
+        name == "js::frontend::TokenStream" ||
         name == "js::frontend::TokenStream::Position")
     {
         return true;
     }
     return false;
 }
 
 function isRootedPointerTypeName(name)
 {
     if (name.startsWith('struct '))
         name = name.substr(7);
     if (name.startsWith('class '))
         name = name.substr(6);
     if (name.startsWith('const '))
         name = name.substr(6);
+    if (name.startsWith('js::ctypes::'))
+        name = name.substr(12);
     if (name.startsWith('js::'))
         name = name.substr(4);
     if (name.startsWith('JS::'))
         name = name.substr(4);
 
     if (name.startsWith('MaybeRooted<'))
         return /\(js::AllowGC\)1u>::RootType/.test(name);