Back out 17b5b5dcd308, 04af81445c05, 15cc0aabab67 (bug 788021) and 2575a2f89d22 (bug 790417) for Linux crashes
authorPhil Ringnalda <philringnalda@gmail.com>
Mon, 01 Oct 2012 23:00:51 -0700
changeset 108981 80f9522602c512e4308a44d7cddbe3147b8e24b4
parent 108980 97362b531a38ba6a134d70a567b499d5267d75fb
child 108982 13140a27ff09204eb2eb43fe4851cc1cdb3e1fc5
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
bugs788021, 790417
milestone18.0a1
backs out17b5b5dcd30846794c71805186c173c8c479e041
Back out 17b5b5dcd308, 04af81445c05, 15cc0aabab67 (bug 788021) and 2575a2f89d22 (bug 790417) for Linux crashes
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/ipc/PContent.ipdl
toolkit/components/aboutmemory/content/aboutMemory.js
xpcom/base/Makefile.in
xpcom/base/nsGZFileWriter.cpp
xpcom/base/nsGZFileWriter.h
xpcom/base/nsIGZFileWriter.idl
xpcom/base/nsIMemoryReporter.idl
xpcom/base/nsMemoryReporterManager.cpp
xpcom/base/nsMemoryReporterManager.h
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -423,30 +423,16 @@ ContentChild::RecvPMemoryReportRequestCo
 
 bool
 ContentChild::DeallocPMemoryReportRequest(PMemoryReportRequestChild* actor)
 {
     delete actor;
     return true;
 }
 
-bool
-ContentChild::RecvDumpMemoryReportsToFile(const nsString& aIdentifier,
-                                          const bool& aMinimizeMemoryUsage,
-                                          const bool& aDumpChildProcesses)
-{
-    nsCOMPtr<nsIMemoryReporterManager> mgr =
-        do_GetService("@mozilla.org/memory-reporter-manager;1");
-    NS_ENSURE_TRUE(mgr, true);
-    mgr->DumpMemoryReportsToFile(aIdentifier,
-                                 aMinimizeMemoryUsage,
-                                 aDumpChildProcesses);
-    return true;
-}
-
 PCompositorChild*
 ContentChild::AllocPCompositor(mozilla::ipc::Transport* aTransport,
                                base::ProcessId aOtherProcess)
 {
     return CompositorChild::Create(aTransport, aOtherProcess);
 }
 
 PImageBridgeChild*
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -103,21 +103,16 @@ public:
     AllocPMemoryReportRequest();
 
     virtual bool
     DeallocPMemoryReportRequest(PMemoryReportRequestChild* actor);
 
     virtual bool
     RecvPMemoryReportRequestConstructor(PMemoryReportRequestChild* child);
 
-    virtual bool
-    RecvDumpMemoryReportsToFile(const nsString& identifier,
-                                const bool& aMinimizeMemoryUsage,
-                                const bool& aDumpChildProcesses);
-
     virtual PTestShellChild* AllocPTestShell();
     virtual bool DeallocPTestShell(PTestShellChild*);
     virtual bool RecvPTestShellConstructor(PTestShellChild*);
 
     virtual PAudioChild* AllocPAudio(const int32_t&,
                                      const int32_t&,
                                      const int32_t&);
     virtual bool DeallocPAudio(PAudioChild*);
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -400,20 +400,16 @@ ContentParent::GetAll(nsTArray<ContentPa
 
     if (gNonAppContentParents) {
         aArray.AppendElements(*gNonAppContentParents);
     }
 
     if (gAppContentParents) {
         gAppContentParents->EnumerateRead(&AppendToTArray, &aArray);
     }
-
-    if (sPreallocatedAppProcess) {
-        aArray.AppendElement(sPreallocatedAppProcess);
-    }
 }
 
 void
 ContentParent::Init()
 {
     nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
     if (obs) {
         obs->AddObserver(this, "xpcom-shutdown", false);
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -193,26 +193,16 @@ both:
     // PBrowser as its |AppId|.
     async PBrowser(uint32_t chromeFlags, bool isBrowserElement, AppId appId);
 
     async PBlob(BlobConstructorParams params);
 
 child:
     PMemoryReportRequest();
 
-    /**
-     * Dump the contents of about:memory to a file in our temp directory.
-     *
-     * For documentation on the args, see
-     * nsIMemoryReporterManager::dumpMemoryReportsToFile.
-     */
-    async DumpMemoryReportsToFile(nsString identifier,
-                                  bool minimizeMemoryUsage,
-                                  bool dumpChildProcesses);
-
     PTestShell();
 
     RegisterChrome(ChromePackage[] packages, ResourceMapping[] resources,
                    OverrideMapping[] overrides, nsCString locale);
 
     async SetOffline(bool offline);
 
     async NotifyVisited(URIParams uri);
--- a/toolkit/components/aboutmemory/content/aboutMemory.js
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js
@@ -137,16 +137,48 @@ function onUnload()
   // onLoadAbout{Memory,Compartments} might not fire.
   if (gChildMemoryListener) {
     let os = Cc["@mozilla.org/observer-service;1"].
         getService(Ci.nsIObserverService);
     os.removeObserver(gChildMemoryListener, "child-memory-reporter-update");
   }
 }
 
+// For maximum effect, this returns to the event loop between each
+// notification.  See bug 610166 comment 12 for an explanation.
+// Ideally a single notification would be enough.
+function minimizeMemoryUsage3x(fAfter)
+{
+  let i = 0;
+
+  function runSoon(f)
+  {
+    let tm = Cc["@mozilla.org/thread-manager;1"]
+              .getService(Ci.nsIThreadManager);
+
+    tm.mainThread.dispatch({ run: f }, Ci.nsIThread.DISPATCH_NORMAL);
+  }
+
+  function sendHeapMinNotificationsInner()
+  {
+    let os = Cc["@mozilla.org/observer-service;1"]
+             .getService(Ci.nsIObserverService);
+    os.notifyObservers(null, "memory-pressure", "heap-minimize");
+
+    if (++i < 3) {
+      runSoon(sendHeapMinNotificationsInner);
+    } else {
+      os.notifyObservers(null, "after-minimize-memory-usage", "about:memory");
+      runSoon(fAfter);
+    }
+  }
+
+  sendHeapMinNotificationsInner();
+}
+
 //---------------------------------------------------------------------------
 
 /**
  * Iterates over each reporter and multi-reporter.
  *
  * @param aIgnoreSingle
  *        Function that indicates if we should skip a single reporter, based
  *        on its path.
@@ -508,17 +540,17 @@ function appendAboutMemoryFooter(aBody)
 
   let div1 = appendElement(aBody, "div");
 
   // The "Update" button has an id so it can be clicked in a test.
   appendButton(div1, UpDesc, updateAboutMemory, "Update", "updateButton");
   appendButton(div1, GCDesc, doGlobalGC,        "GC");
   appendButton(div1, CCDesc, doCC,              "CC");
   appendButton(div1, MPDesc,
-               function() { gMgr.minimizeMemoryUsage(updateAboutMemory); },
+               function() { minimizeMemoryUsage3x(updateAboutMemory); },
                "Minimize memory usage");
 
   // The standard file input element is ugly.  So we hide it, and add a button
   // that when clicked invokes the input element.
   let input = appendElementWithText(div1, "input", "hidden", "input text");
   input.type = "file";
   input.id = "fileInput";   // has an id so it can be invoked by a test
   input.addEventListener("change", function() {
@@ -1462,17 +1494,17 @@ function appendSectionHeader(aP, aText)
 function onLoadAboutCompartments()
 {
   // First generate the page, then minimize memory usage to collect any dead
   // compartments, then update the page.  The first generation step may sound
   // unnecessary, but it avoids a short delay in showing content when the page
   // is loaded, which makes test_aboutcompartments.xul more reliable (see bug
   // 729018 for details).
   updateAboutCompartments();
-  gMgr.minimizeMemoryUsage(
+  minimizeMemoryUsage3x(
     function() { addChildObserversAndUpdate(updateAboutCompartments); });
 }
 
 /**
  * Top-level function that does the work of generating the page.
  */
 function updateAboutCompartments()
 {
--- a/xpcom/base/Makefile.in
+++ b/xpcom/base/Makefile.in
@@ -35,17 +35,16 @@ CPPSRCS		= \
 		nsUUIDGenerator.cpp \
 		nsSystemInfo.cpp \
 		nsCycleCollector.cpp \
 		nsStackWalk.cpp \
 		nsMemoryReporterManager.cpp \
 		ClearOnShutdown.cpp \
 		VisualEventTracer.cpp \
 		nsErrorAsserts.cpp \
-		nsGZFileWriter.cpp \
 		$(NULL)
 
 ifeq ($(OS_ARCH),Linux)
 CPPSRCS += MapsMemoryReporter.cpp
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 CPPSRCS		+= nsMacUtilsImpl.cpp
@@ -60,17 +59,16 @@ EXPORTS		= \
 		nsIID.h \
 		nsISizeOf.h \
 		nsISupportsObsolete.h \
 		nsStackWalk.h \
 		nsTraceRefcntImpl.h \
 		nsWeakPtr.h \
 		nsInterfaceRequestorAgg.h \
 		dmd.h \
-		nsGZFileWriter.h \
 		$(NULL)
 
 EXPORTS_NAMESPACES = mozilla
 
 EXPORTS_mozilla = \
 	MapsMemoryReporter.h \
 	ClearOnShutdown.h \
 	StaticPtr.h \
@@ -127,17 +125,16 @@ XPIDLSRCS	= \
 		nsIDebug2.idl \
 		nsIErrorService.idl \
 		nsIException.idl \
 		nsIExceptionService.idl \
 		nsIVersionComparator.idl \
 		nsIUUIDGenerator.idl \
 		nsIMutable.idl \
 		nsIMemoryReporter.idl \
-		nsIGZFileWriter.idl \
 		$(NULL)
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 XPIDLSRCS	+= nsIMacUtils.idl
 endif
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
deleted file mode 100644
--- a/xpcom/base/nsGZFileWriter.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsGZFileWriter.h"
-#include "nsIFile.h"
-#include "nsString.h"
-#include "zlib.h"
-
-#ifdef XP_WIN
-#include <io.h>
-#define _dup dup
-#else
-#include <unistd.h>
-#endif
-
-NS_IMPL_ISUPPORTS1(nsGZFileWriter, nsIGZFileWriter)
-
-nsGZFileWriter::nsGZFileWriter()
-  : mInitialized(false)
-  , mFinished(false)
-{}
-
-nsGZFileWriter::~nsGZFileWriter()
-{
-  if (mInitialized && !mFinished) {
-    Finish();
-  }
-}
-
-NS_IMETHODIMP
-nsGZFileWriter::Init(nsIFile* aFile)
-{
-  NS_ENSURE_FALSE(mInitialized, NS_ERROR_FAILURE);
-  NS_ENSURE_FALSE(mFinished, NS_ERROR_FAILURE);
-
-  // Get a FILE out of our nsIFile.  Convert that into a file descriptor which
-  // gzip can own.  Then close our FILE, leaving only gzip's fd open.
-
-  FILE* file;
-  nsresult rv = aFile->OpenANSIFileDesc("w", &file);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  mGZFile = gzdopen(dup(fileno(file)), "w");
-  fclose(file);
-
-  // gzdopen returns NULL on error.
-  NS_ENSURE_TRUE(mGZFile, NS_ERROR_FAILURE);
-  mInitialized = true;
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGZFileWriter::Write(const nsACString& aStr)
-{
-  NS_ENSURE_TRUE(mInitialized, NS_ERROR_NOT_INITIALIZED);
-  NS_ENSURE_FALSE(mFinished, NS_ERROR_FAILURE);
-
-  // gzwrite uses a return value of 0 to indicate failure.  Otherwise, it
-  // returns the number of uncompressed bytes written.  To ensure we can
-  // distinguish between success and failure, don't call gzwrite when we have 0
-  // bytes to write.
-  if (aStr.IsEmpty()) {
-    return NS_OK;
-  }
-
-  // gzwrite never does a short write -- that is, the return value should
-  // always be either 0 or aStr.Length(), and we shouldn't have to call it
-  // multiple times in order to get it to read the whole buffer.
-  int rv = gzwrite(mGZFile, aStr.BeginReading(), aStr.Length());
-  NS_ENSURE_TRUE(rv == static_cast<int>(aStr.Length()), NS_ERROR_FAILURE);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsGZFileWriter::Finish()
-{
-  NS_ENSURE_TRUE(mInitialized, NS_ERROR_NOT_INITIALIZED);
-  NS_ENSURE_FALSE(mFinished, NS_ERROR_FAILURE);
-
-  mFinished = true;
-  gzclose(mGZFile);
-
-  // Ignore errors from gzclose; it's not like there's anything we can do about
-  // it, at this point!
-  return NS_OK;
-}
deleted file mode 100644
--- a/xpcom/base/nsGZFileWriter.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsIGZFileWriter.h"
-#include <stdio.h>
-#include "zlib.h"
-
-/**
- * A simple class for writing .gz files.
- */
-class nsGZFileWriter : public nsIGZFileWriter
-{
-public:
-  nsGZFileWriter();
-  virtual ~nsGZFileWriter();
-
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIGZFILEWRITER
-
-  /**
-   * nsIGZFileWriter exposes two non-virtual overloads of Write().  We
-   * duplicate them here so that you can call these overloads on a pointer to
-   * the concrete nsGZFileWriter class.
-   */
-  nsresult Write(const char* aStr)
-  {
-    return nsIGZFileWriter::Write(aStr);
-  }
-
-  nsresult Write(const char* aStr, uint32_t aLen)
-  {
-    return nsIGZFileWriter::Write(aStr, aLen);
-  }
-
-private:
-  bool mInitialized;
-  bool mFinished;
-  gzFile mGZFile;
-};
deleted file mode 100644
--- a/xpcom/base/nsIGZFileWriter.idl
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-%{C++
-#include "nsDependentString.h"
-%}
-
-interface nsIFile;
-
-/**
- * A simple interface for writing to a .gz file.
- *
- * Note that the file that this interface produces has a different format than
- * what you'd get if you compressed your data as a gzip stream and dumped the
- * result to a file.
- *
- * The standard gunzip tool cannot decompress a raw gzip stream, but can handle
- * the files produced by this interface.
- */
-[scriptable, uuid(a256f26a-c603-459e-b5a4-53b4877f2cd8)]
-interface nsIGZFileWriter : nsISupports
-{
-  /**
-   * Initialize this object.  We'll write our gzip'ed data to the given file,
-   * overwriting its contents if the file exists.
-   *
-   * init() will return an error if called twice.  It's an error to call any
-   * other method on this interface without first calling init().
-   */
-  void init(in nsIFile file);
-
-  /**
-   * Write the given string to the file.
-   */
-  void write(in AUTF8String str);
-
-  /*
-   * The following two overloads of Write() are C++ because we can't overload
-   * methods in XPIDL.  Anyway, they don't add much functionality for JS
-   * callers.
-   */
-  %{C++
-  /**
-   * Write the given char* to the file (not including the null-terminator).
-   */
-  nsresult Write(const char* str)
-  {
-    return Write(str, strlen(str));
-  }
-
-  /**
-   * Write |length| bytes of |str| to the file.
-   */
-  nsresult Write(const char* str, uint32_t len)
-  {
-    return Write(nsDependentCString(str, len));
-  }
-  %}
-
-  /**
-   * Close this nsIGZFileWriter.  This method is run when the underlying object
-   * is destroyed, so it's not strictly necessary to explicitly call it from
-   * your code.
-   *
-   * It's an error to call this method twice, and it's an error to call write()
-   * after finish() has been called.
-   */
-  void finish();
-};
--- a/xpcom/base/nsIMemoryReporter.idl
+++ b/xpcom/base/nsIMemoryReporter.idl
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsISimpleEnumerator;
-interface nsIRunnable;
 
 /*
  * Memory reporters measure Firefox's memory usage.  They are mainly used to
  * generate the about:memory page.  You should read
  * https://wiki.mozilla.org/Memory_Reporting before writing a memory
  * reporter.
  */
 
@@ -221,17 +220,17 @@ interface nsIMemoryMultiReporter : nsISu
    * nsIMemoryReporterManager::explicit efficiently, which is important --
    * multi-reporters can special-case this operation so it's much faster
    * than getting all the reports, filtering out the unneeded ones, and
    * summing the remainder.
    */
   readonly attribute int64_t explicitNonHeap;
 };
 
-[scriptable, uuid(7aa2fcfc-eb8f-4bc8-95cc-2bc5e3374df7)]
+[scriptable, uuid(46a09443-ec1d-4aa8-ae40-28642f138a04)]
 interface nsIMemoryReporterManager : nsISupports
 {
   /*
    * Return an enumerator of nsIMemoryReporters that are currently registered.
    */
   nsISimpleEnumerator enumerateReporters ();
 
   /*
@@ -289,46 +288,19 @@ interface nsIMemoryReporterManager : nsI
   readonly attribute int64_t explicit;
 
   /*
    * This attribute indicates if moz_malloc_usable_size() works.
    */
   readonly attribute boolean hasMozMallocUsableSize;
 
   /*
-   * Run a series of GC/CC's in an attempt to minimize the application's memory
-   * usage.  When we're finished, we invoke the given runnable.
-   */
-  void minimizeMemoryUsage(in nsIRunnable callback);
-
-  /*
-   * This dumps the memory reports for this process and possibly all our child
-   * processes (and all their children, recursively) to a file in the tmp
-   * directory called memory-reports-<identifier>-<pid>.json.gz (or something
-   * similar, such as memory-reports-<identifier>-<pid>-1.json.gz;  no existing
-   * file will be overwritten).
-   *
-   * @param identifier this identifier will appear in the filename of our
-   *   about:memory dump and those of our children (if dumpChildProcesses is
-   *   true).
-   *
-   *   If the identifier is empty, the dumpMemoryReportsToFile implementation
-   *   may set it arbitrarily and use that new value for its own dump and the
-   *   dumps of its child processes.  For example, the dumpMemoryReportsToFile
-   *   implementation may set |identifier| to the number of seconds since the
-   *   epoch.
-   *
-   * @param minimizeMemoryUsage indicates whether we should run a series of
-   *   gc/cc's in an attempt to reduce our memory usage before collecting our
-   *   memory report.
-   *
-   * @param dumpChildProcesses indicates whether we should call
-   *   dumpMemoryReportsToFile in our child processes.  If so, the child
-   *   processes will also dump their children, and so on.
-   *
+   * This dumps the memory reports for this process to a file in the tmp
+   * directory called memory-reports-<pid>.json (or something similar, such as
+   * memory-reports-<pid>-1.json;  no existing file will be overwritten).
    *
    * Sample output:
    *
    * {
    *   "hasMozMallocUsableSize":true,
    *   "reports": [
    *     {"process":"", "path":"explicit/foo/bar", "kind":1, "units":0,
    *      "amount":2000000, "description":"Foo bar."},
@@ -388,19 +360,17 @@ interface nsIMemoryReporterManager : nsI
    *             "required": true
    *           }
    *         }
    *       }
    *     }
    *   }
    * }
    */
-  void dumpMemoryReportsToFile (in AString identifier,
-                                in bool minimizeMemoryUsage,
-                                in bool dumpChildProcesses);
+  void dumpReports ();
 };
 
 %{C++
 
 /*
  * Note that this defaults 'process' to "", which is usually what's desired.
  */
 #define NS_MEMORY_REPORTER_IMPLEMENT_HELPER(_classname, _path, _kind, _units, _amountFunction, _desc, _ts) \
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -11,39 +11,27 @@
 #include "nsServiceManagerUtils.h"
 #include "nsMemoryReporterManager.h"
 #include "nsArrayEnumerator.h"
 #include "nsIConsoleService.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIFile.h"
 #include "nsIFileStreams.h"
 #include "nsPrintfCString.h"
-#include "nsThreadUtils.h"
-#include "nsIObserverService.h"
-#include "nsThread.h"
-#include "nsGZFileWriter.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/Services.h"
-#include "mozilla/dom/ContentParent.h"
-#include "mozilla/FileUtils.h"
-#include "mozilla/StaticPtr.h"
-#include "mozilla/ClearOnShutdown.h"
-#include "mozilla/unused.h"
 
 #ifdef XP_WIN
 #include <process.h>
 #define getpid _getpid
 #else
 #include <unistd.h>
-#include <fcntl.h>
 #endif
 
 using namespace mozilla;
-using namespace mozilla::dom;
 
 #if defined(MOZ_MEMORY)
 #  define HAVE_JEMALLOC_STATS 1
 #  include "jemalloc.h"
 #endif  // MOZ_MEMORY
 
 #ifdef XP_UNIX
 
@@ -633,208 +621,16 @@ NS_MEMORY_REPORTER_IMPLEMENT(AtomTable,
     "Memory used by the dynamic and static atoms tables.")
 
 /**
  ** nsMemoryReporterManager implementation
  **/
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsMemoryReporterManager, nsIMemoryReporterManager)
 
-namespace {
-
-class DumpMemoryReportsRunnable : public nsRunnable
-{
-public:
-  DumpMemoryReportsRunnable(const nsAString& aIdentifier,
-                            bool aMinimizeMemoryUsage,
-                            bool aDumpChildProcesses)
-
-      : mIdentifier(aIdentifier)
-      , mMinimizeMemoryUsage(aMinimizeMemoryUsage)
-      , mDumpChildProcesses(aDumpChildProcesses)
-  {}
-
-  NS_IMETHOD Run()
-  {
-      nsCOMPtr<nsIMemoryReporterManager> mgr =
-          do_GetService("@mozilla.org/memory-reporter-manager;1");
-      NS_ENSURE_STATE(mgr);
-      mgr->DumpMemoryReportsToFile(mIdentifier,
-                                   mMinimizeMemoryUsage,
-                                   mDumpChildProcesses);
-      return NS_OK;
-  }
-
-private:
-  const nsString mIdentifier;
-  const bool mMinimizeMemoryUsage;
-  const bool mDumpChildProcesses;
-};
-
-} // anonymous namespace
-
-#ifdef XP_LINUX // {
-namespace {
-
-/*
- * The following code supports dumping about:memory upon receiving a signal.
- *
- * We listen for the signals SIGRTMIN and SIGRTMIN +1.  (The latter causes us
- * to minimize memory usage before dumping about:memory.)
- *
- * When we receive one of these signals, we write the signal number to a pipe.
- * The IO thread then notices that the pipe has been written to, and kicks off
- * a DumpMemoryReports task on the main thread.
- *
- * This scheme is similar to using signalfd(), except it's portable and it
- * doesn't require the use of sigprocmask, which is problematic because it
- * masks signals received by child processes.
- *
- * In theory, we could use Chromium's MessageLoopForIO::CatchSignal() for this.
- * But that uses libevent, which does not handle the realtime signals (bug
- * 794074).
- */
-
-// It turns out that at least on some systems, SIGRTMIN is not a compile-time
-// constant, so these have to be set at runtime.
-static int sDumpAboutMemorySignum;         // SIGRTMIN
-static int sDumpAboutMemoryAfterMMUSignum; // SIGRTMIN + 1
-
-// This is the write-end of a pipe that we use to notice when a
-// dump-about-memory signal occurs.
-static int sDumpAboutMemoryPipeWriteFd;
-
-void
-DumpAboutMemorySignalHandler(int aSignum)
-{
-  // This is a signal handler, so everything in here needs to be
-  // async-signal-safe.  Be careful!
-
-  if (sDumpAboutMemoryPipeWriteFd != 0) {
-    uint8_t signum = static_cast<int>(aSignum);
-    write(sDumpAboutMemoryPipeWriteFd, &signum, sizeof(signum));
-  }
-}
-
-class SignalPipeWatcher : public MessageLoopForIO::Watcher
-{
-public:
-  SignalPipeWatcher()
-  {}
-
-  ~SignalPipeWatcher()
-  {
-    // This is somewhat paranoid, but we want to avoid the race condition where
-    // we close sDumpAboutMemoryPipeWriteFd before setting it to 0, then we
-    // reuse that fd for some other file, and then the signal handler runs.
-    int pipeWriteFd = sDumpAboutMemoryPipeWriteFd;
-    PR_ATOMIC_SET(&sDumpAboutMemoryPipeWriteFd, 0);
-    close(pipeWriteFd);
-
-    close(mPipeReadFd);
-  }
-
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SignalPipeWatcher)
-
-  bool Start()
-  {
-    MOZ_ASSERT(XRE_GetIOMessageLoop() == MessageLoopForIO::current());
-
-    sDumpAboutMemorySignum = SIGRTMIN;
-    sDumpAboutMemoryAfterMMUSignum = SIGRTMIN + 1;
-
-    // Create a pipe.  When we receive a signal in our signal handler, we'll
-    // write the signum to the write-end of this pipe.
-    int pipeFds[2];
-    if (pipe(pipeFds)) {
-        NS_WARNING("Failed to create pipe.");
-        return false;
-    }
-
-    // Close this pipe on calls to exec().
-    fcntl(pipeFds[0], F_SETFD, FD_CLOEXEC);
-    fcntl(pipeFds[1], F_SETFD, FD_CLOEXEC);
-
-    mPipeReadFd = pipeFds[0];
-    sDumpAboutMemoryPipeWriteFd = pipeFds[1];
-
-    struct sigaction action;
-    memset(&action, 0, sizeof(action));
-    sigemptyset(&action.sa_mask);
-    action.sa_handler = DumpAboutMemorySignalHandler;
-
-    if (sigaction(sDumpAboutMemorySignum, &action, nullptr)) {
-      NS_WARNING("Failed to register about:memory dump signal handler.");
-    }
-    if (sigaction(sDumpAboutMemoryAfterMMUSignum, &action, nullptr)) {
-      NS_WARNING("Failed to register about:memory dump after MMU signal handler.");
-    }
-
-    // Start watching the read end of the pipe on the IO thread.
-    return MessageLoopForIO::current()->WatchFileDescriptor(
-        mPipeReadFd, /* persistent = */ true,
-        MessageLoopForIO::WATCH_READ,
-        &mReadWatcher, this);
-  }
-
-  virtual void OnFileCanReadWithoutBlocking(int aFd)
-  {
-    MOZ_ASSERT(XRE_GetIOMessageLoop() == MessageLoopForIO::current());
-
-    uint8_t signum;
-    ssize_t numReceived = read(aFd, &signum, sizeof(signum));
-    if (numReceived != sizeof(signum)) {
-      NS_WARNING("Error reading from buffer in "
-                 "SignalPipeWatcher::OnFileCanReadWithoutBlocking.");
-      return;
-    }
-
-    if (signum != sDumpAboutMemorySignum &&
-        signum != sDumpAboutMemoryAfterMMUSignum) {
-      NS_WARNING("Got unexpected signum.");
-      return;
-    }
-
-    // Dump about:memory (but run this on the main thread!).
-    nsRefPtr<DumpMemoryReportsRunnable> runnable =
-      new DumpMemoryReportsRunnable(
-          /* identifier = */ EmptyString(),
-          signum == sDumpAboutMemoryAfterMMUSignum,
-          /* dumpChildProcesses = */ true);
-    NS_DispatchToMainThread(runnable);
-  }
-
-  virtual void OnFileCanWriteWithoutBlocking(int aFd)
-  {}
-
-private:
-  int mPipeReadFd;
-  MessageLoopForIO::FileDescriptorWatcher mReadWatcher;
-};
-
-StaticRefPtr<SignalPipeWatcher> sSignalPipeWatcher;
-
-void
-InitializeDumpAboutMemoryWatcher()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!sSignalPipeWatcher);
-
-  sSignalPipeWatcher = new SignalPipeWatcher();
-  ClearOnShutdown(&sSignalPipeWatcher);
-
-  XRE_GetIOMessageLoop()->PostTask(
-      FROM_HERE,
-      NewRunnableMethod(sSignalPipeWatcher.get(),
-                        &SignalPipeWatcher::Start));
-}
-
-} // anonymous namespace
-#endif // } XP_LINUX
-
 NS_IMETHODIMP
 nsMemoryReporterManager::Init()
 {
 #if HAVE_JEMALLOC_STATS && defined(XP_LINUX)
     if (!jemalloc_stats)
         return NS_ERROR_FAILURE;
 #endif
 
@@ -870,20 +666,16 @@ nsMemoryReporterManager::Init()
     REGISTER(HeapDirty);
 #elif defined(HAVE_HEAP_ZONE0_REPORTERS)
     REGISTER(HeapZone0Committed);
     REGISTER(HeapZone0Used);
 #endif
 
     REGISTER(AtomTable);
 
-#if defined(XP_LINUX)
-    InitializeDumpAboutMemoryWatcher();
-#endif
-
     return NS_OK;
 }
 
 nsMemoryReporterManager::nsMemoryReporterManager()
   : mMutex("nsMemoryReporterManager::mMutex")
 {
 }
 
@@ -1103,20 +895,22 @@ nsMemoryReporterManager::GetExplicit(int
       r->CollectReports(cb, wrappedExplicitNonHeapMultiSize2);
     }
     int64_t explicitNonHeapMultiSize2 = wrappedExplicitNonHeapMultiSize2->mValue;
 
     // Check the two measurements give the same result.  This was an
     // NS_ASSERTION but they occasionally don't match due to races (bug
     // 728990).
     if (explicitNonHeapMultiSize != explicitNonHeapMultiSize2) {
-        NS_WARNING(nsPrintfCString("The two measurements of 'explicit' memory "
-                                   "usage don't match (%lld vs %lld)",
-                                   explicitNonHeapMultiSize,
-                                   explicitNonHeapMultiSize2).get());
+        char *msg = PR_smprintf("The two measurements of 'explicit' memory "
+                                "usage don't match (%lld vs %lld)",
+                                explicitNonHeapMultiSize,
+                                explicitNonHeapMultiSize2);
+        NS_WARNING(msg);
+        PR_smprintf_free(msg);
     }
 #endif  // DEBUG
 
     *aExplicit = heapAllocated + explicitNonHeapNormalSize + explicitNonHeapMultiSize;
     return NS_OK;
 #endif // HAVE_HEAP_ALLOCATED_AND_EXPLICIT_REPORTERS
 }
 
@@ -1128,187 +922,131 @@ nsMemoryReporterManager::GetHasMozMalloc
         return NS_ERROR_OUT_OF_MEMORY;
     }
     size_t usable = moz_malloc_usable_size(p);
     free(p);
     *aHas = !!(usable > 0);
     return NS_OK;
 }
 
-NS_IMETHODIMP
-nsMemoryReporterManager::DumpMemoryReportsToFile(
-    const nsAString& aIdentifier,
-    bool aMinimizeMemoryUsage,
-    bool aDumpChildProcesses)
-{
-    // If the identifier is empty, set it to the number of whole seconds since
-    // the epoch.  This identifier will appear in our memory report as well as
-    // our children's, allowing us to identify which files are from the same
-    // memory report request.
-    nsString identifier(aIdentifier);
-    if (identifier.IsEmpty()) {
-        identifier.AppendInt(PR_Now() / 1000000);
-    }
-
-    // Kick off memory report dumps in our child processes, if applicable.  We
-    // do this before doing our own report because writing a report may be I/O
-    // bound, in which case we want to busy the CPU with other reports while we
-    // work on our own.
-    if (aDumpChildProcesses) {
-        nsTArray<ContentParent*> children;
-        ContentParent::GetAll(children);
-        for (uint32_t i = 0; i < children.Length(); i++) {
-            unused << children[i]->SendDumpMemoryReportsToFile(
-                identifier, aMinimizeMemoryUsage, aDumpChildProcesses);
-        }
-    }
-
-    if (aMinimizeMemoryUsage) {
-        // Minimize memory usage, then run DumpMemoryReportsToFile again.
-        nsRefPtr<DumpMemoryReportsRunnable> callback =
-            new DumpMemoryReportsRunnable(identifier,
-                                          /* minimizeMemoryUsage = */ false,
-                                          /* dumpChildProcesses = */ false);
-        return MinimizeMemoryUsage(callback);
-    }
-
-    return DumpMemoryReportsToFileImpl(identifier);
-}
-
 #define DUMP(o, s) \
     do { \
-        nsresult rv = (o)->Write(s); \
+        const char* s2 = (s); \
+        uint32_t dummy; \
+        nsresult rv = (o)->Write((s2), strlen(s2), &dummy); \
         NS_ENSURE_SUCCESS(rv, rv); \
     } while (0)
 
 static nsresult
-DumpReport(nsIGZFileWriter *aWriter, bool aIsFirst,
+DumpReport(nsIFileOutputStream *aOStream, bool isFirst,
            const nsACString &aProcess, const nsACString &aPath, int32_t aKind,
            int32_t aUnits, int64_t aAmount, const nsACString &aDescription)
 {
-    DUMP(aWriter, aIsFirst ? "[" : ",");
+    DUMP(aOStream, isFirst ? "[" : ",");
 
     // We only want to dump reports for this process.  If |aProcess| is
     // non-NULL that means we've received it from another process in response
     // to a "child-memory-reporter-request" event;  ignore such reports.
     if (!aProcess.IsEmpty()) {
-        return NS_OK;
+        return NS_OK;    
     }
 
     unsigned pid = getpid();
     nsPrintfCString pidStr("Process %u", pid);
-    DUMP(aWriter, "\n    {\"process\": \"");
-    DUMP(aWriter, pidStr);
+    DUMP(aOStream, "\n    {\"process\": \"");
+    DUMP(aOStream, pidStr.get());
 
-    DUMP(aWriter, "\", \"path\": \"");
+    DUMP(aOStream, "\", \"path\": \"");
     nsCString path(aPath);
     path.ReplaceSubstring("\\", "\\\\");    // escape backslashes for JSON
-    DUMP(aWriter, path);
+    DUMP(aOStream, path.get());
 
-    DUMP(aWriter, "\", \"kind\": ");
-    DUMP(aWriter, nsPrintfCString("%d", aKind));
+    DUMP(aOStream, "\", \"kind\": ");
+    DUMP(aOStream, nsPrintfCString("%d", aKind).get());
 
-    DUMP(aWriter, ", \"units\": ");
-    DUMP(aWriter, nsPrintfCString("%d", aUnits));
+    DUMP(aOStream, ", \"units\": ");
+    DUMP(aOStream, nsPrintfCString("%d", aUnits).get());
 
-    DUMP(aWriter, ", \"amount\": ");
-    DUMP(aWriter, nsPrintfCString("%lld", aAmount));
+    DUMP(aOStream, ", \"amount\": ");
+    DUMP(aOStream, nsPrintfCString("%lld", aAmount).get());
 
     nsCString description(aDescription);
     description.ReplaceSubstring("\\", "\\\\");    /* <backslash> --> \\ */
     description.ReplaceSubstring("\"", "\\\"");    // " --> \"
     description.ReplaceSubstring("\n", "\\n");     // <newline> --> \n
-    DUMP(aWriter, ", \"description\": \"");
-    DUMP(aWriter, description);
-    DUMP(aWriter, "\"}");
+    DUMP(aOStream, ", \"description\": \"");
+    DUMP(aOStream, description.get());
+    DUMP(aOStream, "\"}");
 
     return NS_OK;
 }
 
 class DumpMultiReporterCallback MOZ_FINAL : public nsIMemoryMultiReporterCallback
 {
 public:
     NS_DECL_ISUPPORTS
 
     NS_IMETHOD Callback(const nsACString &aProcess, const nsACString &aPath,
                         int32_t aKind, int32_t aUnits, int64_t aAmount,
                         const nsACString &aDescription,
                         nsISupports *aData)
     {
-        nsCOMPtr<nsIGZFileWriter> writer = do_QueryInterface(aData);
-        NS_ENSURE_TRUE(writer, NS_ERROR_FAILURE);
+        nsCOMPtr<nsIFileOutputStream> ostream = do_QueryInterface(aData);
+        if (!ostream)
+            return NS_ERROR_FAILURE;
 
         // The |isFirst = false| assumes that at least one single reporter is
-        // present and so will have been processed in
-        // DumpMemoryReportsToFileImpl() below.
-        return DumpReport(writer, /* isFirst = */ false, aProcess, aPath,
+        // present and so will have been processed in DumpReports() below.
+        return DumpReport(ostream, /* isFirst = */ false, aProcess, aPath,
                           aKind, aUnits, aAmount, aDescription);
-        return NS_OK;
     }
 };
 
 NS_IMPL_ISUPPORTS1(
   DumpMultiReporterCallback
 , nsIMemoryMultiReporterCallback
 )
 
-nsresult
-nsMemoryReporterManager::DumpMemoryReportsToFileImpl(
-    const nsAString& aIdentifier)
+NS_IMETHODIMP
+nsMemoryReporterManager::DumpReports()
 {
-    // Open a new file named something like
-    //
-    //   incomplete-memory-report-<-identifier>-<pid>-42.json.gz
-    //
-    // in NS_OS_TEMP_DIR for writing.  When we're finished writing the report,
-    // we'll rename this file and get rid of the "incomplete-" prefix.
-    //
-    // We do this because we don't want scripts which poll the filesystem
-    // looking for memory report dumps to grab a file before we're finished
-    // writing to it.
+    // Open a file in NS_OS_TEMP_DIR for writing.
 
     nsCOMPtr<nsIFile> tmpFile;
     nsresult rv =
         NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(tmpFile));
     NS_ENSURE_SUCCESS(rv, rv);
-
-    // Note that |filename| is missing the "incomplete-" prefix; we'll tack
-    // that on in a moment.
-    nsAutoCString filename;
-    filename.AppendLiteral("memory-report");
-    if (!aIdentifier.IsEmpty()) {
-        filename.AppendLiteral("-");
-        filename.Append(NS_ConvertUTF16toUTF8(aIdentifier));
-    }
-    filename.AppendLiteral("-");
+   
+    // Basic filename form: "memory-reports-<pid>.json".
+    nsCString filename("memory-reports-");
     filename.AppendInt(getpid());
-    filename.AppendLiteral(".json.gz");
-
-    rv = tmpFile->AppendNative(NS_LITERAL_CSTRING("incomplete-") + filename);
+    filename.AppendLiteral(".json");
+    rv = tmpFile->AppendNative(filename);
     NS_ENSURE_SUCCESS(rv, rv);
    
-    rv = tmpFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
+    rv = tmpFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600); 
     NS_ENSURE_SUCCESS(rv, rv);
-
-    nsRefPtr<nsGZFileWriter> writer = new nsGZFileWriter();
-    rv = writer->Init(tmpFile);
+   
+    nsCOMPtr<nsIFileOutputStream> ostream =
+        do_CreateInstance("@mozilla.org/network/file-output-stream;1");
+    rv = ostream->Init(tmpFile, -1, -1, 0);
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Dump the memory reports to the file.
 
     // Increment this number if the format changes.
-    DUMP(writer, "{\n  \"version\": 1,\n");
+    DUMP(ostream, "{\n  \"version\": 1,\n");
 
-    DUMP(writer, "  \"hasMozMallocUsableSize\": ");
+    DUMP(ostream, "  \"hasMozMallocUsableSize\": ");
 
     bool hasMozMallocUsableSize;
     GetHasMozMallocUsableSize(&hasMozMallocUsableSize);
-    DUMP(writer, hasMozMallocUsableSize ? "true" : "false");
-    DUMP(writer, ",\n");
-    DUMP(writer, "  \"reports\": ");
+    DUMP(ostream, hasMozMallocUsableSize ? "true" : "false");
+    DUMP(ostream, ",\n");
+    DUMP(ostream, "  \"reports\": ");
 
     // Process single reporters.
     bool isFirst = true;
     bool more;
     nsCOMPtr<nsISimpleEnumerator> e;
     EnumerateReporters(getter_AddRefs(e));
     while (NS_SUCCEEDED(e->HasMoreElements(&more)) && more) {
         nsCOMPtr<nsIMemoryReporter> r;
@@ -1333,56 +1071,36 @@ nsMemoryReporterManager::DumpMemoryRepor
         int64_t amount;
         rv = r->GetAmount(&amount);
         NS_ENSURE_SUCCESS(rv, rv);
 
         nsCString description;
         rv = r->GetDescription(description);
         NS_ENSURE_SUCCESS(rv, rv);
 
-        rv = DumpReport(writer, isFirst, process, path, kind, units, amount,
+        rv = DumpReport(ostream, isFirst, process, path, kind, units, amount,
                         description);
         NS_ENSURE_SUCCESS(rv, rv);
 
         isFirst = false;
     }
 
     // Process multi-reporters.
     nsCOMPtr<nsISimpleEnumerator> e2;
     EnumerateMultiReporters(getter_AddRefs(e2));
     nsRefPtr<DumpMultiReporterCallback> cb = new DumpMultiReporterCallback();
     while (NS_SUCCEEDED(e2->HasMoreElements(&more)) && more) {
       nsCOMPtr<nsIMemoryMultiReporter> r;
       e2->GetNext(getter_AddRefs(r));
-      r->CollectReports(cb, writer);
+      r->CollectReports(cb, ostream);
     }
 
-    DUMP(writer, "\n  ]\n}");
-
-    rv = writer->Finish();
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    // Rename the file, now that we're done dumping the report.  The file's
-    // ultimate destination is "memory-report<-identifier>-<pid>.json.gz".
-
-    nsCOMPtr<nsIFile> dstFile;
-    rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(dstFile));
-    NS_ENSURE_SUCCESS(rv, rv);
+    DUMP(ostream, "\n  ]\n}");
 
-    rv = dstFile->AppendNative(filename);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    rv = dstFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    nsAutoString dstFileName;
-    rv = dstFile->GetLeafName(dstFileName);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    rv = tmpFile->MoveTo(/* directory */ nullptr, dstFileName);
+    rv = ostream->Close();
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIConsoleService> cs =
         do_GetService(NS_CONSOLESERVICE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsString path;
     tmpFile->GetPath(path);
@@ -1391,78 +1109,16 @@ nsMemoryReporterManager::DumpMemoryRepor
     nsString msg =
         NS_LITERAL_STRING("nsIMemoryReporterManager::dumpReports() dumped reports to ");
     msg.Append(path);
     return cs->LogStringMessage(msg.get());
 }
 
 #undef DUMP
 
-namespace {
-
-/**
- * This runnable lets us implement nsIMemoryReporterManager::MinimizeMemoryUsage().
- * We fire a heap-minimize notification, spin the event loop, and repeat this
- * process a few times.
- *
- * When this sequence finishes, we invoke the callback function passed to the
- * runnable's constructor.
- */
-class MinimizeMemoryUsageRunnable : public nsRunnable
-{
-public:
-  MinimizeMemoryUsageRunnable(nsIRunnable* aCallback)
-    : mCallback(aCallback)
-    , mRemainingIters(sNumIters)
-  {}
-
-  NS_IMETHOD Run()
-  {
-    nsCOMPtr<nsIObserverService> os = services::GetObserverService();
-    if (!os) {
-      return NS_ERROR_FAILURE;
-    }
-
-    if (mRemainingIters == 0) {
-      os->NotifyObservers(nullptr, "after-minimize-memory-usage",
-                          NS_LITERAL_STRING("MinimizeMemoryUsageRunnable").get());
-      if (mCallback) {
-        mCallback->Run();
-      }
-      return NS_OK;
-    }
-
-    os->NotifyObservers(nullptr, "memory-pressure",
-                        NS_LITERAL_STRING("heap-minimize").get());
-    mRemainingIters--;
-    NS_DispatchToMainThread(this);
-
-    return NS_OK;
-  }
-
-private:
-  // Send sNumIters heap-minimize notifications, spinning the event
-  // loop after each notification (see bug 610166 comment 12 for an
-  // explanation), because one notification doesn't cut it.
-  static const uint32_t sNumIters = 3;
-
-  nsCOMPtr<nsIRunnable> mCallback;
-  uint32_t mRemainingIters;
-};
-
-} // anonymous namespace
-
-NS_IMETHODIMP
-nsMemoryReporterManager::MinimizeMemoryUsage(nsIRunnable* aCallback)
-{
-  nsRefPtr<MinimizeMemoryUsageRunnable> runnable =
-    new MinimizeMemoryUsageRunnable(aCallback);
-  return NS_DispatchToMainThread(runnable);
-}
-
 NS_IMPL_ISUPPORTS1(nsMemoryReporter, nsIMemoryReporter)
 
 nsMemoryReporter::nsMemoryReporter(nsACString& process,
                                    nsACString& path,
                                    int32_t kind,
                                    int32_t units,
                                    int64_t amount,
                                    nsACString& desc)
--- a/xpcom/base/nsMemoryReporterManager.h
+++ b/xpcom/base/nsMemoryReporterManager.h
@@ -41,18 +41,16 @@ class nsMemoryReporterManager : public n
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIMEMORYREPORTERMANAGER
 
     nsMemoryReporterManager();
     virtual ~nsMemoryReporterManager();
 
 private:
-    nsresult DumpMemoryReportsToFileImpl(const nsAString& aIdentifier);
-
     nsCOMArray<nsIMemoryReporter>      mReporters;
     nsCOMArray<nsIMemoryMultiReporter> mMultiReporters;
     Mutex                              mMutex;
 };
 
 #define NS_MEMORY_REPORTER_MANAGER_CID \
 { 0xfb97e4f5, 0x32dd, 0x497a, \
 { 0xba, 0xa2, 0x7d, 0x1e, 0x55, 0x7, 0x99, 0x10 } }