[RFC wayland v2 0/2] Wayland protocol dumper

Boyan Ding stu_dby at 126.com
Wed Jul 23 01:21:19 PDT 2014

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.

To make it run under default mode (now called "single mode"), run
shell> wayland-tracer -- program arguments ...

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

 .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


More information about the wayland-devel mailing list