Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for weston-debug proto debug scope as read end of a pipe #2

Open
mv0 opened this issue Dec 27, 2018 · 3 comments
Open

Support for weston-debug proto debug scope as read end of a pipe #2

mv0 opened this issue Dec 27, 2018 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mv0
Copy link

mv0 commented Dec 27, 2018

Hi,

Recently weston has got weston-debug application which can piggy back on the protocol as well. It can be invoked using weston-debug proto. It supports displaying multiple clients and has a slight different format WAYLAND_DEBUG=1, but I think would be nice to get pretty formatting and filtering support.

I guess would be nice to do weston-debug proto | ./main.py [options]

Example of weston-debug proto dump with multiple clients.
[2018-12-27 18:55:57.228][proto] client 0x555ed56d3970 rq [email protected]()
[2018-12-27 18:55:57.228][proto] client 0x555ed56d3970 ev [email protected]()
[2018-12-27 18:55:57.228][proto] client 0x555ed56d3970 rq [email protected]_opaque_region(nil)
[2018-12-27 18:55:57.243][proto] client 0x555ed56c8620 ev [email protected](31418518)
[2018-12-27 18:55:57.243][proto] client 0x555ed56c8620 ev [email protected]_id(16)
[2018-12-27 18:55:57.243][proto] client 0x555ed56d3970 ev [email protected](31418518)
[2018-12-27 18:55:57.243][proto] client 0x555ed56d3970 ev [email protected]_id(16)
[2018-12-27 18:55:57.244][proto] client 0x555ed56d3970 rq [email protected](new id wl_callback@16)
[2018-12-27 18:55:57.244][proto] client 0x555ed56d3970 rq [email protected](wl_buffer@19, 0, 0)
[2018-12-27 18:55:57.244][proto] client 0x555ed56d3970 rq [email protected]_buffer(61, 62, 127, 127)
[2018-12-27 18:55:57.244][proto] client 0x555ed56d3970 rq [email protected]()
[2018-12-27 18:55:57.244][proto] client 0x555ed56d3970 ev [email protected]()
[2018-12-27 18:55:57.244][proto] client 0x555ed56c8620 rq [email protected](new id wl_callback@16)
[2018-12-27 18:55:57.244][proto] client 0x555ed56c8620 rq [email protected](wl_buffer@19, 0, 0)
[2018-12-27 18:55:57.244][proto] client 0x555ed56c8620 rq [email protected]_buffer(61, 62, 127, 127)
[2018-12-27 18:55:57.244][proto] client 0x555ed56c8620 rq [email protected]()
[2018-12-27 18:55:57.244][proto] client 0x555ed56c8620 ev [email protected]()
[2018-12-27 18:55:57.244][proto] client 0x555ed56c8620 rq [email protected]_opaque_region(nil)
[2018-12-27 18:55:57.244][proto] client 0x555ed56d3970 rq [email protected]_opaque_region(nil)
[2018-12-27 18:55:57.260][proto] client 0x555ed56c8620 ev [email protected](31418535)
[2018-12-27 18:55:57.260][proto] client 0x555ed56c8620 ev [email protected]_id(16)
[2018-12-27 18:55:57.260][proto] client 0x555ed56d3970 ev [email protected](31418535)
[2018-12-27 18:55:57.260][proto] client 0x555ed56d3970 ev [email protected]_id(16)
[2018-12-27 18:55:57.261][proto] client 0x555ed56d3970 rq [email protected](new id wl_callback@16)
[2018-12-27 18:55:57.261][proto] client 0x555ed56d3970 rq [email protected](wl_buffer@20, 0, 0)
[2018-12-27 18:55:57.261][proto] client 0x555ed56d3970 rq [email protected]_buffer(61, 62, 127, 127)
[2018-12-27 18:55:57.261][proto] client 0x555ed56d3970 rq [email protected]()
[2018-12-27 18:55:57.261][proto] client 0x555ed56d3970 ev [email protected]()
[2018-12-27 18:55:57.261][proto] client 0x555ed56c8620 rq [email protected](new id wl_callback@16)
[2018-12-27 18:55:57.261][proto] client 0x555ed56c8620 rq [email protected](wl_buffer@20, 0, 0)
[2018-12-27 18:55:57.261][proto] client 0x555ed56c8620 rq [email protected]_buffer(61, 62, 127, 127)
[2018-12-27 18:55:57.261][proto] client 0x555ed56c8620 rq [email protected]()
[2018-12-27 18:55:57.261][proto] client 0x555ed56c8620 ev [email protected]()
[2018-12-27 18:55:57.261][proto] client 0x555ed56d3970 rq [email protected]_opaque_region(nil)
[2018-12-27 18:55:57.261][proto] client 0x555ed56c8620 rq [email protected]_opaque_region(nil)
[2018-12-27 18:55:57.276][proto] client 0x555ed56c8620 ev [email protected](31418552)
[2018-12-27 18:55:57.277][proto] client 0x555ed56c8620 ev [email protected]_id(16)
[2018-12-27 18:55:57.277][proto] client 0x555ed56d3970 ev [email protected](31418552)
[2018-12-27 18:55:57.277][proto] client 0x555ed56d3970 ev [email protected]_id(16)
[2018-12-27 18:55:57.277][proto] client 0x555ed56d3970 rq [email protected](new id wl_callback@16)
[2018-12-27 18:55:57.277][proto] client 0x555ed56d3970 rq [email protected](wl_buffer@18, 0, 0)
[2018-12-27 18:55:57.277][proto] client 0x555ed56d3970 rq [email protected]_buffer(61, 62, 127, 127)
[2018-12-27 18:55:57.277][proto] client 0x555ed56d3970 rq [email protected]()
[2018-12-27 18:55:57.277][proto] client 0x555ed56d3970 ev [email protected]()
[2018-12-27 18:55:57.277][proto] client 0x555ed56d3970 rq [email protected]_opaque_region(nil)
[2018-12-27 18:55:57.277][proto] client 0x555ed56c8620 rq [email protected](new id wl_callback@16)
[2018-12-27 18:55:57.277][proto] client 0x555ed56c8620 rq [email protected](wl_buffer@18, 0, 0)
[2018-12-27 18:55:57.277][proto] client 0x555ed56c8620 rq [email protected]_buffer(61, 62, 127, 127)
[2018-12-27 18:55:57.277][proto] client 0x555ed56c8620 rq [email protected]()
[2018-12-27 18:55:57.277][proto] client 0x555ed56c8620 ev [email protected]()
[2018-12-27 18:55:57.278][proto] client 0x555ed56c8620 rq [email protected]_opaque_region(nil)

@wmww
Copy link
Owner

wmww commented Dec 28, 2018

I'm not sure about where this weston-debug is, it doesn't seem to currently be in the Arch repos.

It looks like this would be an easy feature to add, just add a few regexes to

message_regex = '(\w+)@(\d+)\.(\w+)\((.*)\)$'
. The client address would need to be captured and used as a connection_id.

I probably wont add support for this in the immediate future, but if someone gets it parsing, I'll figure out what to do with the client identifier to make it support multiple connections.

@mv0
Copy link
Author

mv0 commented Dec 28, 2018

Hi,

weston-debug is part of weston (https://gitlab.freedesktop.org/wayland/weston). I'm not an arch user but seems you can use https://aur.archlinux.org/packages/weston-git/.

Alright I'll play a bit with the regexp then. Thanks for the hit!

@wmww
Copy link
Owner

wmww commented Jan 4, 2019

In my last commit, I adjusted some design to allow parsing of connection ID. WAYLAND_DEBUG output doesn't distinguish between different connections, so it is currently just set to a literal here. If you pulled out the client address with a regex, you could use that instead and multiple connections will be processed correctly. conn_id can be any string that is unique to a connection.

@wmww wmww added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants