Interface nsIMemoryInfoDumperType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Dump GC and CC logs to files in the OS's temp directory (or in $MOZ_CC_LOG_DIRECTORY, if that environment variable is specified).

    Parameters

    • aIdentifier: string

      If aIdentifier is non-empty, this string will appear in the filenames of the logs we create (both for this process and, if aDumpChildProcesses is true, for our child processes).

      If aIdentifier is empty, the implementation may set it to an arbitrary value; for example, it may set aIdentifier to the number of seconds since the epoch.

    • aDumpAllTraces: bool

      indicates whether we should run an all-traces CC log. An all-traces log visits all objects currently eligible for cycle collection, while a non-all-traces log avoids visiting some objects which we know are reachable.

      All-traces logs are much bigger than the alternative, but they may be helpful when trying to understand why a particular object is alive. For example, a non-traces-log will skip references held by an active document; if your object is being held alive by such a document, you probably want to see those references.

    • aDumpChildProcesses: bool

      indicates whether we should call DumpGCAndCCLogsToFile in our child processes. If so, the child processes will dump their children, and so on.

    • aCallback: nsIDumpGCAndCCLogsCallback

    Returns void

  • Like |dumpGCAndCCLogsToFile|, but sends the logs to the given log sink object instead of accessing the filesystem directly, and dumps the current process only.

    Parameters

    • aDumpAllTraces: bool
    • aSink: nsICycleCollectorLogSink

    Returns void

  • Similar to dumpMemoryReportsToNamedFile, this method dumps gzipped memory reports for this process and its child processes to files in the tmp directory called memory-reports--.json.gz (or something similar, such as memory-reports---1.json.gz; no existing file will be overwritten).

    If DMD is enabled, this method also dumps gzipped DMD output for this process and its child processes to files in the tmp directory called dmd--.txt.gz (or something similar; again, no existing file will be overwritten).

    Parameters

    • aIdentifier: string

      this identifier will appear in the filename of our about:memory dump and those of our children.

      If the identifier is empty, the implementation may set it arbitrarily and use that new value for its own dump and the dumps of its child processes. For example, the implementation may set |aIdentifier| to the number of seconds since the epoch.

    • aAnonymize: boolean

      Should the reports be anonymized?

    • aMinimizeMemoryUsage: boolean

      indicates whether we should run a series of GC/CC's in an attempt to reduce our memory usage before collecting our memory report.

    Returns void

  • This dumps gzipped memory reports for this process and its child processes. If a file of the given name exists, it will be overwritten.

    Parameters

    • aFilename: string

      The output file.

    • aFinishDumping: nsIFinishDumpingCallback

      The callback called on completion.

    • aFinishDumpingData: nsISupports

      The environment for the callback.

    • aAnonymize: boolean

      Should the reports be anonymized?

    • aMinimizeMemoryUsage: boolean

      indicates whether we should run a series of GC/CC's in an attempt to reduce our memory usage before collecting our memory report.

      Sample output, annotated with comments for explanatory purposes.

      { // The version number of the format, which will be incremented each time // backwards-incompatible changes are made. A mandatory integer. "version": 1

      // Equal to nsIMemoryReporterManager::hasMozMallocUsableSize. A // mandatory boolean. "hasMozMallocUsableSize": true,

      // The memory reports. A mandatory array. "reports": [ // The properties correspond to the arguments of // nsIHandleReportCallback::callback. Every one is mandatory. {"process":"Main Process (pid 12345)", "path":"explicit/foo/bar", "kind":1, "units":0, "amount":2000000, "description":"Foo bar."}, {"process":"Main Process (pid 12345)", "path":"heap-allocated", "kind":1, "units":0, "amount":3000000, "description":"Heap allocated."}, {"process":"Main Process (pid 12345)", "path":"vsize", "kind":1, "units":0, "amount":10000000, "description":"Vsize."} ] }

    Returns void

Generated using TypeDoc