Struct xpcom::interfaces::nsIMemoryInfoDumper
[−]
[src]
#[repr(C)]pub struct nsIMemoryInfoDumper { /* fields omitted */ }
interface nsIMemoryInfoDumper : nsISupports
Methods
impl nsIMemoryInfoDumper
[src]
pub fn coerce<T: nsIMemoryInfoDumperCoerce>(&self) -> &T
[src]
Cast this nsIMemoryInfoDumper
to one of its base interfaces.
impl nsIMemoryInfoDumper
[src]
pub unsafe fn DumpMemoryReportsToNamedFile(
&self,
aFilename: &nsAString,
aFinishDumping: *const nsIFinishDumpingCallback,
aFinishDumpingData: *const nsISupports,
aAnonymize: bool
) -> nsresult
[src]
&self,
aFilename: &nsAString,
aFinishDumping: *const nsIFinishDumpingCallback,
aFinishDumpingData: *const nsISupports,
aAnonymize: bool
) -> nsresult
/**
* This dumps gzipped memory reports for this process and its child
* processes. If a file of the given name exists, it will be overwritten.
*
* @param aFilename The output file.
*
* @param aFinishDumping The callback called on completion.
*
* @param aFinishDumpingData The environment for the callback.
*
* @param aAnonymize Should the reports be anonymized?
*
* 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."}
* ]
* }
*/
void dumpMemoryReportsToNamedFile (in AString aFilename, in nsIFinishDumpingCallback aFinishDumping, in nsISupports aFinishDumpingData, in boolean aAnonymize);
pub unsafe fn DumpMemoryInfoToTempDir(
&self,
aIdentifier: &nsAString,
aAnonymize: bool,
aMinimizeMemoryUsage: bool
) -> nsresult
[src]
&self,
aIdentifier: &nsAString,
aAnonymize: bool,
aMinimizeMemoryUsage: bool
) -> nsresult
/**
* 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-<identifier>-<pid>.json.gz (or something
* similar, such as memory-reports-<identifier>-<pid>-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-<identifier>-<pid>.txt.gz (or something similar; again, no existing
* file will be overwritten).
*
* @param aIdentifier 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.
*
* @param aAnonymize Should the reports be anonymized?
*
* @param aMinimizeMemoryUsage indicates whether we should run a series of
* gc/cc's in an attempt to reduce our memory usage before collecting our
* memory report.
*/
void dumpMemoryInfoToTempDir (in AString aIdentifier, in boolean aAnonymize, in boolean aMinimizeMemoryUsage);
pub unsafe fn DumpGCAndCCLogsToFile(
&self,
aIdentifier: &nsAString,
aDumpAllTraces: bool,
aDumpChildProcesses: bool,
aCallback: *const nsIDumpGCAndCCLogsCallback
) -> nsresult
[src]
&self,
aIdentifier: &nsAString,
aDumpAllTraces: bool,
aDumpChildProcesses: bool,
aCallback: *const nsIDumpGCAndCCLogsCallback
) -> nsresult
/**
* 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).
*
* @param aIdentifier 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.
*
* @param aDumpAllTraces 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.
*
* @param aDumpChildProcesses indicates whether we should call
* DumpGCAndCCLogsToFile in our child processes. If so, the child processes
* will dump their children, and so on.
*
*/
void dumpGCAndCCLogsToFile (in AString aIdentifier, in bool aDumpAllTraces, in bool aDumpChildProcesses, in nsIDumpGCAndCCLogsCallback aCallback);
pub unsafe fn DumpGCAndCCLogsToSink(
&self,
aDumpAllTraces: bool,
aSink: *const nsICycleCollectorLogSink
) -> nsresult
[src]
&self,
aDumpAllTraces: bool,
aSink: *const nsICycleCollectorLogSink
) -> nsresult
/**
* Like |dumpGCAndCCLogsToFile|, but sends the logs to the given log
* sink object instead of accessing the filesystem directly, and
* dumps the current process only.
*/
void dumpGCAndCCLogsToSink (in bool aDumpAllTraces, in nsICycleCollectorLogSink aSink);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIMemoryInfoDumper
[src]
const IID: nsIID
IID: nsIID = nsID(1213471604, 18414, 19042, [149, 87, 127, 75, 128, 155, 218, 92])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIMemoryInfoDumper
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIMemoryInfoDumper
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.