DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (b6057e17f856)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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 nsIVisualEventTracerLog;

/**
 * Interface to control the visual event tracer feature.  The result
 * is a log of various events that are monitored by a custom code
 * instrumentation around the mozilla code base.
 */

[builtinclass, scriptable, uuid(713ee3ca-95e0-4085-8616-f6d64a9508ad)]
interface nsIVisualEventTracer : nsISupports
{
  /**
   * Start the logging now.  No affect if already started.
   * Current backlog is deleted by this call otherwise.
   *
   * @param minBacklogSeconds
   *    Manimum time to keep the backlog.  Entries of the log are discarded
   *    when their age is more then value of this argument.
   */
  void start(in unsigned long minBacklogSeconds);

  /**
   * Stop the logging now.  Backlog is kept in memory.
   */
  void stop();

  /**
   * Obtain the log.  This can be called whenever you want.
   *
   * @return
   *    Result is an object that keeps snaphot of the log from
   *    time this method has been called.  You can then access
   *    the log using the object.  Calling stop() on the tracer
   *    doesn't delete this log.
   */
  nsIVisualEventTracerLog snapshot();
};

[builtinclass, scriptable, uuid(8ec6e36d-6cba-400b-bcd6-454679f5f75a)]
interface nsIVisualEventTracerLog : nsISupports
{
  /**
   * JSON string of the log.  Use JSON.parse to get it as an object.
   */
  readonly attribute ACString JSONString;

  /**
   * Write the JSON string returned by JSONString to the log defined by
   * the environment variable MOZ_PROFILING_FILE.
   */
  void writeToProfilingFile();
};