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)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

Details

(Keywords: dev-doc-needed)

Attachments

(1 file, 1 obsolete file)

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.
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.
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
Keywords: dev-doc-needed
Summary: RIL: enable ril debugging output in run-time → B2G RIL: enable ril debugging output in run-time
Attached patch Bug_811605_patch_V1 (obsolete) (deleted) — Splinter Review
Attachment #681369 - Flags: review+
Attachment #681369 - Flags: review+ → review?(vyang)
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+
Attached patch Bug_811605_patch_V2 (deleted) — Splinter Review
Attachment #681369 - Attachment is obsolete: true
Attachment #681421 - Flags: review+
Keywords: checkin-needed
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 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?
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
(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.
Attachment #681421 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(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.
(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
Blocks: 960926
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: