Bug 694033 - Add Telemetry probes for windows which have had mutation event listeners, r=taras

--HG--
extra : rebase_source : 418c83dd2aad924a3e718f2b084f211e2bd3f31e
This commit is contained in:
Olli Pettay 2011-10-14 20:40:12 +03:00
parent fe5eea5a3e
commit ef738c920a
2 changed files with 8 additions and 0 deletions

View File

@ -1009,6 +1009,9 @@ nsGlobalWindow::~nsGlobalWindow()
PR_REMOVE_AND_INIT_LINK(w);
}
} else {
Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS,
mMutationBits ? 1 : 0);
if (mListenerManager) {
mListenerManager->Disconnect();
mListenerManager = nsnull;
@ -2365,6 +2368,9 @@ nsGlobalWindow::InnerSetNewDocument(nsIDocument* aDocument)
mLastOpenedURI = aDocument->GetDocumentURI();
#endif
Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS,
mMutationBits ? 1 : 0);
// Clear our mutation bitfield.
mMutationBits = 0;

View File

@ -233,3 +233,5 @@ HISTOGRAM(THUNDERBIRD_GLODA_SIZE_MB, 1, 1000, 40, LINEAR, "Gloda: size of global
HISTOGRAM(THUNDERBIRD_CONVERSATIONS_TIME_TO_2ND_GLODA_QUERY_MS, 1, 10000, 30, EXPONENTIAL, "Conversations: time between the moment we click and the second gloda query returns (ms)")
HISTOGRAM(THUNDERBIRD_INDEXING_RATE_MSG_PER_S, 1, 100, 20, LINEAR, "Gloda: indexing rate (message/s)")
#endif
HISTOGRAM(INNERWINDOWS_WITH_MUTATION_LISTENERS, 0, 1, 2, BOOLEAN, "Deleted or to-be-reused innerwindow which has had mutation event listeners.")