[RFC wayland v2 0/2] Wayland protocol dumper
Bryce Harrington
bryce at osg.samsung.com
Thu Jul 24 18:01:32 PDT 2014
On Wed, Jul 23, 2014 at 04:21:19PM +0800, Boyan Ding wrote:
> The v2 of patches sees a lot of new code and the most notable change
> is the introduction of "server mode". Under server mode, the program
> will act as a wayland server and can accept multiple clients via
> WAYLAND_DISPLAY variable. An interesting usecase of this feature is to
> trace all clients of a compositor.
>
> To make it run under server mode, run
> shell> wayland-tracer -S SOCKET_NAME
> SOCKET_NAME is a value like wayland-0 or so. If we set WAYLAND_DISPLAY
> environment variable to SOCKET_NAME and launch a wayland app, that app
> will be traced.
Hmm, do I understand the directions correctly?
In one terminal after building and installing the patched wayland, I've
run:
$ ./wayland-tracer -S wayland-0
Then in another terminal window, I rebuild weston and:
$ WAYLAND_DISPLAY=wayland-0 ~/Wayland/weston/weston-flower
failed to connect to Wayland display: No such file or directory
failed to create display: No such file or directory
$
> To make it run under default mode (now called "single mode"), run
> shell> wayland-tracer -- program arguments ...
Not sure what this mode is, but it seems not to do much for me:
$ ./wayland-tracer -- ~/Wayland/weston/weston-flower
0: <= Data dumped: 12 bytes:
01 00 00 00 01 00 0c 00 02 00 00 00
> Also, EPOLLHUP is handled correctly in this version.
>
> The next step will be adding xml protocol parsing and wire data
> analysing according to protocol files. This will be much tougher but I
> hope I can finish that.
>
> Boyan Ding (2):
> connection: Move definitions
> Add a wayland protocol dumper wayland-tracer
While I'm not sure my testing worked, I did read through the code and
didn't spot any errors obvious to me. The patch applies and builds
successfully without adding any new warnings, and wayland's make check
succeeds with "All 15 tests passed", so:
Reviewed-by: Bryce Harrington <b.harrington at samsung.com>
> .gitignore | 1 +
> Makefile.am | 10 +
> configure.ac | 7 +
> src/connection.c | 18 +-
> src/tracer.c | 689 ++++++++++++++++++++++++++++++++++++++++++++++++++
> src/wayland-private.h | 18 +-
> 6 files changed, 727 insertions(+), 16 deletions(-)
> create mode 100644 src/tracer.c
>
> --
> 2.0.1
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list