Bug 1079322 - Extract properties using libc functions. r=gwagner
[gecko.git] / tools / profiler / nsIProfiler.idl
blob5a71d06073225190a45c7d086062d7b224bda828
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 [scriptable, uuid(f7f3709c-04a9-45c6-8e34-40f762654a78)]
9 interface nsIProfiler : nsISupports
11 void StartProfiler(in uint32_t aEntries, in double aInterval,
12 [array, size_is(aFeatureCount)] in string aFeatures,
13 in uint32_t aFeatureCount,
14 [array, size_is(aFilterCount), optional] in string aThreadNameFilters,
15 [optional] in uint32_t aFilterCount);
16 void StopProfiler();
17 boolean IsPaused();
18 void PauseSampling();
19 void ResumeSampling();
20 void AddMarker(in string aMarker);
21 string GetProfile();
22 [implicit_jscontext]
23 jsval getProfileData();
24 boolean IsActive();
25 void GetFeatures(out uint32_t aCount, [retval, array, size_is(aCount)] out string aFeatures);
27 /**
28 * Returns a JSON string of an array of shared library objects.
29 * Every object has three properties: start, end, and name.
30 * start and end are integers describing the address range that the library
31 * occupies in memory. name is the path of the library as a string.
33 * On Windows profiling builds, the shared library objects will have
34 * additional pdbSignature and pdbAge properties for uniquely identifying
35 * shared library versions for stack symbolication.
37 AString getSharedLibraryInformation();