Closed Bug 1047355 Opened 10 years ago Closed 10 years ago

Improve USS reporting in WebIDE Monitor

Categories

(DevTools Graveyard :: WebIDE, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: janx, Assigned: janx)

References

Details

Attachments

(2 files, 1 obsolete file)

Currently, USS reporting in the Monitor has the following issues: - Doesn't work if the FxOS runtime is older than 2.1. - Tracking certified apps requires the `devtools.debugger.forbid-certified-apps` pref to be `false`. - Tracking requires the (currently) heavy memory+processing footprint of devtools actors inside every process. - The data coming back is irregular, because every process is polling its memory independently. All these issues can be addressed if we change the reporting mechanism to parse the output of `b2g-info` instead of relying on the monitor actor to poll each process. Parsing `b2g-info` output is not ideal and it's a hack, so any parsing should be replaced by bug 1043324's reporter as soon as possible (this will take time though because several non-trivial bugs need to be fixed first).
WIP, obviously.
This reduces the perf hit of USSAgent a bit.
When possible, parse the output of `b2g-info` to get the USS and ignore updates from multi-process USSAgents (inside the Monitor actors of each b2g process). The USSAgent updates are still received (albeit at slower frequency and only for non-certified apps if the pref is absent) so when `b2g-info` is not available or doesn't work (e.g. on the simulator), we gracefully degrade to USSAgent updates. The b2g-info trick has several advantages: 1. Works for older Firefox OS devices (pre-2.1). 2. Doesn't need certified-apps debugging. 3. Polling time is synchronized for all processes. And some drawbacks: 1. Parsing output from ADB shell is a hack. 2. Doesn't when debugging over Wi-Fi. 3. ADB needs to be root for `b2g-info` to work. Paul, regarding drawback 3, does the ADB helper try to become root when possible? Is there a way I can request ADB to be root before polling b2g-info?
Attachment #8466251 - Attachment is obsolete: true
Attachment #8467086 - Flags: review?(paul)
Flags: needinfo?(paul)
(In reply to Jan Keromnes [:janx] from comment #4) > And some drawbacks: > 1. Parsing output from ADB shell is a hack. > 2. Doesn't when debugging over Wi-Fi. > 3. ADB needs to be root for `b2g-info` to work. All the recent tricks to use adb helper to run adb commands are hacks. We should use that we great care.
Blocked on bug 1048024 because b2g-info is broken. My patch still works tough: - Using a device with broken b2g-info (trunk fxos), USS properly falls back to actor updates. - Using a device with working b2g-info (older fxos), USS actor updates are properly ignored and b2g-info is used instead. (In reply to Alexandre Poirot [:ochameau] from comment #5) > All the recent tricks to use adb helper to run adb commands are hacks. > We should use that we great care. I agree. That's why I try to be very careful in my code, and fall back to actor updates as soon as anything looks suspicious.
Depends on: 1048024
Attachment #8467086 - Flags: review?(paul) → review+
Flags: needinfo?(paul)
(In reply to Jan Keromnes [:janx] from comment #4) > 3. ADB needs to be root for `b2g-info` to work. > > Paul, regarding drawback 3, does the ADB helper try to become root when > possible? > Is there a way I can request ADB to be root before polling b2g-info? http://mxr.mozilla.org/mozilla-central/source/browser/devtools/webide/content/runtimedetails.js#89
Could we have a test on the phone that would break if b2g-info output can't be parsed the way it is parsed in monitor.js?
Blocks: 1049549
Blocks: 1049553
Checkin needed of the b2g-info polling for now. We might want to reduce USSAgent polling frequency eventually. Try: https://tbpl.mozilla.org/?tree=Try&rev=75743abfcbdd
Attachment #8467086 - Flags: checkin+
Actually, let's see about the USSAgent polling frequency in another bug if needed.
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: