[Window management] Enable debugging in settings developer menu

RESOLVED FIXED

Status

Firefox OS
Gaia::System::Window Mgmt
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: alive, Assigned: alive)

Tracking

unspecified
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(tracking-b2g:+)

Details

Attachments

(1 attachment)

Now we are using the javascript flag in app_window.js to log the message.
It'd be nice if we have somewhere to turn it on/off easily.

Now I only could think of developer settings.
Also see this thread: https://groups.google.com/forum/#!topic/mozilla.dev.b2g/PwMDyRNcRnM

If this is not urgent, maybe we could use it as the base for better logging across the platform?
I would recommend to get something which can help us to enable logging dynamically 

1) without rebooting device
2) we must be able to enable logging from |adb shell XXXXX| command. 

This will cut down lots of time in stability debugging effort.
Flags: needinfo?(ggrisco)
@ggrisco : Please put your ideas too
Flags: needinfo?(ggrisco)
(In reply to Tapas[:tkundu on #b2g/gaia/memshrink/gfx] (always NI me) from comment #2)
> I would recommend to get something which can help us to enable logging
> dynamically 
> 
> 1) without rebooting device
> 2) we must be able to enable logging from |adb shell XXXXX| command. 
> 
> This will cut down lots of time in stability debugging effort.

I have no idea how we could touch mozSettings via adb shell command..
Blocks: 1063044
blocking-b2g: --- → 2.2?
we have a logging patch for debugging very common UI hang issue in bug 1076327 comment 18. We have seen these issues in v2.0 and v2.1.

We want to enable this logging (see bug 1076327 comment 18 for logging patch) dynamically using |adb shell command| so that we can save DAYS in debugging UI hang issue in v2.2 .

Please also note that settings app cannot opened on affected UI Freeze device. So we want to enable it dynamically using |adb shell command| without rebooting device.
Flags: needinfo?(bbajaj)
I guess that we may need to do something in gecko to enable it dynamically using |adb shell command| .
I tried to use a command line handler but that didn't work well on device, so I guess our remaining option is to send a signal to b2g to trigger the setting change - in the same way we trigger memory dumps.

Dave, do you have time to look into that?
Flags: needinfo?(dhylands)

Updated

4 years ago
Flags: needinfo?(bbajaj)
It looks like we can register command handlers on the same fifo used for doing memory dumps:

http://dxr.mozilla.org/mozilla-central/source/xpcom/base/nsMemoryInfoDumper.cpp?from=nsMemoryInfoDumper.cpp#233-243

We can add another class derived from FifoWatcher, we don't need to put it in the nsIMemoryInfoDumper.cpp file.

Are you looking to set arbitrary options? Or do you just have one very specific option you want enabled.

Currently, it looks like the entire line has to match a registered command, but I think it would be pretty easy to modify.
http://dxr.mozilla.org/mozilla-central/source/xpcom/base/nsDumpUtils.cpp?from=nsDumpUtils.cpp&case=true#419-425
Flags: needinfo?(dhylands) → needinfo?(fabrice)
It looks like a single option (eg. "enable-b2g-logging") would be good enough there.
Flags: needinfo?(fabrice)
(In reply to Tapas[:tkundu on #b2g/gaia/memshrink/gfx] (always NI me) from comment #5)
> we have a logging patch for debugging very common UI hang issue in bug
> 1076327 comment 18. We have seen these issues in v2.0 and v2.1.
> 
> We want to enable this logging (see bug 1076327 comment 18 for logging
> patch) dynamically using |adb shell command| so that we can save DAYS in
> debugging UI hang issue in v2.2 .
> 
> Please also note that settings app cannot opened on affected UI Freeze
> device. So we want to enable it dynamically using |adb shell command|
> without rebooting device.

Please note one thing:
Current logging strategy is using console.log, and it's not having any "cache" mechanism.
That is to say, if you do not enable the logging before you start any test,
you will not get any information which happens during the failure operations.
And that information is just what I/we gaia developer need.

I am sorry, but it's really impractical to "dynamically" catch log just after the failure happens.
Created attachment 8517284 [details] [review]
Use GeckoDump as backup logging way if debug is not enabled
Attachment #8517284 - Flags: review?(timdream)
Attachment #8517284 - Flags: review?(timdream) → review+
blocking-b2g: 2.2? → backlog
tracking-b2g: --- → +
https://github.com/mozilla-b2g/gaia/commit/cdba6ca3b0a234af0e4a5311ce38b3dc2bcebd6d
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED

Updated

3 years ago
Blocks: 1142220

Updated

3 years ago
No longer blocks: 1142220
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.