Closed Bug 1060212 Opened 6 years ago Closed 5 years ago

[Window management] Enable debugging in settings developer menu

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(tracking-b2g:+)

RESOLVED FIXED
tracking-b2g +

People

(Reporter: alive, Assigned: alive)

References

Details

Attachments

(1 file)

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..
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.
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)
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.
Attachment #8517284 - Flags: review?(timdream) → review+
blocking-b2g: 2.2? → backlog
tracking-b2g: --- → +
https://github.com/mozilla-b2g/gaia/commit/cdba6ca3b0a234af0e4a5311ce38b3dc2bcebd6d
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
No longer blocks: CAF-v3.0-FL-metabug
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.