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

Ucan, Emre (ADITG/ESB) eucan at de.adit-jv.com
Tue Jun 6 15:54:06 UTC 2017


Hello Pekka,

Thank you very much for this RFC. We are also investigating options to improve logging in weston.
Your proposal looks very good. I have some comments and suggestions below

Best regards

Emre Ucan
Engineering Software Base (ADITG/ESB)

> -----Original Message-----
> From: wayland-devel [mailto:wayland-devel-
> bounces at lists.freedesktop.org] On Behalf Of Pekka Paalanen
> Sent: Samstag, 3. Juni 2017 13:58
> To: wayland-devel at lists.freedesktop.org
> Cc: Pekka Paalanen
> Subject: [RFC weston 0/9] weston-debug protocol, API, and tool
> 
> From: Pekka Paalanen <pq at iki.fi>
> 
> 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 want to enable
> them.
> Once enabled, you needed to recompile again to disable them. That works
> for
> developers somewhat, but becomes a PITA when you need a user to get you
> that
> debug information. I have experienced that particularly with XWM debugs.

Why did you make this protocol weston specific ? I think it would be better to put in wayland-protocols.
Because the protocol itself and its use-case is not weston specific.

Will it be possible to use weston_debug implementation from out of tree weston plugins ?

> 
> Here's an alternative proposal: let a Wayland client give Weston an open file
> descriptor, and Weston will write the debug prints into it on demand. Of
> course, this is a risky move, and should not usually be allowed - I added a
> command line option to control it.
> 
> As we have different things to debug, and just enabling everything would be
> a
> massive flood, let's introduce "debug scopes" to, well, give some scope to
> the
> prints. A client can subsribe to any number of scopes, and only those it is
> interested in.

I like the debug scopes concept. But in the proposed protocol, there is no way for clients to learn which stream names are supported.
Am I missing something ? IMO, an event for supported stream names is needed.

> 
> This patch series adds the protocol extension, the libweston implementation,
> Weston command line option to enable it all, and a command line tool to
> subscribe to the debug messages.
> 
> This patch series also adds debug scopes for XWM, Weston logs, and
> Wayland
> protocol dumps. We could add a lot more, too: window manager actions,
> input
> events, KMS debugging, timeline/wesgr, etc.
> 
> This is an RFC because it is still missing some bits I noted in the commit
> messages, but I wanted to send it out now because I have no idea when I
> might
> be able to finish it. If someone else wants to take over, that would be cool.

We can take it over, if we can agree upon design and architecture of this protocol.
Anyway we have to implement something similar for our projects...

> 
> 
> Thanks,
> pq
> 
> Pekka Paalanen (9):
>   protocol: add weston-debug.xml
>   libweston: add weston_debug API and implementation
>   compositor: add option to enable weston_debug
>   clients: add weston-debug WIP
>   compositor: offer logs via weston-debug
>   xwm: dump_property() to use FILE internally
>   xwm: move FILE to the callers of dump_property()
>   xwm: convert WM_DEBUG into a weston-debug scope
>   compositor: protocol logger WIP
> 
>  Makefile.am               |  18 +-
>  clients/weston-debug.c    | 378 +++++++++++++++++++++++
>  compositor/main.c         |  77 +++++
>  libweston/compositor.c    |   5 +
>  libweston/compositor.h    |   8 +
>  libweston/weston-debug.c  | 750
> ++++++++++++++++++++++++++++++++++++++++++++++
>  libweston/weston-debug.h  | 106 +++++++
>  man/weston.man            |  15 +-
>  protocol/weston-debug.xml | 128 ++++++++
>  xwayland/launcher.c       |   7 +
>  xwayland/selection.c      |  39 ++-
>  xwayland/window-manager.c | 230 +++++++-------
>  xwayland/xwayland.h       |   6 +-
>  13 files changed, 1650 insertions(+), 117 deletions(-)
>  create mode 100644 clients/weston-debug.c
>  create mode 100644 libweston/weston-debug.c
>  create mode 100644 libweston/weston-debug.h
>  create mode 100644 protocol/weston-debug.xml
> 
> --
> 2.10.2
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list