[RFC weston 9/9] compositor: protocol logger WIP

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen This is better than running Weston with WAYLAND_DEBUG=server: - It is enabled on demand, no unnecessary flooding and no need to restart the compositor if debug was enabled. - It prints client pointers so that messages with different clients can be seen apart. TODO: parse

[RFC weston 3/9] compositor: add option to enable weston_debug

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen Let users enable the debug protocol extension on the compositor command line. This allows weston-debug tool to work. Signed-off-by: Pekka Paalanen --- compositor/main.c | 7 +++ man/weston.man| 15 +-- 2 files changed, 20 insertions(+), 2 deletions(-)

[RFC weston 5/9] compositor: offer logs via weston-debug

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen This registers a new weston-debug scope "log" through which one can get live log output interspersed with possible other debugging prints. Signed-off-by: Pekka Paalanen --- compositor/main.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/compo

[RFC weston 4/9] clients: add weston-debug WIP

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen A tool for accessing the weston_debug_v1 interface features. Installed along weston-info, because it should be potentially useful for people running libweston-based compositors. TODO: add a man page Signed-off-by: Pekka Paalanen --- Makefile.am| 13 +- clien

[RFC weston 6/9] xwm: dump_property() to use FILE internally

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen Write the output of dump_property() out in one log call. When multiple processes (weston and Xwayland) are writing to the same file, this will keep the property dump uninterrupted by Xwayland debug prints. This is also preparation for more development in the same direction.

[RFC weston 2/9] libweston: add weston_debug API and implementation

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen weston_debug is both a libweston API for relaying debugging messages, and a Wayland protocol extension implementation for accessing those debug messages from a Wayland client. weston_debug_compositor_{create,destroy}() are private API, hence not exported. Signed-off-by: Pek

[RFC weston 7/9] xwm: move FILE to the callers of dump_property()

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen This is preparation for using the weston-debug infrastructure for WM_DEBUG. dump_property() may be called from different debugging contexts and often needs to be prefixed with more information. An alternative to this patch would be to pass in the weston_debug_scope as an arg

[RFC weston 8/9] xwm: convert WM_DEBUG into a weston-debug scope

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen Instead of a compile time choice, offer the XWM debugging messages through the weston-debug protocol and tool on demand. Users will not need to recompile weston to get XWM debugging, and it won't flood the weston log. The debug scope needs to be initialized in launcher.c for

[RFC weston 1/9] protocol: add weston-debug.xml

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen This is a new debugging extension for non-production environments. The aim is to replace all build-time choosable debug prints in the compositor with runtime subscribable debug streams. Signed-off-by: Pekka Paalanen --- Makefile.am | 3 ++ protocol/weston-d

[RFC weston 0/9] weston-debug protocol, API, and tool

2017-06-03 Thread Pekka Paalanen
From: Pekka Paalanen Hi, this is a little something I wrote while being stuck off-line in a hot place and not having to care about anyone's priorities one bit. Debug printing has usually been ad hoc weston_log() or even fprintf() calls, often guarded by #ifdefs which require recompiling if you