/* This file is autogenerated by tracetool, do not edit. */

#ifndef TRACE_HW_I386_XEN_GENERATED_TRACERS_H
#define TRACE_HW_I386_XEN_GENERATED_TRACERS_H

#include "trace/control.h"

extern TraceEvent _TRACE_XEN_PLATFORM_LOG_EVENT;
extern TraceEvent _TRACE_XEN_PV_MMIO_READ_EVENT;
extern TraceEvent _TRACE_XEN_PV_MMIO_WRITE_EVENT;
extern uint16_t _TRACE_XEN_PLATFORM_LOG_DSTATE;
extern uint16_t _TRACE_XEN_PV_MMIO_READ_DSTATE;
extern uint16_t _TRACE_XEN_PV_MMIO_WRITE_DSTATE;
#define TRACE_XEN_PLATFORM_LOG_ENABLED 1
#define TRACE_XEN_PV_MMIO_READ_ENABLED 1
#define TRACE_XEN_PV_MMIO_WRITE_ENABLED 1
#include "qemu/log-for-trace.h"
#include "qemu/error-report.h"


#define TRACE_XEN_PLATFORM_LOG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_XEN_PLATFORM_LOG) || \
    false)

static inline void _nocheck__trace_xen_platform_log(char * s)
{
    if (trace_event_get_state(TRACE_XEN_PLATFORM_LOG) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 4 "../git/hw/i386/xen/trace-events"
            qemu_log("%d@%zu.%06zu:xen_platform_log " "xen platform: %s" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , s);
#line 37 "trace/trace-hw_i386_xen.h"
        } else {
#line 4 "../git/hw/i386/xen/trace-events"
            qemu_log("xen_platform_log " "xen platform: %s" "\n", s);
#line 41 "trace/trace-hw_i386_xen.h"
        }
    }
}

static inline void trace_xen_platform_log(char * s)
{
    if (true) {
        _nocheck__trace_xen_platform_log(s);
    }
}

#define TRACE_XEN_PV_MMIO_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_XEN_PV_MMIO_READ) || \
    false)

static inline void _nocheck__trace_xen_pv_mmio_read(uint64_t addr)
{
    if (trace_event_get_state(TRACE_XEN_PV_MMIO_READ) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 7 "../git/hw/i386/xen/trace-events"
            qemu_log("%d@%zu.%06zu:xen_pv_mmio_read " "WARNING: read from Xen PV Device MMIO space (address 0x%"PRIx64")" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , addr);
#line 68 "trace/trace-hw_i386_xen.h"
        } else {
#line 7 "../git/hw/i386/xen/trace-events"
            qemu_log("xen_pv_mmio_read " "WARNING: read from Xen PV Device MMIO space (address 0x%"PRIx64")" "\n", addr);
#line 72 "trace/trace-hw_i386_xen.h"
        }
    }
}

static inline void trace_xen_pv_mmio_read(uint64_t addr)
{
    if (true) {
        _nocheck__trace_xen_pv_mmio_read(addr);
    }
}

#define TRACE_XEN_PV_MMIO_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_XEN_PV_MMIO_WRITE) || \
    false)

static inline void _nocheck__trace_xen_pv_mmio_write(uint64_t addr)
{
    if (trace_event_get_state(TRACE_XEN_PV_MMIO_WRITE) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 8 "../git/hw/i386/xen/trace-events"
            qemu_log("%d@%zu.%06zu:xen_pv_mmio_write " "WARNING: write to Xen PV Device MMIO space (address 0x%"PRIx64")" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , addr);
#line 99 "trace/trace-hw_i386_xen.h"
        } else {
#line 8 "../git/hw/i386/xen/trace-events"
            qemu_log("xen_pv_mmio_write " "WARNING: write to Xen PV Device MMIO space (address 0x%"PRIx64")" "\n", addr);
#line 103 "trace/trace-hw_i386_xen.h"
        }
    }
}

static inline void trace_xen_pv_mmio_write(uint64_t addr)
{
    if (true) {
        _nocheck__trace_xen_pv_mmio_write(addr);
    }
}
#endif /* TRACE_HW_I386_XEN_GENERATED_TRACERS_H */
