Commit graph

7 commits

Author SHA1 Message Date
Derek Foreman
d35259e3b2 trace: Fix typo in double annotations
They're setting the float value instead of the double value, which leads
to corrupt output.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2026-05-21 16:45:31 -05:00
Derek Foreman
dee08a8a32 trace: Fix buffer annotator
This was supposed to early return after logging the NULL buffer, not
foolishly carry on and attempt to dereference it.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2026-05-21 16:11:26 -05:00
Marius Vlad
a276db50f8 input: Add support for tracking input events on egress side
This includes an additional _double variant for _Generics and a bool
one.

Similarly, _WESTON_TRACE_ANNOTATE_FUNC_FLOW gets a _Generics macro variant
to handle the case were we have a integer flow ID, rather than an a
pointer.

Finally we always have a flow ID set when weston_input_event gets
initalized.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2026-05-21 21:58:17 +03:00
Derek Foreman
099e4724e6 trace: Add annotations for solid buffers
Added as an example of adding another layer of nesting, to show
the entry point for the Generic (which has no parent), and
a helper function for nesting inside another structure.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2026-05-12 10:48:42 -05:00
Derek Foreman
0fd4c20660 trace: Add namespaces to keys and use it for weston_buffer
We now track the size of the key string, as well as allow adding empty
"container" annotations that are just a name for nested storage.

When parents are present, the full key name is created by walking them
and prepending them to a string backwards.

Use this to implement a buffer annotation helper and use it in the one
place we're already logging a buffer.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2026-05-12 10:48:39 -05:00
Derek Foreman
b4df8bd9e5 trace: Move assertions into individual annotation functions
The int, string, and float annotators will become our atoms when we
start logging larger structs. The functions for complex annotations
will call these many times for a single annotation.

So we should assert in the int, string, and float annotators before
adding there, so the big functions are implicitly checked.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2026-05-12 09:22:11 -05:00
Derek Foreman
f5f6989a65 trace: Put annotations in a separate file
For now just the three we have, but we'll be adding a bunch of complex
annotations, so having their own place will be cleaner.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2026-05-12 09:20:38 -05:00