/* This file is autogenerated by tracetool, do not edit. */
/* SPDX-License-Identifier: GPL-2.0-or-later */

#ifndef TRACE_CHARDEV_GENERATED_TRACERS_H
#define TRACE_CHARDEV_GENERATED_TRACERS_H

#include "trace/control.h"

extern TraceEvent _TRACE_WCT_INIT_EVENT;
extern TraceEvent _TRACE_WCT_CMD_RE_EVENT;
extern TraceEvent _TRACE_WCT_CMD_ST_EVENT;
extern TraceEvent _TRACE_WCT_CMD_SP_EVENT;
extern TraceEvent _TRACE_WCT_CMD_TS_EVENT;
extern TraceEvent _TRACE_WCT_CMD_OTHER_EVENT;
extern TraceEvent _TRACE_WCT_SPEED_EVENT;
extern TraceEvent _TRACE_SPICE_CHR_DISCARD_WRITE_EVENT;
extern TraceEvent _TRACE_SPICE_VMC_WRITE_EVENT;
extern TraceEvent _TRACE_SPICE_VMC_READ_EVENT;
extern TraceEvent _TRACE_SPICE_VMC_REGISTER_INTERFACE_EVENT;
extern TraceEvent _TRACE_SPICE_VMC_UNREGISTER_INTERFACE_EVENT;
extern TraceEvent _TRACE_SPICE_VMC_EVENT_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_POLL_ERR_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_RECV_ERR_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_RECV_EOF_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_WRITE_ERR_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_DISCONNECT_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_HANGUP_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_WS_HANDSHAKE_ERR_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_TLS_HANDSHAKE_ERR_EVENT;
extern TraceEvent _TRACE_CHR_SOCKET_TLS_INIT_ERR_EVENT;
extern uint16_t _TRACE_WCT_INIT_DSTATE;
extern uint16_t _TRACE_WCT_CMD_RE_DSTATE;
extern uint16_t _TRACE_WCT_CMD_ST_DSTATE;
extern uint16_t _TRACE_WCT_CMD_SP_DSTATE;
extern uint16_t _TRACE_WCT_CMD_TS_DSTATE;
extern uint16_t _TRACE_WCT_CMD_OTHER_DSTATE;
extern uint16_t _TRACE_WCT_SPEED_DSTATE;
extern uint16_t _TRACE_SPICE_CHR_DISCARD_WRITE_DSTATE;
extern uint16_t _TRACE_SPICE_VMC_WRITE_DSTATE;
extern uint16_t _TRACE_SPICE_VMC_READ_DSTATE;
extern uint16_t _TRACE_SPICE_VMC_REGISTER_INTERFACE_DSTATE;
extern uint16_t _TRACE_SPICE_VMC_UNREGISTER_INTERFACE_DSTATE;
extern uint16_t _TRACE_SPICE_VMC_EVENT_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_POLL_ERR_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_RECV_ERR_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_RECV_EOF_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_WRITE_ERR_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_DISCONNECT_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_HANGUP_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_WS_HANDSHAKE_ERR_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_TLS_HANDSHAKE_ERR_DSTATE;
extern uint16_t _TRACE_CHR_SOCKET_TLS_INIT_ERR_DSTATE;
#define TRACE_WCT_INIT_ENABLED 1
#define TRACE_WCT_CMD_RE_ENABLED 1
#define TRACE_WCT_CMD_ST_ENABLED 1
#define TRACE_WCT_CMD_SP_ENABLED 1
#define TRACE_WCT_CMD_TS_ENABLED 1
#define TRACE_WCT_CMD_OTHER_ENABLED 1
#define TRACE_WCT_SPEED_ENABLED 1
#define TRACE_SPICE_CHR_DISCARD_WRITE_ENABLED 1
#define TRACE_SPICE_VMC_WRITE_ENABLED 1
#define TRACE_SPICE_VMC_READ_ENABLED 1
#define TRACE_SPICE_VMC_REGISTER_INTERFACE_ENABLED 1
#define TRACE_SPICE_VMC_UNREGISTER_INTERFACE_ENABLED 1
#define TRACE_SPICE_VMC_EVENT_ENABLED 1
#define TRACE_CHR_SOCKET_POLL_ERR_ENABLED 1
#define TRACE_CHR_SOCKET_RECV_ERR_ENABLED 1
#define TRACE_CHR_SOCKET_RECV_EOF_ENABLED 1
#define TRACE_CHR_SOCKET_WRITE_ERR_ENABLED 1
#define TRACE_CHR_SOCKET_DISCONNECT_ENABLED 1
#define TRACE_CHR_SOCKET_HANGUP_ENABLED 1
#define TRACE_CHR_SOCKET_WS_HANDSHAKE_ERR_ENABLED 1
#define TRACE_CHR_SOCKET_TLS_HANDSHAKE_ERR_ENABLED 1
#define TRACE_CHR_SOCKET_TLS_INIT_ERR_ENABLED 1
#include "qemu/log-for-trace.h"


#define TRACE_WCT_INIT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_WCT_INIT) || \
    false)

static inline void trace_wct_init(void)
{
    if (trace_event_get_state(TRACE_WCT_INIT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 4 "../xemu/chardev/trace-events"
            qemu_log("wct_init " "" "\n");
#line 89 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_WCT_CMD_RE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_WCT_CMD_RE) || \
    false)

static inline void trace_wct_cmd_re(void)
{
    if (trace_event_get_state(TRACE_WCT_CMD_RE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 5 "../xemu/chardev/trace-events"
            qemu_log("wct_cmd_re " "" "\n");
#line 104 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_WCT_CMD_ST_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_WCT_CMD_ST) || \
    false)

static inline void trace_wct_cmd_st(void)
{
    if (trace_event_get_state(TRACE_WCT_CMD_ST)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 6 "../xemu/chardev/trace-events"
            qemu_log("wct_cmd_st " "" "\n");
#line 119 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_WCT_CMD_SP_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_WCT_CMD_SP) || \
    false)

static inline void trace_wct_cmd_sp(void)
{
    if (trace_event_get_state(TRACE_WCT_CMD_SP)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 7 "../xemu/chardev/trace-events"
            qemu_log("wct_cmd_sp " "" "\n");
#line 134 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_WCT_CMD_TS_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_WCT_CMD_TS) || \
    false)

static inline void trace_wct_cmd_ts(int input)
{
    if (trace_event_get_state(TRACE_WCT_CMD_TS)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 8 "../xemu/chardev/trace-events"
            qemu_log("wct_cmd_ts " "0x%02x" "\n", input);
#line 149 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_WCT_CMD_OTHER_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_WCT_CMD_OTHER) || \
    false)

static inline void trace_wct_cmd_other(const char *cmd)
{
    if (trace_event_get_state(TRACE_WCT_CMD_OTHER)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 9 "../xemu/chardev/trace-events"
            qemu_log("wct_cmd_other " "%s" "\n", cmd);
#line 164 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_WCT_SPEED_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_WCT_SPEED) || \
    false)

static inline void trace_wct_speed(int speed)
{
    if (trace_event_get_state(TRACE_WCT_SPEED)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 10 "../xemu/chardev/trace-events"
            qemu_log("wct_speed " "%d" "\n", speed);
#line 179 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_SPICE_CHR_DISCARD_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_SPICE_CHR_DISCARD_WRITE) || \
    false)

static inline void trace_spice_chr_discard_write(int len)
{
    if (trace_event_get_state(TRACE_SPICE_CHR_DISCARD_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 13 "../xemu/chardev/trace-events"
            qemu_log("spice_chr_discard_write " "spice chr write discarded %d" "\n", len);
#line 194 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_SPICE_VMC_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_SPICE_VMC_WRITE) || \
    false)

static inline void trace_spice_vmc_write(ssize_t out, int len)
{
    if (trace_event_get_state(TRACE_SPICE_VMC_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 14 "../xemu/chardev/trace-events"
            qemu_log("spice_vmc_write " "spice wrote %zd of requested %d" "\n", out, len);
#line 209 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_SPICE_VMC_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_SPICE_VMC_READ) || \
    false)

static inline void trace_spice_vmc_read(int bytes, int len)
{
    if (trace_event_get_state(TRACE_SPICE_VMC_READ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 15 "../xemu/chardev/trace-events"
            qemu_log("spice_vmc_read " "spice read %d of requested %d" "\n", bytes, len);
#line 224 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_SPICE_VMC_REGISTER_INTERFACE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_SPICE_VMC_REGISTER_INTERFACE) || \
    false)

static inline void trace_spice_vmc_register_interface(void *scd)
{
    if (trace_event_get_state(TRACE_SPICE_VMC_REGISTER_INTERFACE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 16 "../xemu/chardev/trace-events"
            qemu_log("spice_vmc_register_interface " "spice vmc registered interface %p" "\n", scd);
#line 239 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_SPICE_VMC_UNREGISTER_INTERFACE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_SPICE_VMC_UNREGISTER_INTERFACE) || \
    false)

static inline void trace_spice_vmc_unregister_interface(void *scd)
{
    if (trace_event_get_state(TRACE_SPICE_VMC_UNREGISTER_INTERFACE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 17 "../xemu/chardev/trace-events"
            qemu_log("spice_vmc_unregister_interface " "spice vmc unregistered interface %p" "\n", scd);
#line 254 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_SPICE_VMC_EVENT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_SPICE_VMC_EVENT) || \
    false)

static inline void trace_spice_vmc_event(int event)
{
    if (trace_event_get_state(TRACE_SPICE_VMC_EVENT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 18 "../xemu/chardev/trace-events"
            qemu_log("spice_vmc_event " "spice vmc event %d" "\n", event);
#line 269 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_POLL_ERR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_POLL_ERR) || \
    false)

static inline void trace_chr_socket_poll_err(void *chrdev, const char *label)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_POLL_ERR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 21 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_poll_err " "chardev socket poll error %p (%s)" "\n", chrdev, label);
#line 284 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_RECV_ERR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_RECV_ERR) || \
    false)

static inline void trace_chr_socket_recv_err(void *chrdev, const char *label, const char *err)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_RECV_ERR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 22 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_recv_err " "chardev socket recv error %p (%s): %s" "\n", chrdev, label, err);
#line 299 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_RECV_EOF_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_RECV_EOF) || \
    false)

static inline void trace_chr_socket_recv_eof(void *chrdev, const char *label)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_RECV_EOF)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 23 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_recv_eof " "chardev socket recv end-of-file %p (%s)" "\n", chrdev, label);
#line 314 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_WRITE_ERR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_WRITE_ERR) || \
    false)

static inline void trace_chr_socket_write_err(void *chrdev, const char *label, const char *err)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_WRITE_ERR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 24 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_write_err " "chardev socket write error %p (%s): %s" "\n", chrdev, label, err);
#line 329 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_DISCONNECT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_DISCONNECT) || \
    false)

static inline void trace_chr_socket_disconnect(void *chrdev, const char *label)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_DISCONNECT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 25 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_disconnect " "chardev socket disconnect %p (%s)" "\n", chrdev, label);
#line 344 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_HANGUP_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_HANGUP) || \
    false)

static inline void trace_chr_socket_hangup(void *chrdev, const char *label)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_HANGUP)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 26 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_hangup " "chardev socket hangup %p (%s)" "\n", chrdev, label);
#line 359 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_WS_HANDSHAKE_ERR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_WS_HANDSHAKE_ERR) || \
    false)

static inline void trace_chr_socket_ws_handshake_err(void *chrdev, const char *label, const char *err)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_WS_HANDSHAKE_ERR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 27 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_ws_handshake_err " "chardev socket websock handshake error %p (%s): %s" "\n", chrdev, label, err);
#line 374 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_TLS_HANDSHAKE_ERR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_TLS_HANDSHAKE_ERR) || \
    false)

static inline void trace_chr_socket_tls_handshake_err(void *chrdev, const char *label, const char *err)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_TLS_HANDSHAKE_ERR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 28 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_tls_handshake_err " "chardev socket TLS handshake error %p (%s): %s" "\n", chrdev, label, err);
#line 389 "trace/trace-chardev.h"
        }
    }
}

#define TRACE_CHR_SOCKET_TLS_INIT_ERR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CHR_SOCKET_TLS_INIT_ERR) || \
    false)

static inline void trace_chr_socket_tls_init_err(void *chrdev, const char *label, const char *err)
{
    if (trace_event_get_state(TRACE_CHR_SOCKET_TLS_INIT_ERR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 29 "../xemu/chardev/trace-events"
            qemu_log("chr_socket_tls_init_err " "chardev socket TLS init error %p (%s): %s" "\n", chrdev, label, err);
#line 404 "trace/trace-chardev.h"
        }
    }
}
#endif /* TRACE_CHARDEV_GENERATED_TRACERS_H */
