Closed
Bug 811605
Opened 12 years ago
Closed 12 years ago
B2G RIL: enable ril debugging output in run-time
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: edgar, Assigned: edgar)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
edgar
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Currently, to enable debug output only can be achieved in compile time. To make debug easily, we may need to add some mechanism to enable debug output in run-time.
Comment 1•12 years ago
|
||
We had similar feature in WiFi debugging in bug 806611. Ability to turn on debug messages in runtime can be handy for testing, but we still don't want to allow this through Gaia/Settings. We should instead have a default disabled preference like "ril.debugging.enabled" here.
Updated•12 years ago
|
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
Updated•12 years ago
|
Keywords: dev-doc-needed
Summary: RIL: enable ril debugging output in run-time → B2G RIL: enable ril debugging output in run-time
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #681369 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Attachment #681369 -
Flags: review+ → review?(vyang)
Comment 3•12 years ago
|
||
Comment on attachment 681369 [details] [diff] [review]
Bug_811605_patch_V1
Review of attachment 681369 [details] [diff] [review]:
-----------------------------------------------------------------
Great! Thank you :)
::: dom/system/gonk/RILContentHelper.js
@@ +1063,5 @@
> };
>
> this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RILContentHelper]);
>
> +// Read debug setting from pref
Please move this segment right below "var DEBUG = ...".
@@ +1070,5 @@
> + debugPref = Services.prefs.getBoolPref("ril.debugging.enabled");
> +} catch (e) {
> + debugPref = false;
> +}
> +DEBUG = RIL.DEBUG_CONTENT_HELPER || debugPref;
You can have:
try {
let debugPref = Services.prefs.getBoolPref("ril.debugging.enabled");
DEBUG = RIL.DEBUG_CONTENT_HELPER || debugPref;
} catch (e) {};
instead, so that it won't insert a useless variable 'debugPref' into global ns after all these.
::: dom/system/gonk/RadioInterfaceLayer.js
@@ +282,5 @@
> this.portAddressedSmsApps = {};
> this.portAddressedSmsApps[WAP.WDP_PORT_PUSH] = this.handleSmsWdpPortPush.bind(this);
> +
> + // pass debug pref to ril_worker
> + this.worker.postMessage({rilMessageType: "updateDebug",
"setDebugEnabled"
@@ +2622,5 @@
> };
>
> this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RadioInterfaceLayer]);
>
> +// Read debug setting from pref
Please also move this segment up.
Attachment #681369 -
Flags: review?(vyang) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #681369 -
Attachment is obsolete: true
Attachment #681421 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 5•12 years ago
|
||
To enable debug log, you need to add one line, 'pref("ril.debugging.enabled", true);', into /system/b2g/defaults/pref/user.js in device. Then reboot device or restart b2g service.
detailed step:
adb remount
adb pull /system/b2g/defaults/pref/user.js user.js
[update user.js with adding 'pref("ril.debugging.enabled", true);']
adb push user.js /system/b2g/defaults/pref/user.js
adb shell reboot
Comment 6•12 years ago
|
||
Keywords: checkin-needed
Comment 7•12 years ago
|
||
Comment on attachment 681421 [details] [diff] [review]
Bug_811605_patch_V2
Review of attachment 681421 [details] [diff] [review]:
-----------------------------------------------------------------
This is very useful for RIL debugging, asking approval to check into mozilla-aurora.
A similar runtime debugging support for Wifi also checked in to mozilla-aurora(bug 806611).
Attachment #681421 -
Flags: approval-mozilla-aurora?
Comment 8•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 9•12 years ago
|
||
(In reply to Shian-Yow Wu from comment #7)
> Comment on attachment 681421 [details] [diff] [review]
> Bug_811605_patch_V2
>
> Review of attachment 681421 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This is very useful for RIL debugging, asking approval to check into
> mozilla-aurora.
>
> A similar runtime debugging support for Wifi also checked in to
> mozilla-aurora(bug 806611).
Approving for Aurora assuming this will not have any major perf hits for non-debug users.
Updated•12 years ago
|
Attachment #681421 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 10•12 years ago
|
||
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
Comment 11•12 years ago
|
||
(In reply to Edgar Chen from comment #5)
> To enable debug log, you need to add one line,
> 'pref("ril.debugging.enabled", true);', into
> /system/b2g/defaults/pref/user.js in device. Then reboot device or restart
> b2g service.
>
> detailed step:
> adb remount
> adb pull /system/b2g/defaults/pref/user.js user.js
> [update user.js with adding 'pref("ril.debugging.enabled", true);']
> adb push user.js /system/b2g/defaults/pref/user.js
> adb shell reboot
Thanks Edgar! Would you also send a Gaia pull request to add "ril.debugging.enabled" in user.js with false value by default? This will be convenient for users to know what prefs values they can change.
Assignee | ||
Comment 12•12 years ago
|
||
(In reply to Shian-Yow Wu from comment #11)
> (In reply to Edgar Chen from comment #5)
> > To enable debug log, you need to add one line,
> > 'pref("ril.debugging.enabled", true);', into
> > /system/b2g/defaults/pref/user.js in device. Then reboot device or restart
> > b2g service.
> >
> > detailed step:
> > adb remount
> > adb pull /system/b2g/defaults/pref/user.js user.js
> > [update user.js with adding 'pref("ril.debugging.enabled", true);']
> > adb push user.js /system/b2g/defaults/pref/user.js
> > adb shell reboot
>
> Thanks Edgar! Would you also send a Gaia pull request to add
> "ril.debugging.enabled" in user.js with false value by default? This will
> be convenient for users to know what prefs values they can change.
Add "ril.debugging.enabled" in user.js with false value by default.
This will be convenient for users to know what prefs values they can change.
Send a pull request for this.
https://github.com/mozilla-b2g/gaia/pull/6532
Assignee | ||
Comment 13•12 years ago
|
||
Merged on Github:
https://github.com/mozilla-b2g/gaia/commit/da8dad4
Updated•11 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•