michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: [scriptable, uuid(d64e01e1-603f-4478-bb9e-47d502f23f7b)] michael@0: interface nsIProfiler : nsISupports michael@0: { michael@0: void StartProfiler(in uint32_t aEntries, in double aInterval, michael@0: [array, size_is(aFeatureCount)] in string aFeatures, michael@0: in uint32_t aFeatureCount, michael@0: [array, size_is(aFilterCount), optional] in string aThreadNameFilters, michael@0: [optional] in uint32_t aFilterCount); michael@0: void StopProfiler(); michael@0: boolean IsPaused(); michael@0: void PauseSampling(); michael@0: void ResumeSampling(); michael@0: void AddMarker(in string aMarker); michael@0: string GetProfile(); michael@0: [implicit_jscontext] michael@0: jsval getProfileData(); michael@0: boolean IsActive(); michael@0: void GetResponsivenessTimes(out uint32_t aCount, [retval, array, size_is(aCount)] out double aResult); michael@0: void GetFeatures(out uint32_t aCount, [retval, array, size_is(aCount)] out string aFeatures); michael@0: michael@0: /** michael@0: * Returns a JSON string of an array of shared library objects. michael@0: * Every object has three properties: start, end, and name. michael@0: * start and end are integers describing the address range that the library michael@0: * occupies in memory. name is the path of the library as a string. michael@0: * michael@0: * On Windows profiling builds, the shared library objects will have michael@0: * additional pdbSignature and pdbAge properties for uniquely identifying michael@0: * shared library versions for stack symbolication. michael@0: */ michael@0: AString getSharedLibraryInformation(); michael@0: }; michael@0: