[RFC weston 0/9] weston-debug protocol, API, and tool
Devadoss, Maniraj (RBEI/ECF3; ADITG/SWG)
external.mdevadoss at de.adit-jv.com
Thu Jul 27 15:13:22 UTC 2017
Hello Pekka,
Please find my replies.
> What do you think of the alias idea?
This idea looks good to group the debug scopes.
> I'm still not sure who or when would be able to push this work forward.
> I am very happy to hear it is a workable idea for you too.
We can complete the pending works and push it forward
Let me summarize the pending tasks
i) Add this protocol as a wayland-protocol
- The protocol can be named as "compositor-debug-unstable-v1.xml", please let me know if this naming can be improved
i) WIP: parse and print the message arguments for the protocol logger
ii) WIP: add a man page for weston-debug client
iii) Add the command line to weston to stream the bootup logs to given file before the client connects
iv) Add the scope name to the debug messages
Please update the list if I miss some tasks.
Best regards
Maniraj Devadoss
Software Group (ADITG/SWG)
Tel. +49 5121 49 6933
-----Original Message-----
From: wayland-devel [mailto:wayland-devel-bounces at lists.freedesktop.org] On Behalf Of Pekka Paalanen
Sent: Donnerstag, 27. Juli 2017 14:43
To: Devadoss, Maniraj (RBEI/ECF3; ADITG/SWG)
Cc: Ucan, Emre (ADITG/ESB); Friedrich, Eugen (ADITG/ESB); wayland-devel at lists.freedesktop.org
Subject: Re: [RFC weston 0/9] weston-debug protocol, API, and tool
On Thu, 27 Jul 2017 11:55:25 +0000
"Devadoss, Maniraj (RBEI/ECF3; ADITG/SWG)" <external.mdevadoss at de.adit-jv.com> wrote:
> Hello Pekka,
>
> I integrated the patches and evaluated the protocol. Initially I faced crashing with the following call stack.
>
> EXH /lib64/libc-2.24.so(strlen+0x10)[0xffffb6ddfcd0]
> EXH /lib64/libc-2.24.so(_IO_vfprintf+0x1938)[0xffffb6dad300]
> EXH /lib64/libc-2.24.so(_IO_fprintf+0x68)[0xffffb6db2e18]
> EXH /usr/bin/weston(protocol_log_fn+0x7c)[0x40607c]
> EXH /usr/lib64/libwayland-server.so.0.1.0(_init+0x878)[0xffffb6efeea0]
>
> The issue is that, when we tried to pass the returned pointer from
> weston_debug_timestamp() API, the fprintf is crashing. I modified to
> pass the local "timestr" array to be passed to fprintf. After this
> modification it is working fine. Have you faced any such issue? Other
Hi,
no, I haven't seen such issues. The intention with
weston_debug_timestamp() is that the caller allocates a buffer for the string any way it wants, passes it to the function, and the function returns the same pointer that was passed in purely as convenience. I don't see how it could make a difference.
> than the this issue everything works fine for us. I am able to see the
> logs for different debug scopes.
>
> Please find our feedback below.
>
> i) As Emre suggested we want this protocol to be in wayland-protocols
> so that an external client can also use this.
Ok.
> ii) For getting the bootup logs before client connects, we like your
> idea to add the new command line to weston to stream to the given
> file(s).
Nice.
> iii) We can add the scope names to the debug logs along with time
> stamps so that the grouping/greping the log messages will be easier.
I suppose, yes.
> iv) There could be an additional debug scope named as "all" to
> subscribe to all the available debug scopes.
Yeah, we probably want to have "groups". I have been thinking that that would be implemented with aliases:
void
weston_debug_scope_add_alias(struct weston_debug_scope *scope, const char *alias_name)
While weston_compositor_add_debug_scope() requires the scope name to be unique, alias does not have to be unique. That way multiple components each adding their debug scopes can also add their scope behind a shared alias. Subscribing to the alias subscribes to all the scopes that added the alias.
The weston-debug core in libweston would handle describing aliases automatically by listing all the scopes subscribed to it. This would be nicely dynamic, as some (lib)weston plugins may or may not be loaded, and so some scopes may or may not be available.
We could still additionally have an implicit alias "all", even though I doubt its usefulness due to flooding.
What this design does not allow is:
- having a verbose description of an alias
- aliases added to other aliases, i.e. a real hierarchy
However, given that certain debug scopes may or may not exist at a time depending on configuration, I think having the alias definitions with the debug scope definition would be easier to maintain. The opposite would be a central piece of code having a list of all debug scopes to be added to an alias, which to me seems more difficult to manage at first.
What do you think of the alias idea?
I'm still not sure who or when would be able to push this work forward.
I am very happy to hear it is a workable idea for you too.
Thanks,
pq
> From: Ucan, Emre (ADITG/ESB)
> Sent: Montag, 24. Juli 2017 16:51
> To: Pekka Paalanen
> Cc: wayland-devel at lists.freedesktop.org; Friedrich, Eugen (ADITG/ESB);
> Devadoss, Maniraj (RBEI/ECF3; ADITG/SWG) Subject: RE:
> [RFC weston 0/9] weston-debug protocol, API, and tool
>
> Hello Pekka,
>
> Honestly speaking, I did not have time to evaluate it yet. Because I
> was on vacation. I am planning to start this week. Hopefully, I can
> reply to you next week.
>
> Best regards
>
> Emre Ucan
> Engineering Software Base (ADITG/ESB)
>
> Tel. +49 5121 49 6937
>
> > -----Original Message-----
> > From: Pekka Paalanen [mailto:ppaalanen at gmail.com]
> > Sent: Montag, 24. Juli 2017 16:34
> > To: Ucan, Emre (ADITG/ESB)
> > Cc: wayland-devel at lists.freedesktop.org; Friedrich, Eugen
> > (ADITG/ESB) Subject: Re: [RFC weston 0/9] weston-debug protocol,
> > API, and tool
> >
> > On Fri, 9 Jun 2017 18:32:25 +0300
> > Pekka Paalanen <ppaalanen at gmail.com> wrote:
> >
> > > On Fri, 9 Jun 2017 14:10:56 +0000
> > > "Ucan, Emre (ADITG/ESB)" <eucan at de.adit-jv.com> wrote:
> > >
> > > > Hi Pekka,
> > > >
> > > > I like your idea with scope trees. I want to play around a
> > > > little bit with the protocol next week. Later I will finalize my
> > > > proposal for the protocol. Maybe you are right and we can use
> > > > the protocol as it is.
> >
> > Hi Emre,
> >
> > now that I have finally looked at your patches, I dare ask. ;-) How
> > is it going with the debug stuff?
> >
> >
> > Thanks,
> > pq
> >
> > > >
> > > > Do you think that the RFC is mergeable to upstream ? Are there
> > > > something to address before ?
> > >
> > > Hi Emre,
> > >
> > > the two things that are missing are man-page for weston-debug and
> > > finishing the protocol pretty-printer. The are noted in the
> > > respective commit messages. After those, the series is mergeable
> > > in my opinion.
> > >
> > > More command line options and scope collections can well be added
> > > later.
> > >
> > > Do you think you want the protocol in wayland-protocols still? If
> > > yes, that could be done first. However, I'm not quite sure the
> > > weston-specific interface names good then, but I don't have better
> > > ideas at the moment.
> > >
> > > If in wayland-protocols, it should be an unstable protocol (see
> > > the README in wayland-protocols on how things need to be
> > > arranged).
> > >
> > >
> > > Thanks,
> > > pq
>
More information about the wayland-devel
mailing list