Add 'debug' protocol
It would be great to have a protocol which exposed Weston's inner workings to special clients. Currently we have three ways of exposing our workings:
- logging to stdout or a file specified via
--log, both general system information at startup and errors during runtime
- when a debug key binding is pressed, we start recording our repaint timeline to a file which is named with the current timestamp
- when a key binding is pressed, a screenshot is made to a file which is named with the current timestamp
There are a few problems with this.
As the logging is so static, we can't enable verbose logging. My atomic branches have typically carried around a 'drm debug' patch at the top of tree, adding hilariously verbose logging which I'd request when people reported bugs. It would be great if these debug lines could always be compiled in, but not output unless specifically requested. xwm has the same issue.
Having no good way to trigger timeline and screenshot debugging is an issue. Timeline debugging is important, and requiring a keyboard to trigger it is not exactly optimal, especially on kiosk/STB/IVI systems where we don't have a keyboard to trigger the timeline.
Being able to enable this programmatically would be an even further plus. For instance, if we could only get log output when specifically under test, or when a client detects performance has dropped to an unacceptable level, etc.
Even better, as a stretch goal, would be the ability to enable debug output post-facto. For instance, most every
assert() call in Weston would be substantially more useful if it logged a great deal of detail about what happened before the assert failed. Similarly, a common request from people developing products is to have an 'oops' button, to be pressed when 'something went wrong', and we should generate as much detail as possible about the preceding few seconds to try to analyse the issue after the fact. Given how invasive that is to the logging machinery, that would be best done as a follow-up.
v6 is available as !10 (merged); previous versions were on the mailing list.