Closed
Bug 1133521
Opened 10 years ago
Closed 10 years ago
Enable BHR on Beta
Categories
(Toolkit :: Telemetry, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
People
(Reporter: rvitillo, Assigned: rvitillo)
References
Details
Attachments
(3 files, 7 obsolete files)
15.14 KB,
patch
|
Details | Diff | Splinter Review | |
15.00 KB,
patch
|
lmandel
:
approval-mozilla-beta-
|
Details | Diff | Splinter Review |
15.06 KB,
patch
|
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
We would like to enable BHR on Beta for about 1% of the population, that should give us enough data without overloading our backend infrastructure.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8565066 -
Flags: review?(nchen)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → rvitillo
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8565066 -
Attachment is obsolete: true
Attachment #8565066 -
Flags: review?(nchen)
Attachment #8565364 -
Flags: review?(nchen)
Assignee | ||
Updated•10 years ago
|
Attachment #8565364 -
Flags: review?(nchen) → review?(vdjeric)
Comment 3•10 years ago
|
||
Comment on attachment 8565364 [details] [diff] [review]
1133521
Review of attachment 8565364 [details] [diff] [review]:
-----------------------------------------------------------------
::: xpcom/threads/BackgroundHangMonitor.cpp
@@ +453,5 @@
> return nullptr;
> }
>
> +bool
> +BackgroundHangMonitor::ShouldDisableOnBeta(nsAdoptingCString &clientID) {
why nsAdoptingCString& ? why not const nsCString& ?
@@ +456,5 @@
> +bool
> +BackgroundHangMonitor::ShouldDisableOnBeta(nsAdoptingCString &clientID) {
> + MOZ_ASSERT(clientID, "clientID is null");
> + const char *suffix = clientID.get() + clientID.Length() - 4;
> + return strtol(suffix, NULL, 16) % 100; // Activate BHR only for ~ 1% of the Beta population
make the 1% a define at the top of the file
@@ +464,5 @@
> +BackgroundHangMonitor::IsDisabled() {
> +#ifdef MOZ_ENABLE_BACKGROUND_HANG_MONITOR
> + return BackgroundHangManager::sDisabled;
> +#else
> + return true
missing semi-colon
@@ +487,5 @@
> MOZ_ASSERT(!BackgroundHangManager::sInstance, "Already initialized");
> +
> + if (NS_STRINGIFY(MOZ_UPDATE_CHANNEL) == "beta") {
> + auto clientID = Preferences::GetCString("toolkit.telemetry.cachedClientID");
> + if (clientID && BackgroundHangMonitor::ShouldDisableOnBeta(clientID)) {
What happens when the user opts-out of FHR collection during the first session or resets their profile? I think clientID would never get set, thus enabling BHR during all future sessions?
::: xpcom/threads/BackgroundHangMonitor.h
@@ +110,5 @@
> private:
> RefPtr<BackgroundHangThread> mThread;
>
> + static void PrefCallback(const char *, void *);
> + static bool ShouldDisableOnBeta(nsAdoptingCString &);
nit: ShouldEnableOnBeta? see next comment
Attachment #8565364 -
Flags: review?(vdjeric)
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Vladan Djeric (:vladan) -- please needinfo! from comment #3)
> Comment on attachment 8565364 [details] [diff] [review]
> 1133521
>
> Review of attachment 8565364 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: xpcom/threads/BackgroundHangMonitor.cpp
> @@ +453,5 @@
> > return nullptr;
> > }
> >
> > +bool
> > +BackgroundHangMonitor::ShouldDisableOnBeta(nsAdoptingCString &clientID) {
>
> why nsAdoptingCString& ? why not const nsCString& ?
Preferences::GetCString returns a nsAdoptingCString.
> @@ +487,5 @@
> > MOZ_ASSERT(!BackgroundHangManager::sInstance, "Already initialized");
> > +
> > + if (NS_STRINGIFY(MOZ_UPDATE_CHANNEL) == "beta") {
> > + auto clientID = Preferences::GetCString("toolkit.telemetry.cachedClientID");
> > + if (clientID && BackgroundHangMonitor::ShouldDisableOnBeta(clientID)) {
>
> What happens when the user opts-out of FHR collection during the first
> session or resets their profile? I think clientID would never get set, thus
> enabling BHR during all future sessions?
Good point. I addressed this in the updated patch.
> ::: xpcom/threads/BackgroundHangMonitor.h
> @@ +110,5 @@
> > private:
> > RefPtr<BackgroundHangThread> mThread;
> >
> > + static void PrefCallback(const char *, void *);
> > + static bool ShouldDisableOnBeta(nsAdoptingCString &);
>
> nit: ShouldEnableOnBeta? see next comment
Which comment?
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8565364 -
Attachment is obsolete: true
Attachment #8566461 -
Flags: review?(vdjeric)
Comment 6•10 years ago
|
||
> > why nsAdoptingCString& ? why not const nsCString& ?
>
> Preferences::GetCString returns a nsAdoptingCString.
I think Adopting[C]Strings are internal types used only for return types, so they're not used in function parameters. This method will only be called with the return values from Preferences::GetString() but it should still accept any CString.
> > nit: ShouldEnableOnBeta? see next comment
>
> Which comment?
I had written a commment (and then deleted it) about having BHR default to disabled on Beta, and then only enabling it after we get the clientID and confirm the client is one of the 1%. But I changed my mind about that
Comment 7•10 years ago
|
||
Comment on attachment 8566461 [details] [diff] [review]
1133521
Review of attachment 8566461 [details] [diff] [review]:
-----------------------------------------------------------------
::: xpcom/threads/BackgroundHangMonitor.cpp
@@ +34,3 @@
> namespace mozilla {
>
> +class Observer : public nsIObserver
Wouldn't it be simpler to have BackgroundHangManager inherit from nsIObserver instead?
Attachment #8566461 -
Flags: review?(vdjeric)
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8566461 -
Attachment is obsolete: true
Attachment #8569152 -
Flags: review?(vdjeric)
Updated•10 years ago
|
Attachment #8569152 -
Flags: review?(vdjeric) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8569152 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 10•10 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 11•10 years ago
|
||
Backed out for bustage.
https://hg.mozilla.org/integration/fx-team/rev/e38e66a9b55d
https://treeherder.mozilla.org/logviewer.html#?job_id=2120552&repo=fx-team
Whiteboard: [fixed-in-fx-team]
Assignee | ||
Comment 12•10 years ago
|
||
Attachment #8570429 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 13•10 years ago
|
||
Hi, this failed to apply:
patching file toolkit/components/telemetry/Telemetry.cpp
Hunk #1 FAILED at 2898
1 out of 1 hunks FAILED -- saving rejects to file toolkit/components/telemetry/Telemetry.cpp.rej
patch failed, unable to continue (try -v)
could you take a look, thanks!
Flags: needinfo?(rvitillo)
Keywords: checkin-needed
Assignee | ||
Comment 14•10 years ago
|
||
Attachment #8571369 -
Attachment is obsolete: true
Flags: needinfo?(rvitillo)
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 15•10 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 16•10 years ago
|
||
sorry had to back this out for causing crashes like https://treeherder.mozilla.org/logviewer.html#?job_id=2176938&repo=fx-team on android
Whiteboard: [fixed-in-fx-team]
Updated•10 years ago
|
Flags: needinfo?(rvitillo)
Comment 17•10 years ago
|
||
This caused widespread problems across multiple platforms. Please run a full Try push across all platforms before attempting to re-land.
Assignee | ||
Comment 19•10 years ago
|
||
Seems the issue was that BHR was getting enabled also on Debug builds.
Attachment #8571952 -
Attachment is obsolete: true
Assignee | ||
Comment 20•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 21•10 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla39
Assignee | ||
Comment 23•10 years ago
|
||
Approval Request Comment
[Feature/regressing bug #]: 1133521
[User impact if declined]: None
[Describe test coverage new/current, TreeHerder]: landed on m-c on March-10 with tests
[Risks and why]: Browser might be slightly less power friendly for a small fraction of the population that is going to have BHR enabled.
[String/UUID change made/needed]: None
Attachment #8578683 -
Flags: approval-mozilla-beta?
Assignee | ||
Comment 24•10 years ago
|
||
Approval Request Comment
[Feature/regressing bug #]: 1133521
[User impact if declined]: None
[Describe test coverage new/current, TreeHerder]: landed on m-c on March-10 with tests
[Risks and why]: Low risk, this patch affects only Beta
[String/UUID change made/needed]: None
Attachment #8578686 -
Flags: approval-mozilla-aurora?
Updated•10 years ago
|
Attachment #8578686 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•10 years ago
|
status-firefox37:
--- → affected
status-firefox38:
--- → affected
Comment 25•10 years ago
|
||
Comment on attachment 8578683 [details] [diff] [review]
1133521_beta
We're at the end of the 37 Beta cycle with only one Beta build left. I think we should defer this work to 38 Beta. 38 Beta 1 is scheduled to release on Apr 2, 2015. Beta-
Attachment #8578683 -
Flags: approval-mozilla-beta? → approval-mozilla-beta-
Updated•10 years ago
|
Comment 26•10 years ago
|
||
Updated•10 years ago
|
Flags: needinfo?(rvitillo)
Updated•10 years ago
|
Flags: needinfo?(rvitillo)
You need to log in
before you can comment on or make changes to this bug.
Description
•