weston/libweston/perfetto/annotations.h
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

71 lines
2.3 KiB
C

/*
* Copyright (C) 2026 Amazon.com, Inc. or its affiliates
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#pragma once
#include <libweston/libweston.h>
#include "perfetto/u_perfetto.h"
void
perfetto_annotate_int(struct weston_debug_annotations *annots,
const char *key,
unsigned char key_size,
int value);
void
perfetto_annotate_bool(struct weston_debug_annotations *annots,
const char *key,
unsigned char key_size,
bool value);
void
perfetto_annotate_float(struct weston_debug_annotations *annots,
const char *key,
unsigned char key_size,
float value);
void
perfetto_annotate_double(struct weston_debug_annotations *annots,
const char *key,
unsigned char key_size,
double value);
void
perfetto_annotate_string(struct weston_debug_annotations *annots,
const char *key,
unsigned char key_size,
const char *value);
void
perfetto_annotate_buffer(struct weston_debug_annotations *annots,
const char *key,
unsigned char key_size,
const struct weston_buffer *buffer);
void
perfetto_annotate_solid_buffer_values(struct weston_debug_annotations *annots,
const char *key,
unsigned char key_size,
const struct weston_solid_buffer_values *values);