Electrolysis/Release Criteria/Slow Script
Jump to navigation
Jump to search
e10s must not cause the slow-script dialog to appear more often
- a/b testing on beta should indicate that the slow script dialog appears no more often than before
RASCI:
- Responsible: azhang
- Accountable: bsmedberg
- Supporting:
- Consulted:
- Informed: cpeterson, elan
Technical details:
- The slow script timeout will not change with e10s
- SLOW_SCRIPT_NOTICE_COUNT is the telemetry histogram
Links:
- bug 1249978 - [e10s] SLOW_SCRIPT_NOTICE_COUNT regressed in beta experiment
- https://gist.github.com/Uberi/f8591cf68aab36bbb758 - notebook prepared by azhang
- bug 1182638 - [e10s][telemetry] slow-script dialog appears twice as often in e10s vs non-e10s
Analysis results: SLOW_SCRIPT_NOTICE_COUNT shows up significantly more often in e10s. Analysis was reviewed by: rvitillo
How slow script notice count works on non-e10s:
- nsGlobalWindow::ShowSlowScriptDialog accumulates the SLOW_SCRIPT_NOTICE_COUNT histogram (https://dxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#10677)
How slow script notice count works on e10s:
- [CHILD] nsGlobalWindow::ShowSlowScriptDialog sends a slow script notification via ProcessHangMonitor::NotifySlowScript (https://dxr.mozilla.org/mozilla-central/source/dom/base/nsGlobalWindow.cpp#10652)
- [CHILD] HangMonitorChild::NotifySlowScript invokes HangMonitorChild::NotifySlowScriptAsync to send out the slow script notice (https://dxr.mozilla.org/mozilla-central/source/dom/ipc/ProcessHangMonitor.cpp#352)
- [CHILD] PProcessHangMonitorChild::SendHangEvidence invokes PProcessHangMonitorParent::OnMessageReceived via IPC (https://dxr.mozilla.org/mozilla-central/source/obj-x86_64-unknown-linux-gnu/ipc/ipdl/PProcessHangMonitorChild.cpp#108)
- [PARENT] HangMonitorParent::RecvHangEvidence is called when PProcessHangMonitorParent receives a message from the child process (https://dxr.mozilla.org/mozilla-central/source/obj-x86_64-unknown-linux-gnu/ipc/ipdl/PProcessHangMonitorParent.cpp#288)
- [PARENT] HangMonitorParent::RecvHangEvidence sends out a "process-hang-report" event by creating a HangObserverNotifier task (https://dxr.mozilla.org/mozilla-central/source/dom/ipc/ProcessHangMonitor.cpp#610)
- [PARENT] ProcessHangMonitor.reportHang is called when the ProcessHangMonitor receives a "process-hang-report" event (https://dxr.mozilla.org/mozilla-central/source/browser/modules/ProcessHangMonitor.jsm#66)
- [PARENT] JS function ProcessHangMonitor.reportHang accumulates the SLOW_SCRIPT_NOTICE_COUNT histogram (https://dxr.mozilla.org/mozilla-central/source/browser/modules/ProcessHangMonitor.jsm#403)
- I've checked that this is currently the only code path that results in SLOW_SCRIPT_NOTICE_COUNT being incremented.
Have we tested the metric to make sure it's working properly in e10s?
- There should be no differences in the slow script reporting mechanism between e10s and non-e10s; 1 call to ShowSlowScriptDialog means 1 addition to the histogram regardless of e10s setting. Manual testing supports this.
- The timeout has changed from 2 to 10 in e10s builds (see https://hg.mozilla.org/mozilla-central/rev/63680efe6d55#l35.12 for before and https://hg.mozilla.org/mozilla-central/rev/5002e9c06365#l2.13 for after). :azhang is currently investigating this.