Bug 1417107 - Use histogram key suffix 'unlabeled' instead of 'labeled'. r=erahm

Make unlabeled runnables be the runnables we tag with extra
information, since they're the ones we want to decrease.

Note: This changes values gathered for telemetry!
This commit is contained in:
Andreas Farre 2017-11-14 20:52:32 +01:00
parent dccb7bcf7c
commit 54b84f70d3
3 changed files with 9 additions and 4 deletions

View File

@ -13199,7 +13199,7 @@
},
"MAIN_THREAD_RUNNABLE_MS": {
"record_in_processes": ["main", "content", "gpu"],
"alert_emails": ["wmccloskey@mozilla.com"],
"alert_emails": ["wmccloskey@mozilla.com", "farre@mozilla.com"],
"expires_in_version": "60",
"kind": "exponential",
"keyed": true,

View File

@ -378,7 +378,6 @@ SchedulerGroup::Runnable::GetName(nsACString& aName)
aName.AssignLiteral("anonymous");
}
aName.AppendASCII("(labeled)");
return NS_OK;
}

View File

@ -884,7 +884,9 @@ void canary_alarm_handler(int signum)
#ifndef RELEASE_OR_BETA
static bool
GetLabeledRunnableName(nsIRunnable* aEvent, nsACString& aName)
GetLabeledRunnableName(nsIRunnable* aEvent,
nsACString& aName,
EventPriority aPriority)
{
bool labeled = false;
if (RefPtr<SchedulerGroup::Runnable> groupRunnable = do_QueryObject(aEvent)) {
@ -899,6 +901,10 @@ GetLabeledRunnableName(nsIRunnable* aEvent, nsACString& aName)
aName.AssignLiteral("anonymous runnable");
}
if (!labeled && aPriority > EventPriority::Input) {
aName.AppendLiteral("(unlabeled)");
}
return labeled;
}
#endif
@ -979,7 +985,7 @@ nsThread::ProcessNextEvent(bool aMayWait, bool* aResult)
nsAutoCString name;
if ((MAIN_THREAD == mIsMainThread) || mNextIdleDeadline) {
bool labeled = GetLabeledRunnableName(event, name);
bool labeled = GetLabeledRunnableName(event, name, priority);
if (MAIN_THREAD == mIsMainThread) {
timer.emplace(name);