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

Ucan, Emre (ADITG/ESB) eucan at de.adit-jv.com
Thu Jun 22 08:01:08 UTC 2017


Hello Pekka,

I think it is very hard do it in a generic way, because it is very dependent on the kernel and architecture.
We are using systemtap in ADIT for similar purpose. You can add probe points without changing the binary which you are debugging.

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: Mittwoch, 21. Juni 2017 13:24
> To: wayland-devel at lists.freedesktop.org
> Cc: Ucan, Emre (ADITG/ESB)
> Subject: Re: [RFC weston 0/9] weston-debug protocol, API, and tool
> 
> On Sat,  3 Jun 2017 14:57:02 +0300
> Pekka Paalanen <ppaalanen at gmail.com> wrote:
> 
> > 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.
> >
> > 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.
> 
> Hi,
> 
> apropos, I have been entertaining a completely different idea: perf probe.
> 
> Apparently one can set userspace probing points with 'perf probe' and
> then record them, which should be less overhead when not used than the
> weston-debug API. But there are many open questions I have not had the
> time to chase:
> 
> - Can we get an ordered printout of every single hit like we get with
>   printf?
> 
> - Is it flexible enough to relay all the details one might want, like
>   variable values?
> 
> - Architecture requirements; would it be not feasible or impossible on
>   some CPU architectures? Requiring debug info packages might be too
>   much on embedded?
> 
> - How to maintain a list of the probe points so it works over several
>   source revisions and builds? Using function names, source line
>   numbers or addresses is no-go. Would need to mark the probe points in
>   the source, but how?
> 
> - Overhead when enabled?
> 
> - Postprocessing?
> 
> - Permissions?
> 
> I'm skeptical of this idea being useful, but thought I'd mention it
> just in case. OTOH, the weston-debug proposal is relatively easy to
> understand and use, and it should be very reliable, debug info or no.
> 
> However, for something like the timeline debugging, perf probes could be
> extremely useful as probes in Weston could be combined with probes in
> the kernel drivers (e.g. GPU jobs and fences).
> 
> 
> Thanks,
> pq


More information about the wayland-devel mailing list