<div dir="ltr">I think it's a useful enough tool that it should eventually it should come bog-standard with any typical Wayland installation, with an upstream repository, but perhaps it doesn't make sense directly in libwayland.<br>
<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 25, 2014 at 8:53 AM, Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, 23 Jul 2014 16:21:19 +0800<br>
Boyan Ding <<a href="mailto:stu_dby@126.com">stu_dby@126.com</a>> wrote:<br>
<br>
> The v2 of patches sees a lot of new code and the most notable change<br>
> is the introduction of "server mode". Under server mode, the program<br>
> will act as a wayland server and can accept multiple clients via<br>
> WAYLAND_DISPLAY variable. An interesting usecase of this feature is to<br>
> trace all clients of a compositor.<br>
><br>
> To make it run under server mode, run<br>
> shell> wayland-tracer -S SOCKET_NAME<br>
> SOCKET_NAME is a value like wayland-0 or so. If we set WAYLAND_DISPLAY<br>
> environment variable to SOCKET_NAME and launch a wayland app, that app<br>
> will be traced.<br>
><br>
> To make it run under default mode (now called "single mode"), run<br>
> shell> wayland-tracer -- program arguments ...<br>
><br>
> Also, EPOLLHUP is handled correctly in this version.<br>
><br>
> The next step will be adding xml protocol parsing and wire data<br>
> analysing according to protocol files. This will be much tougher but I<br>
> hope I can finish that.<br>
><br>
> Boyan Ding (2):<br>
> connection: Move definitions<br>
> Add a wayland protocol dumper wayland-tracer<br>
><br>
> .gitignore | 1 +<br>
> Makefile.am | 10 +<br>
> <a href="http://configure.ac" target="_blank">configure.ac</a> | 7 +<br>
> src/connection.c | 18 +-<br>
> src/tracer.c | 689 ++++++++++++++++++++++++++++++++++++++++++++++++++<br>
> src/wayland-private.h | 18 +-<br>
> 6 files changed, 727 insertions(+), 16 deletions(-)<br>
> create mode 100644 src/tracer.c<br>
><br>
<br>
</div></div>Hi,<br>
<br>
excellent work! :-)<br>
<br>
As I understand there are also other people writing protocol dumpers,<br>
and I do not see any technical reason why it should live in the wayland<br>
repository, I would suggest creating your own project. I believe it<br>
will be much more comfortable for you, being in total control, not<br>
having to rebase/merge and so on. This is also what I tried to refer to<br>
with the "self-contained project" in my original call-out.<br>
<br>
You can freely pick your dependencies and frameworks there, which is<br>
not something you can easily do in the wayland repository.<br>
<br>
It would also be nicer for your users, as they don't need two different<br>
checkouts of libwayland, other one just for building the dumper.<br>
<br>
In any case you are welcome to post news on your progress to<br>
wayland-devel. A bit of competition might be insipiring, and I wouldn't<br>
want to announce the winner on the starting line by merging this<br>
too soon. :-)<br>
<br>
I think you should rather duplicate than re-use the few bits from<br>
libwayland internals, I feel that would be a cleaner approach and it's<br>
not that much code anyway (is it?). You are free copy anything you need<br>
from Wayland and Weston code bases under the given licence (don't<br>
forget to copy the copyrights).<br>
<br>
If all goes well and you are happy with the work, you could very soon be<br>
running a FOSS project of your own! Or if you just want to develop this<br>
once, push it upstream, and then move on, that is ok too. Or maybe<br>
someone else would like to take over the project later. Do you have<br>
plans in this regard?<br>
<br>
I think your project should live for a while so we see where it is<br>
going, and at least do the decoding with XML into text form before we<br>
look into merging it into wayland repository. I think anything with a<br>
GUI (which would be awesome!) is getting beyond the scope of the wayland<br>
repository.<br>
<br>
<br>
Thanks,<br>
pq<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> Jasper<br>
</div>