Interface nsIProfilerType

Hierarchy

Properties

activeConfiguration: any

Returns a JavaScript object that contains a description of the currently configured state of the profiler when the profiler is active. This can be useful to assert the UI of the profiler's recording panel in tests. It returns null when the profiler is not active.

sharedLibraries: any

Contains an array of shared library objects. Every object has the properties:

  • start: The start address of the memory region occupied by this library.
  • end: The end address of the memory region occupied by this library.
  • offset: Usually zero, except on Linux / Android if the first mapped section of the library has been mapped to an address that's different from the library's base address. Then offset = start - baseAddress.
  • name: The name (file basename) of the binary.
  • path: The full absolute path to the binary.
  • debugName: On Windows, the name of the pdb file for the binary. On other platforms, the same as |name|.
  • debugPath: On Windows, the full absolute path of the pdb file for the binary. On other platforms, the same as |path|.
  • arch: On Mac, the name of the architecture that identifies the right binary image of a fat binary. Example values are "i386", "x86_64", and "x86_64h". (x86_64h is used for binaries that contain instructions that are specific to the Intel Haswell microarchitecture.) On non-Mac platforms, arch is "".
  • breakpadId: A unique identifier string for this library, as used by breakpad.

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

  • Clear all registered and unregistered page information in prifiler.

    Returns void

  • Parameters

    • aCurrentPosition: uint32_t
    • aTotalSize: uint32_t
    • aGeneration: uint32_t

    Returns void

  • Returns the JSON string of the profile. If aSinceTime is passed, only report samples taken at >= aSinceTime.

    Parameters

    • aSinceTime: number

    Returns string

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns any

  • Returns any

  • 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

  • Returns any

  • Returns any

  • Control functions return as soon as this process' profiler has done its work. The returned promise gets resolved when sub-processes have completed their operation, or immediately if there are no sub-processes.

    Parameters

    • aEntries: uint32_t
    • aInterval: number
    • aFeatures: invalid
    • aFilters: invalid
    • aActiveTabID: uint64_t
    • aDuration: number

    Returns any

  • Returns any

  • Synchronously dump the profile collected so far in this process to a file. This profile will only contain data from the parent process, and from child processes that have ended during the session; other currently-live processes are ignored. aFilename may be a full path, or a path relative to where Firefox was launched. The target directory must already exist.

    Parameters

    • aFilename: string

    Returns void

  • Asynchronously dump the profile collected so far to a file. Returns a promise that resolves once the file has been written, with data from all responsive Firefox processes. Note: This blocks the parent process while collecting its own data, then unblocks while child processes data is being collected. aFilename may be a full path, or a path relative to where Firefox was launched. The target directory must already exist.

    Parameters

    • aFilename: string
    • aSinceTime: number

    Returns any

  • Returns the elapsed time, in milliseconds, since the profiler's epoch. The epoch is guaranteed to be constant for the duration of the process, but is otherwise arbitrary.

    Returns number

  • Returns a JS object of the profile. If aSinceTime is passed, only report samples taken at >= aSinceTime.

    Parameters

    • aSinceTime: number

    Returns any

  • Parameters

    • aSinceTime: number

    Returns any

  • Parameters

    • aSinceTime: number

    Returns any

  • Parameters

    • aSinceTime: number

    Returns ProfileDataBufferMozPromise

  • Parameters

    • aSinceTime: number

    Returns any

  • Returns a promise that resolves to a SymbolTableAsTuple for the binary at the given path.

    SymbolTable as tuple: [addrs, index, buffer] Contains a symbol table, which can be used to map addresses to strings.

    The first element of this tuple, commonly named "addrs", is a sorted array of symbol addresses, as library-relative offsets in bytes, in ascending order. The third element of this tuple, commonly named "buffer", is a buffer of bytes that contains all strings from this symbol table, in the order of the addresses they correspond to, in utf-8 encoded form, all concatenated together. The second element of this tuple, commonly named "index", contains positions into "buffer". For every address, that position is where the string for that address starts in the buffer. index.length == addrs.length + 1. index[addrs.length] is the end position of the last string in the buffer.

    The string for the address addrs[i] is (new TextDecoder()).decode(buffer.subarray(index[i], index[i + 1]))

    Parameters

    • aDebugPath: string
    • aBreakpadID: string

    Returns any

  • Resolves the returned promise after at least one full periodic sampling in each process. Rejects the promise if sampler is not running (yet, or anymore, or paused) in the parent process. This is mainly useful in tests, to wait just long enough to guarantee that at least one sample was taken in each process.

    Returns any

Generated using TypeDoc