mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 22:35:43 +00:00
Bug 1360471 (part 3) - Rename various "thread name filters" identifiers as "filters". r=mstange.
The new names are more concise and matches common usage elsewhere (e.g. profiler_start() arguments). This patch is similar to bug 1358074 part 5.
This commit is contained in:
parent
ebe44f1856
commit
cc78872f8c
@ -2575,15 +2575,14 @@ ContentChild::RecvStartProfiler(const ProfilerInitParams& params)
|
||||
featureArray.AppendElement(params.features()[i].get());
|
||||
}
|
||||
|
||||
nsTArray<const char*> threadNameFilterArray;
|
||||
for (size_t i = 0; i < params.threadFilters().Length(); ++i) {
|
||||
threadNameFilterArray.AppendElement(params.threadFilters()[i].get());
|
||||
nsTArray<const char*> filterArray;
|
||||
for (size_t i = 0; i < params.filters().Length(); ++i) {
|
||||
filterArray.AppendElement(params.filters()[i].get());
|
||||
}
|
||||
|
||||
profiler_start(params.entries(), params.interval(),
|
||||
featureArray.Elements(), featureArray.Length(),
|
||||
threadNameFilterArray.Elements(),
|
||||
threadNameFilterArray.Length());
|
||||
filterArray.Elements(), filterArray.Length());
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -2664,14 +2664,14 @@ PluginModuleChild::RecvStartProfiler(const ProfilerInitParams& params)
|
||||
featureArray.AppendElement(params.features()[i].get());
|
||||
}
|
||||
|
||||
nsTArray<const char*> threadNameFilterArray;
|
||||
for (size_t i = 0; i < params.threadFilters().Length(); ++i) {
|
||||
threadNameFilterArray.AppendElement(params.threadFilters()[i].get());
|
||||
nsTArray<const char*> filterArray;
|
||||
for (size_t i = 0; i < params.filters().Length(); ++i) {
|
||||
filterArray.AppendElement(params.filters()[i].get());
|
||||
}
|
||||
|
||||
profiler_start(params.entries(), params.interval(),
|
||||
featureArray.Elements(), featureArray.Length(),
|
||||
threadNameFilterArray.Elements(), threadNameFilterArray.Length());
|
||||
filterArray.Elements(), filterArray.Length());
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -394,14 +394,13 @@ GPUParent::RecvStartProfiler(const ProfilerInitParams& params)
|
||||
featureArray.AppendElement(params.features()[i].get());
|
||||
}
|
||||
|
||||
nsTArray<const char*> threadNameFilterArray;
|
||||
for (size_t i = 0; i < params.threadFilters().Length(); ++i) {
|
||||
threadNameFilterArray.AppendElement(params.threadFilters()[i].get());
|
||||
nsTArray<const char*> filterArray;
|
||||
for (size_t i = 0; i < params.filters().Length(); ++i) {
|
||||
filterArray.AppendElement(params.filters()[i].get());
|
||||
}
|
||||
profiler_start(params.entries(), params.interval(),
|
||||
featureArray.Elements(), featureArray.Length(),
|
||||
threadNameFilterArray.Elements(),
|
||||
threadNameFilterArray.Length());
|
||||
filterArray.Elements(), filterArray.Length());
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -2065,7 +2065,7 @@ profiler_init(void* aStackTop)
|
||||
, "threads"
|
||||
};
|
||||
|
||||
const char* threadFilters[] = { "GeckoMain", "Compositor" };
|
||||
const char* filters[] = { "GeckoMain", "Compositor" };
|
||||
|
||||
if (getenv("MOZ_PROFILER_HELP")) {
|
||||
PrintUsageThenExit(0); // terminates execution
|
||||
@ -2131,14 +2131,14 @@ profiler_init(void* aStackTop)
|
||||
|
||||
locked_profiler_start(lock, entries, interval,
|
||||
features, MOZ_ARRAY_LENGTH(features),
|
||||
threadFilters, MOZ_ARRAY_LENGTH(threadFilters));
|
||||
filters, MOZ_ARRAY_LENGTH(filters));
|
||||
}
|
||||
|
||||
// We do this with gPSMutex unlocked. The comment in profiler_stop() explains
|
||||
// why.
|
||||
NotifyProfilerStarted(PROFILER_DEFAULT_ENTRIES, PROFILER_DEFAULT_INTERVAL,
|
||||
features, MOZ_ARRAY_LENGTH(features),
|
||||
threadFilters, MOZ_ARRAY_LENGTH(threadFilters));
|
||||
filters, MOZ_ARRAY_LENGTH(filters));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -105,7 +105,7 @@ CrossProcessProfilerController::StartProfiler(nsIProfilerStartParams* aParams)
|
||||
aParams->GetEntries(&ipcParams.entries());
|
||||
aParams->GetInterval(&ipcParams.interval());
|
||||
ipcParams.features() = aParams->GetFeatures();
|
||||
ipcParams.threadFilters() = aParams->GetThreadFilterNames();
|
||||
ipcParams.filters() = aParams->GetFilters();
|
||||
|
||||
mProcess->SendStartProfiler(ipcParams);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ struct ProfilerInitParams {
|
||||
bool enabled;
|
||||
uint32_t entries;
|
||||
double interval;
|
||||
nsCString[] threadFilters;
|
||||
nsCString[] filters;
|
||||
nsCString[] features;
|
||||
};
|
||||
|
||||
|
@ -24,7 +24,7 @@ interface nsIProfilerStartParams : nsISupports
|
||||
readonly attribute double interval;
|
||||
|
||||
[noscript, notxpcom, nostdcall] StringArrayRef getFeatures();
|
||||
[noscript, notxpcom, nostdcall] StringArrayRef getThreadFilterNames();
|
||||
[noscript, notxpcom, nostdcall] StringArrayRef getFilters();
|
||||
};
|
||||
|
||||
[scriptable, uuid(ead3f75c-0e0e-4fbb-901c-1e5392ef5b2a)]
|
||||
@ -34,7 +34,7 @@ interface nsIProfiler : nsISupports
|
||||
void StartProfiler(in uint32_t aEntries, in double aInterval,
|
||||
[array, size_is(aFeatureCount)] in string aFeatures,
|
||||
in uint32_t aFeatureCount,
|
||||
[array, size_is(aFilterCount), optional] in string aThreadNameFilters,
|
||||
[array, size_is(aFilterCount), optional] in string aFilters,
|
||||
[optional] in uint32_t aFilterCount);
|
||||
void StopProfiler();
|
||||
boolean IsPaused();
|
||||
|
@ -96,15 +96,14 @@ nsProfiler::CanProfile(bool *aCanProfile)
|
||||
NS_IMETHODIMP
|
||||
nsProfiler::StartProfiler(uint32_t aEntries, double aInterval,
|
||||
const char** aFeatures, uint32_t aFeatureCount,
|
||||
const char** aThreadNameFilters, uint32_t aFilterCount)
|
||||
const char** aFilters, uint32_t aFilterCount)
|
||||
{
|
||||
if (mLockedForPrivateBrowsing) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
profiler_start(aEntries, aInterval,
|
||||
aFeatures, aFeatureCount,
|
||||
aThreadNameFilters, aFilterCount);
|
||||
aFeatures, aFeatureCount, aFilters, aFilterCount);
|
||||
|
||||
// Do this after profiler_start().
|
||||
mGatherer = new ProfileGatherer();
|
||||
|
@ -10,11 +10,11 @@ NS_IMPL_ISUPPORTS(nsProfilerStartParams, nsIProfilerStartParams)
|
||||
nsProfilerStartParams::nsProfilerStartParams(uint32_t aEntries,
|
||||
double aInterval,
|
||||
const nsTArray<nsCString>& aFeatures,
|
||||
const nsTArray<nsCString>& aThreadFilterNames) :
|
||||
const nsTArray<nsCString>& aFilters) :
|
||||
mEntries(aEntries),
|
||||
mInterval(aInterval),
|
||||
mFeatures(aFeatures),
|
||||
mThreadFilterNames(aThreadFilterNames)
|
||||
mFilters(aFilters)
|
||||
{
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ nsProfilerStartParams::GetFeatures()
|
||||
}
|
||||
|
||||
const nsTArray<nsCString>&
|
||||
nsProfilerStartParams::GetThreadFilterNames()
|
||||
nsProfilerStartParams::GetFilters()
|
||||
{
|
||||
return mThreadFilterNames;
|
||||
return mFilters;
|
||||
}
|
||||
|
@ -19,14 +19,14 @@ public:
|
||||
nsProfilerStartParams(uint32_t aEntries,
|
||||
double aInterval,
|
||||
const nsTArray<nsCString>& aFeatures,
|
||||
const nsTArray<nsCString>& aThreadFilterNames);
|
||||
const nsTArray<nsCString>& aFilters);
|
||||
|
||||
private:
|
||||
virtual ~nsProfilerStartParams();
|
||||
uint32_t mEntries;
|
||||
double mInterval;
|
||||
nsTArray<nsCString> mFeatures;
|
||||
nsTArray<nsCString> mThreadFilterNames;
|
||||
nsTArray<nsCString> mFilters;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -175,7 +175,7 @@ PROFILER_FUNC_VOID(profiler_shutdown())
|
||||
PROFILER_FUNC_VOID(profiler_start(int aEntries, double aInterval,
|
||||
const char** aFeatures,
|
||||
uint32_t aFeatureCount,
|
||||
const char** aThreadNameFilters,
|
||||
const char** aFilters,
|
||||
uint32_t aFilterCount))
|
||||
|
||||
// Stop the profiler and discard the profile without saving it. A no-op if the
|
||||
|
Loading…
Reference in New Issue
Block a user