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

#ifndef TRACE_SYSTEM_GENERATED_TRACERS_H
#define TRACE_SYSTEM_GENERATED_TRACERS_H

#include "trace/control.h"

extern TraceEvent _TRACE_BALLOON_EVENT_EVENT;
extern TraceEvent _TRACE_DMA_BLK_IO_EVENT;
extern TraceEvent _TRACE_DMA_AIO_CANCEL_EVENT;
extern TraceEvent _TRACE_DMA_COMPLETE_EVENT;
extern TraceEvent _TRACE_DMA_BLK_CB_EVENT;
extern TraceEvent _TRACE_DMA_MAP_WAIT_EVENT;
extern TraceEvent _TRACE_CPU_IN_EVENT;
extern TraceEvent _TRACE_CPU_OUT_EVENT;
extern TraceEvent _TRACE_MEMORY_REGION_OPS_READ_EVENT;
extern TraceEvent _TRACE_MEMORY_REGION_OPS_WRITE_EVENT;
extern TraceEvent _TRACE_MEMORY_REGION_SUBPAGE_READ_EVENT;
extern TraceEvent _TRACE_MEMORY_REGION_SUBPAGE_WRITE_EVENT;
extern TraceEvent _TRACE_MEMORY_REGION_RAM_DEVICE_READ_EVENT;
extern TraceEvent _TRACE_MEMORY_REGION_RAM_DEVICE_WRITE_EVENT;
extern TraceEvent _TRACE_MEMORY_REGION_SYNC_DIRTY_EVENT;
extern TraceEvent _TRACE_FLATVIEW_NEW_EVENT;
extern TraceEvent _TRACE_FLATVIEW_DESTROY_EVENT;
extern TraceEvent _TRACE_FLATVIEW_DESTROY_RCU_EVENT;
extern TraceEvent _TRACE_GLOBAL_DIRTY_CHANGED_EVENT;
extern TraceEvent _TRACE_ADDRESS_SPACE_MAP_EVENT;
extern TraceEvent _TRACE_FIND_RAM_OFFSET_EVENT;
extern TraceEvent _TRACE_FIND_RAM_OFFSET_LOOP_EVENT;
extern TraceEvent _TRACE_RAM_BLOCK_DISCARD_RANGE_EVENT;
extern TraceEvent _TRACE_QEMU_RAM_ALLOC_SHARED_EVENT;
extern TraceEvent _TRACE_VM_STOP_FLUSH_ALL_EVENT;
extern TraceEvent _TRACE_VM_STATE_NOTIFY_EVENT;
extern TraceEvent _TRACE_LOAD_FILE_EVENT;
extern TraceEvent _TRACE_RUNSTATE_SET_EVENT;
extern TraceEvent _TRACE_SYSTEM_WAKEUP_REQUEST_EVENT;
extern TraceEvent _TRACE_QEMU_SYSTEM_SHUTDOWN_REQUEST_EVENT;
extern TraceEvent _TRACE_QEMU_SYSTEM_POWERDOWN_REQUEST_EVENT;
extern TraceEvent _TRACE_DIRTYLIMIT_STATE_INITIALIZE_EVENT;
extern TraceEvent _TRACE_DIRTYLIMIT_STATE_FINALIZE_EVENT;
extern TraceEvent _TRACE_DIRTYLIMIT_THROTTLE_PCT_EVENT;
extern TraceEvent _TRACE_DIRTYLIMIT_SET_VCPU_EVENT;
extern TraceEvent _TRACE_DIRTYLIMIT_VCPU_EXECUTE_EVENT;
extern TraceEvent _TRACE_RAM_BLOCK_ATTRIBUTES_STATE_CHANGE_EVENT;
extern uint16_t _TRACE_BALLOON_EVENT_DSTATE;
extern uint16_t _TRACE_DMA_BLK_IO_DSTATE;
extern uint16_t _TRACE_DMA_AIO_CANCEL_DSTATE;
extern uint16_t _TRACE_DMA_COMPLETE_DSTATE;
extern uint16_t _TRACE_DMA_BLK_CB_DSTATE;
extern uint16_t _TRACE_DMA_MAP_WAIT_DSTATE;
extern uint16_t _TRACE_CPU_IN_DSTATE;
extern uint16_t _TRACE_CPU_OUT_DSTATE;
extern uint16_t _TRACE_MEMORY_REGION_OPS_READ_DSTATE;
extern uint16_t _TRACE_MEMORY_REGION_OPS_WRITE_DSTATE;
extern uint16_t _TRACE_MEMORY_REGION_SUBPAGE_READ_DSTATE;
extern uint16_t _TRACE_MEMORY_REGION_SUBPAGE_WRITE_DSTATE;
extern uint16_t _TRACE_MEMORY_REGION_RAM_DEVICE_READ_DSTATE;
extern uint16_t _TRACE_MEMORY_REGION_RAM_DEVICE_WRITE_DSTATE;
extern uint16_t _TRACE_MEMORY_REGION_SYNC_DIRTY_DSTATE;
extern uint16_t _TRACE_FLATVIEW_NEW_DSTATE;
extern uint16_t _TRACE_FLATVIEW_DESTROY_DSTATE;
extern uint16_t _TRACE_FLATVIEW_DESTROY_RCU_DSTATE;
extern uint16_t _TRACE_GLOBAL_DIRTY_CHANGED_DSTATE;
extern uint16_t _TRACE_ADDRESS_SPACE_MAP_DSTATE;
extern uint16_t _TRACE_FIND_RAM_OFFSET_DSTATE;
extern uint16_t _TRACE_FIND_RAM_OFFSET_LOOP_DSTATE;
extern uint16_t _TRACE_RAM_BLOCK_DISCARD_RANGE_DSTATE;
extern uint16_t _TRACE_QEMU_RAM_ALLOC_SHARED_DSTATE;
extern uint16_t _TRACE_VM_STOP_FLUSH_ALL_DSTATE;
extern uint16_t _TRACE_VM_STATE_NOTIFY_DSTATE;
extern uint16_t _TRACE_LOAD_FILE_DSTATE;
extern uint16_t _TRACE_RUNSTATE_SET_DSTATE;
extern uint16_t _TRACE_SYSTEM_WAKEUP_REQUEST_DSTATE;
extern uint16_t _TRACE_QEMU_SYSTEM_SHUTDOWN_REQUEST_DSTATE;
extern uint16_t _TRACE_QEMU_SYSTEM_POWERDOWN_REQUEST_DSTATE;
extern uint16_t _TRACE_DIRTYLIMIT_STATE_INITIALIZE_DSTATE;
extern uint16_t _TRACE_DIRTYLIMIT_STATE_FINALIZE_DSTATE;
extern uint16_t _TRACE_DIRTYLIMIT_THROTTLE_PCT_DSTATE;
extern uint16_t _TRACE_DIRTYLIMIT_SET_VCPU_DSTATE;
extern uint16_t _TRACE_DIRTYLIMIT_VCPU_EXECUTE_DSTATE;
extern uint16_t _TRACE_RAM_BLOCK_ATTRIBUTES_STATE_CHANGE_DSTATE;
#define TRACE_BALLOON_EVENT_ENABLED 1
#define TRACE_DMA_BLK_IO_ENABLED 1
#define TRACE_DMA_AIO_CANCEL_ENABLED 1
#define TRACE_DMA_COMPLETE_ENABLED 1
#define TRACE_DMA_BLK_CB_ENABLED 1
#define TRACE_DMA_MAP_WAIT_ENABLED 1
#define TRACE_CPU_IN_ENABLED 1
#define TRACE_CPU_OUT_ENABLED 1
#define TRACE_MEMORY_REGION_OPS_READ_ENABLED 1
#define TRACE_MEMORY_REGION_OPS_WRITE_ENABLED 1
#define TRACE_MEMORY_REGION_SUBPAGE_READ_ENABLED 1
#define TRACE_MEMORY_REGION_SUBPAGE_WRITE_ENABLED 1
#define TRACE_MEMORY_REGION_RAM_DEVICE_READ_ENABLED 1
#define TRACE_MEMORY_REGION_RAM_DEVICE_WRITE_ENABLED 1
#define TRACE_MEMORY_REGION_SYNC_DIRTY_ENABLED 1
#define TRACE_FLATVIEW_NEW_ENABLED 1
#define TRACE_FLATVIEW_DESTROY_ENABLED 1
#define TRACE_FLATVIEW_DESTROY_RCU_ENABLED 1
#define TRACE_GLOBAL_DIRTY_CHANGED_ENABLED 1
#define TRACE_ADDRESS_SPACE_MAP_ENABLED 1
#define TRACE_FIND_RAM_OFFSET_ENABLED 1
#define TRACE_FIND_RAM_OFFSET_LOOP_ENABLED 1
#define TRACE_RAM_BLOCK_DISCARD_RANGE_ENABLED 1
#define TRACE_QEMU_RAM_ALLOC_SHARED_ENABLED 1
#define TRACE_VM_STOP_FLUSH_ALL_ENABLED 1
#define TRACE_VM_STATE_NOTIFY_ENABLED 1
#define TRACE_LOAD_FILE_ENABLED 1
#define TRACE_RUNSTATE_SET_ENABLED 1
#define TRACE_SYSTEM_WAKEUP_REQUEST_ENABLED 1
#define TRACE_QEMU_SYSTEM_SHUTDOWN_REQUEST_ENABLED 1
#define TRACE_QEMU_SYSTEM_POWERDOWN_REQUEST_ENABLED 1
#define TRACE_DIRTYLIMIT_STATE_INITIALIZE_ENABLED 1
#define TRACE_DIRTYLIMIT_STATE_FINALIZE_ENABLED 1
#define TRACE_DIRTYLIMIT_THROTTLE_PCT_ENABLED 1
#define TRACE_DIRTYLIMIT_SET_VCPU_ENABLED 1
#define TRACE_DIRTYLIMIT_VCPU_EXECUTE_ENABLED 1
#define TRACE_RAM_BLOCK_ATTRIBUTES_STATE_CHANGE_ENABLED 1
#include "qemu/log-for-trace.h"


#define TRACE_BALLOON_EVENT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_BALLOON_EVENT) || \
    false)

static inline void trace_balloon_event(void *opaque, unsigned long addr)
{
    if (trace_event_get_state(TRACE_BALLOON_EVENT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 5 "../xemu/system/trace-events"
            qemu_log("balloon_event " "opaque %p addr %lu" "\n", opaque, addr);
#line 134 "trace/trace-system.h"
        }
    }
}

#define TRACE_DMA_BLK_IO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DMA_BLK_IO) || \
    false)

static inline void trace_dma_blk_io(void *dbs, void *bs, int64_t offset, bool to_dev)
{
    if (trace_event_get_state(TRACE_DMA_BLK_IO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 8 "../xemu/system/trace-events"
            qemu_log("dma_blk_io " "dbs=%p bs=%p offset=%" PRId64 " to_dev=%d" "\n", dbs, bs, offset, to_dev);
#line 149 "trace/trace-system.h"
        }
    }
}

#define TRACE_DMA_AIO_CANCEL_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DMA_AIO_CANCEL) || \
    false)

static inline void trace_dma_aio_cancel(void *dbs)
{
    if (trace_event_get_state(TRACE_DMA_AIO_CANCEL)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 9 "../xemu/system/trace-events"
            qemu_log("dma_aio_cancel " "dbs=%p" "\n", dbs);
#line 164 "trace/trace-system.h"
        }
    }
}

#define TRACE_DMA_COMPLETE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DMA_COMPLETE) || \
    false)

static inline void trace_dma_complete(void *dbs, int ret, void *cb)
{
    if (trace_event_get_state(TRACE_DMA_COMPLETE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 10 "../xemu/system/trace-events"
            qemu_log("dma_complete " "dbs=%p ret=%d cb=%p" "\n", dbs, ret, cb);
#line 179 "trace/trace-system.h"
        }
    }
}

#define TRACE_DMA_BLK_CB_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DMA_BLK_CB) || \
    false)

static inline void trace_dma_blk_cb(void *dbs, int ret)
{
    if (trace_event_get_state(TRACE_DMA_BLK_CB)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 11 "../xemu/system/trace-events"
            qemu_log("dma_blk_cb " "dbs=%p ret=%d" "\n", dbs, ret);
#line 194 "trace/trace-system.h"
        }
    }
}

#define TRACE_DMA_MAP_WAIT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DMA_MAP_WAIT) || \
    false)

static inline void trace_dma_map_wait(void *dbs)
{
    if (trace_event_get_state(TRACE_DMA_MAP_WAIT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 12 "../xemu/system/trace-events"
            qemu_log("dma_map_wait " "dbs=%p" "\n", dbs);
#line 209 "trace/trace-system.h"
        }
    }
}

#define TRACE_CPU_IN_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CPU_IN) || \
    false)

static inline void trace_cpu_in(unsigned int addr, char size, unsigned int val)
{
    if (trace_event_get_state(TRACE_CPU_IN)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 15 "../xemu/system/trace-events"
            qemu_log("cpu_in " "addr 0x%x(%c) value %u" "\n", addr, size, val);
#line 224 "trace/trace-system.h"
        }
    }
}

#define TRACE_CPU_OUT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CPU_OUT) || \
    false)

static inline void trace_cpu_out(unsigned int addr, char size, unsigned int val)
{
    if (trace_event_get_state(TRACE_CPU_OUT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 16 "../xemu/system/trace-events"
            qemu_log("cpu_out " "addr 0x%x(%c) value %u" "\n", addr, size, val);
#line 239 "trace/trace-system.h"
        }
    }
}

#define TRACE_MEMORY_REGION_OPS_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_MEMORY_REGION_OPS_READ) || \
    false)

static inline void trace_memory_region_ops_read(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size, const char *name)
{
    if (trace_event_get_state(TRACE_MEMORY_REGION_OPS_READ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 19 "../xemu/system/trace-events"
            qemu_log("memory_region_ops_read " "cpu %d mr %p addr 0x%"PRIx64" value 0x%"PRIx64" size %u name '%s'" "\n", cpu_index, mr, addr, value, size, name);
#line 254 "trace/trace-system.h"
        }
    }
}

#define TRACE_MEMORY_REGION_OPS_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_MEMORY_REGION_OPS_WRITE) || \
    false)

static inline void trace_memory_region_ops_write(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size, const char *name)
{
    if (trace_event_get_state(TRACE_MEMORY_REGION_OPS_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 20 "../xemu/system/trace-events"
            qemu_log("memory_region_ops_write " "cpu %d mr %p addr 0x%"PRIx64" value 0x%"PRIx64" size %u name '%s'" "\n", cpu_index, mr, addr, value, size, name);
#line 269 "trace/trace-system.h"
        }
    }
}

#define TRACE_MEMORY_REGION_SUBPAGE_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_MEMORY_REGION_SUBPAGE_READ) || \
    false)

static inline void trace_memory_region_subpage_read(int cpu_index, void *mr, uint64_t offset, uint64_t value, unsigned size)
{
    if (trace_event_get_state(TRACE_MEMORY_REGION_SUBPAGE_READ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 21 "../xemu/system/trace-events"
            qemu_log("memory_region_subpage_read " "cpu %d mr %p offset 0x%"PRIx64" value 0x%"PRIx64" size %u" "\n", cpu_index, mr, offset, value, size);
#line 284 "trace/trace-system.h"
        }
    }
}

#define TRACE_MEMORY_REGION_SUBPAGE_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_MEMORY_REGION_SUBPAGE_WRITE) || \
    false)

static inline void trace_memory_region_subpage_write(int cpu_index, void *mr, uint64_t offset, uint64_t value, unsigned size)
{
    if (trace_event_get_state(TRACE_MEMORY_REGION_SUBPAGE_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 22 "../xemu/system/trace-events"
            qemu_log("memory_region_subpage_write " "cpu %d mr %p offset 0x%"PRIx64" value 0x%"PRIx64" size %u" "\n", cpu_index, mr, offset, value, size);
#line 299 "trace/trace-system.h"
        }
    }
}

#define TRACE_MEMORY_REGION_RAM_DEVICE_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_MEMORY_REGION_RAM_DEVICE_READ) || \
    false)

static inline void trace_memory_region_ram_device_read(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size)
{
    if (trace_event_get_state(TRACE_MEMORY_REGION_RAM_DEVICE_READ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 23 "../xemu/system/trace-events"
            qemu_log("memory_region_ram_device_read " "cpu %d mr %p addr 0x%"PRIx64" value 0x%"PRIx64" size %u" "\n", cpu_index, mr, addr, value, size);
#line 314 "trace/trace-system.h"
        }
    }
}

#define TRACE_MEMORY_REGION_RAM_DEVICE_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_MEMORY_REGION_RAM_DEVICE_WRITE) || \
    false)

static inline void trace_memory_region_ram_device_write(int cpu_index, void *mr, uint64_t addr, uint64_t value, unsigned size)
{
    if (trace_event_get_state(TRACE_MEMORY_REGION_RAM_DEVICE_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 24 "../xemu/system/trace-events"
            qemu_log("memory_region_ram_device_write " "cpu %d mr %p addr 0x%"PRIx64" value 0x%"PRIx64" size %u" "\n", cpu_index, mr, addr, value, size);
#line 329 "trace/trace-system.h"
        }
    }
}

#define TRACE_MEMORY_REGION_SYNC_DIRTY_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_MEMORY_REGION_SYNC_DIRTY) || \
    false)

static inline void trace_memory_region_sync_dirty(const char *mr, const char *listener, int global)
{
    if (trace_event_get_state(TRACE_MEMORY_REGION_SYNC_DIRTY)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 25 "../xemu/system/trace-events"
            qemu_log("memory_region_sync_dirty " "mr '%s' listener '%s' synced (global=%d)" "\n", mr, listener, global);
#line 344 "trace/trace-system.h"
        }
    }
}

#define TRACE_FLATVIEW_NEW_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_FLATVIEW_NEW) || \
    false)

static inline void trace_flatview_new(void *view, void *root)
{
    if (trace_event_get_state(TRACE_FLATVIEW_NEW)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 26 "../xemu/system/trace-events"
            qemu_log("flatview_new " "%p (root %p)" "\n", view, root);
#line 359 "trace/trace-system.h"
        }
    }
}

#define TRACE_FLATVIEW_DESTROY_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_FLATVIEW_DESTROY) || \
    false)

static inline void trace_flatview_destroy(void *view, void *root)
{
    if (trace_event_get_state(TRACE_FLATVIEW_DESTROY)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 27 "../xemu/system/trace-events"
            qemu_log("flatview_destroy " "%p (root %p)" "\n", view, root);
#line 374 "trace/trace-system.h"
        }
    }
}

#define TRACE_FLATVIEW_DESTROY_RCU_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_FLATVIEW_DESTROY_RCU) || \
    false)

static inline void trace_flatview_destroy_rcu(void *view, void *root)
{
    if (trace_event_get_state(TRACE_FLATVIEW_DESTROY_RCU)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 28 "../xemu/system/trace-events"
            qemu_log("flatview_destroy_rcu " "%p (root %p)" "\n", view, root);
#line 389 "trace/trace-system.h"
        }
    }
}

#define TRACE_GLOBAL_DIRTY_CHANGED_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_GLOBAL_DIRTY_CHANGED) || \
    false)

static inline void trace_global_dirty_changed(unsigned int bitmask)
{
    if (trace_event_get_state(TRACE_GLOBAL_DIRTY_CHANGED)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 29 "../xemu/system/trace-events"
            qemu_log("global_dirty_changed " "bitmask 0x%"PRIx32 "\n", bitmask);
#line 404 "trace/trace-system.h"
        }
    }
}

#define TRACE_ADDRESS_SPACE_MAP_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ADDRESS_SPACE_MAP) || \
    false)

static inline void trace_address_space_map(void *as, uint64_t addr, uint64_t len, bool is_write, uint32_t attrs)
{
    if (trace_event_get_state(TRACE_ADDRESS_SPACE_MAP)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 32 "../xemu/system/trace-events"
            qemu_log("address_space_map " "as:%p addr 0x%"PRIx64":%"PRIx64" write:%d attrs:0x%x" "\n", as, addr, len, is_write, attrs);
#line 419 "trace/trace-system.h"
        }
    }
}

#define TRACE_FIND_RAM_OFFSET_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_FIND_RAM_OFFSET) || \
    false)

static inline void trace_find_ram_offset(uint64_t size, uint64_t offset)
{
    if (trace_event_get_state(TRACE_FIND_RAM_OFFSET)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 33 "../xemu/system/trace-events"
            qemu_log("find_ram_offset " "size: 0x%" PRIx64 " @ 0x%" PRIx64 "\n", size, offset);
#line 434 "trace/trace-system.h"
        }
    }
}

#define TRACE_FIND_RAM_OFFSET_LOOP_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_FIND_RAM_OFFSET_LOOP) || \
    false)

static inline void trace_find_ram_offset_loop(uint64_t size, uint64_t candidate, uint64_t offset, uint64_t next, uint64_t mingap)
{
    if (trace_event_get_state(TRACE_FIND_RAM_OFFSET_LOOP)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 34 "../xemu/system/trace-events"
            qemu_log("find_ram_offset_loop " "trying size: 0x%" PRIx64 " @ 0x%" PRIx64 ", offset: 0x%" PRIx64" next: 0x%" PRIx64 " mingap: 0x%" PRIx64 "\n", size, candidate, offset, next, mingap);
#line 449 "trace/trace-system.h"
        }
    }
}

#define TRACE_RAM_BLOCK_DISCARD_RANGE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_RAM_BLOCK_DISCARD_RANGE) || \
    false)

static inline void trace_ram_block_discard_range(const char *rbname, void *hva, size_t length, bool need_madvise, bool need_fallocate, int ret)
{
    if (trace_event_get_state(TRACE_RAM_BLOCK_DISCARD_RANGE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 35 "../xemu/system/trace-events"
            qemu_log("ram_block_discard_range " "%s@%p + 0x%zx: madvise: %d fallocate: %d ret: %d" "\n", rbname, hva, length, need_madvise, need_fallocate, ret);
#line 464 "trace/trace-system.h"
        }
    }
}

#define TRACE_QEMU_RAM_ALLOC_SHARED_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QEMU_RAM_ALLOC_SHARED) || \
    false)

static inline void trace_qemu_ram_alloc_shared(const char *name, size_t size, size_t max_size, int fd, void *host)
{
    if (trace_event_get_state(TRACE_QEMU_RAM_ALLOC_SHARED)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 36 "../xemu/system/trace-events"
            qemu_log("qemu_ram_alloc_shared " "%s size %zu max_size %zu fd %d host %p" "\n", name, size, max_size, fd, host);
#line 479 "trace/trace-system.h"
        }
    }
}

#define TRACE_VM_STOP_FLUSH_ALL_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VM_STOP_FLUSH_ALL) || \
    false)

static inline void trace_vm_stop_flush_all(int ret)
{
    if (trace_event_get_state(TRACE_VM_STOP_FLUSH_ALL)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 39 "../xemu/system/trace-events"
            qemu_log("vm_stop_flush_all " "ret %d" "\n", ret);
#line 494 "trace/trace-system.h"
        }
    }
}

#define TRACE_VM_STATE_NOTIFY_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VM_STATE_NOTIFY) || \
    false)

static inline void trace_vm_state_notify(int running, int reason, const char *reason_str)
{
    if (trace_event_get_state(TRACE_VM_STATE_NOTIFY)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 42 "../xemu/system/trace-events"
            qemu_log("vm_state_notify " "running %d reason %d (%s)" "\n", running, reason, reason_str);
#line 509 "trace/trace-system.h"
        }
    }
}

#define TRACE_LOAD_FILE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_LOAD_FILE) || \
    false)

static inline void trace_load_file(const char *name, const char *path)
{
    if (trace_event_get_state(TRACE_LOAD_FILE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 43 "../xemu/system/trace-events"
            qemu_log("load_file " "name %s location %s" "\n", name, path);
#line 524 "trace/trace-system.h"
        }
    }
}

#define TRACE_RUNSTATE_SET_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_RUNSTATE_SET) || \
    false)

static inline void trace_runstate_set(int current_state, const char *current_state_str, int new_state, const char *new_state_str)
{
    if (trace_event_get_state(TRACE_RUNSTATE_SET)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 44 "../xemu/system/trace-events"
            qemu_log("runstate_set " "current_run_state %d (%s) new_state %d (%s)" "\n", current_state, current_state_str, new_state, new_state_str);
#line 539 "trace/trace-system.h"
        }
    }
}

#define TRACE_SYSTEM_WAKEUP_REQUEST_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_SYSTEM_WAKEUP_REQUEST) || \
    false)

static inline void trace_system_wakeup_request(int reason)
{
    if (trace_event_get_state(TRACE_SYSTEM_WAKEUP_REQUEST)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 45 "../xemu/system/trace-events"
            qemu_log("system_wakeup_request " "reason=%d" "\n", reason);
#line 554 "trace/trace-system.h"
        }
    }
}

#define TRACE_QEMU_SYSTEM_SHUTDOWN_REQUEST_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QEMU_SYSTEM_SHUTDOWN_REQUEST) || \
    false)

static inline void trace_qemu_system_shutdown_request(int reason)
{
    if (trace_event_get_state(TRACE_QEMU_SYSTEM_SHUTDOWN_REQUEST)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 46 "../xemu/system/trace-events"
            qemu_log("qemu_system_shutdown_request " "reason=%d" "\n", reason);
#line 569 "trace/trace-system.h"
        }
    }
}

#define TRACE_QEMU_SYSTEM_POWERDOWN_REQUEST_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QEMU_SYSTEM_POWERDOWN_REQUEST) || \
    false)

static inline void trace_qemu_system_powerdown_request(void)
{
    if (trace_event_get_state(TRACE_QEMU_SYSTEM_POWERDOWN_REQUEST)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 47 "../xemu/system/trace-events"
            qemu_log("qemu_system_powerdown_request " "" "\n");
#line 584 "trace/trace-system.h"
        }
    }
}

#define TRACE_DIRTYLIMIT_STATE_INITIALIZE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DIRTYLIMIT_STATE_INITIALIZE) || \
    false)

static inline void trace_dirtylimit_state_initialize(int max_cpus)
{
    if (trace_event_get_state(TRACE_DIRTYLIMIT_STATE_INITIALIZE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 50 "../xemu/system/trace-events"
            qemu_log("dirtylimit_state_initialize " "dirtylimit state initialize: max cpus %d" "\n", max_cpus);
#line 599 "trace/trace-system.h"
        }
    }
}

#define TRACE_DIRTYLIMIT_STATE_FINALIZE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DIRTYLIMIT_STATE_FINALIZE) || \
    false)

static inline void trace_dirtylimit_state_finalize(void)
{
    if (trace_event_get_state(TRACE_DIRTYLIMIT_STATE_FINALIZE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 51 "../xemu/system/trace-events"
            qemu_log("dirtylimit_state_finalize "  "\n");
#line 614 "trace/trace-system.h"
        }
    }
}

#define TRACE_DIRTYLIMIT_THROTTLE_PCT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DIRTYLIMIT_THROTTLE_PCT) || \
    false)

static inline void trace_dirtylimit_throttle_pct(int cpu_index, uint64_t pct, int64_t time_us)
{
    if (trace_event_get_state(TRACE_DIRTYLIMIT_THROTTLE_PCT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 52 "../xemu/system/trace-events"
            qemu_log("dirtylimit_throttle_pct " "CPU[%d] throttle percent: %" PRIu64 ", throttle adjust time %"PRIi64 " us" "\n", cpu_index, pct, time_us);
#line 629 "trace/trace-system.h"
        }
    }
}

#define TRACE_DIRTYLIMIT_SET_VCPU_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DIRTYLIMIT_SET_VCPU) || \
    false)

static inline void trace_dirtylimit_set_vcpu(int cpu_index, uint64_t quota)
{
    if (trace_event_get_state(TRACE_DIRTYLIMIT_SET_VCPU)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 53 "../xemu/system/trace-events"
            qemu_log("dirtylimit_set_vcpu " "CPU[%d] set dirty page rate limit %"PRIu64 "\n", cpu_index, quota);
#line 644 "trace/trace-system.h"
        }
    }
}

#define TRACE_DIRTYLIMIT_VCPU_EXECUTE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DIRTYLIMIT_VCPU_EXECUTE) || \
    false)

static inline void trace_dirtylimit_vcpu_execute(int cpu_index, int64_t sleep_time_us)
{
    if (trace_event_get_state(TRACE_DIRTYLIMIT_VCPU_EXECUTE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 54 "../xemu/system/trace-events"
            qemu_log("dirtylimit_vcpu_execute " "CPU[%d] sleep %"PRIi64 " us" "\n", cpu_index, sleep_time_us);
#line 659 "trace/trace-system.h"
        }
    }
}

#define TRACE_RAM_BLOCK_ATTRIBUTES_STATE_CHANGE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_RAM_BLOCK_ATTRIBUTES_STATE_CHANGE) || \
    false)

static inline void trace_ram_block_attributes_state_change(uint64_t offset, uint64_t size, const char *from, const char *to)
{
    if (trace_event_get_state(TRACE_RAM_BLOCK_ATTRIBUTES_STATE_CHANGE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 57 "../xemu/system/trace-events"
            qemu_log("ram_block_attributes_state_change " "offset 0x%"PRIx64" size 0x%"PRIx64" from '%s' to '%s'" "\n", offset, size, from, to);
#line 674 "trace/trace-system.h"
        }
    }
}
#endif /* TRACE_SYSTEM_GENERATED_TRACERS_H */
