Bug 797066 - Make javascript.options.mem.log only log the GC/CC details in the Console. r=terrence
authorGirish Sharma <scrapmachines@gmail.com>
Wed, 03 Oct 2012 00:57:31 +0530
changeset 109138 c92cb673ade14269f78e09df61c534ff5781f554
parent 109137 94e41311dff56580edc59edbe3afe452bbce62fd
child 109139 1fca620575ce2dc6dca97addfd5ec58d1051e6b2
push id23609
push userryanvm@gmail.com
push dateThu, 04 Oct 2012 01:43:15 +0000
treeherdermozilla-central@ae646840907e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs797066
milestone18.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 797066 - Make javascript.options.mem.log only log the GC/CC details in the Console. r=terrence
dom/base/nsJSEnvironment.cpp
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -3140,17 +3140,17 @@ nsJSContext::CycleCollectNow(nsICycleCol
                                         sRemovedPurples));
     nsCOMPtr<nsIConsoleService> cs =
       do_GetService(NS_CONSOLESERVICE_CONTRACTID);
     if (cs) {
       cs->LogStringMessage(msg.get());
     }
   }
 
-  if (sPostGCEventsToConsole || sPostGCEventsToObserver) {
+  if (sPostGCEventsToObserver) {
     NS_NAMED_MULTILINE_LITERAL_STRING(kJSONFmt,
        NS_LL("{ \"timestamp\": %llu, ")
          NS_LL("\"duration\": %llu, ")
          NS_LL("\"suspected\": %lu, ")
          NS_LL("\"visited\": { ")
              NS_LL("\"RCed\": %lu, ")
              NS_LL("\"GCed\": %lu }, ")
          NS_LL("\"collected\": { ")
@@ -3501,17 +3501,17 @@ DOMGCSliceCallback(JSRuntime *aRt, js::G
                                              double(delta) / PR_USEC_PER_SEC));
       nsString msg = prefix + gcstats;
       nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
       if (cs) {
         cs->LogStringMessage(msg.get());
       }
     }
 
-    if (sPostGCEventsToConsole || sPostGCEventsToObserver) {
+    if (sPostGCEventsToObserver) {
       nsString json;
       json.Adopt(aDesc.formatJSON(aRt, PR_Now()));
       nsRefPtr<NotifyGCEndRunnable> notify = new NotifyGCEndRunnable(json);
       NS_DispatchToMainThread(notify);
     }
   }
 
   // Prevent cycle collections and shrinking during incremental GC.