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

#ifndef TRACE_ROOT_GENERATED_TRACERS_H
#define TRACE_ROOT_GENERATED_TRACERS_H

#include "trace/control.h"

extern TraceEvent _TRACE_BREAKPOINT_INSERT_EVENT;
extern TraceEvent _TRACE_BREAKPOINT_REMOVE_EVENT;
extern TraceEvent _TRACE_BREAKPOINT_SINGLESTEP_EVENT;
extern TraceEvent _TRACE_JOB_STATE_TRANSITION_EVENT;
extern TraceEvent _TRACE_JOB_APPLY_VERB_EVENT;
extern TraceEvent _TRACE_JOB_COMPLETED_EVENT;
extern TraceEvent _TRACE_QMP_JOB_CANCEL_EVENT;
extern TraceEvent _TRACE_QMP_JOB_PAUSE_EVENT;
extern TraceEvent _TRACE_QMP_JOB_RESUME_EVENT;
extern TraceEvent _TRACE_QMP_JOB_COMPLETE_EVENT;
extern TraceEvent _TRACE_QMP_JOB_FINALIZE_EVENT;
extern TraceEvent _TRACE_QMP_JOB_DISMISS_EVENT;
extern uint16_t _TRACE_BREAKPOINT_INSERT_DSTATE;
extern uint16_t _TRACE_BREAKPOINT_REMOVE_DSTATE;
extern uint16_t _TRACE_BREAKPOINT_SINGLESTEP_DSTATE;
extern uint16_t _TRACE_JOB_STATE_TRANSITION_DSTATE;
extern uint16_t _TRACE_JOB_APPLY_VERB_DSTATE;
extern uint16_t _TRACE_JOB_COMPLETED_DSTATE;
extern uint16_t _TRACE_QMP_JOB_CANCEL_DSTATE;
extern uint16_t _TRACE_QMP_JOB_PAUSE_DSTATE;
extern uint16_t _TRACE_QMP_JOB_RESUME_DSTATE;
extern uint16_t _TRACE_QMP_JOB_COMPLETE_DSTATE;
extern uint16_t _TRACE_QMP_JOB_FINALIZE_DSTATE;
extern uint16_t _TRACE_QMP_JOB_DISMISS_DSTATE;
#define TRACE_BREAKPOINT_INSERT_ENABLED 1
#define TRACE_BREAKPOINT_REMOVE_ENABLED 1
#define TRACE_BREAKPOINT_SINGLESTEP_ENABLED 1
#define TRACE_JOB_STATE_TRANSITION_ENABLED 1
#define TRACE_JOB_APPLY_VERB_ENABLED 1
#define TRACE_JOB_COMPLETED_ENABLED 1
#define TRACE_QMP_JOB_CANCEL_ENABLED 1
#define TRACE_QMP_JOB_PAUSE_ENABLED 1
#define TRACE_QMP_JOB_RESUME_ENABLED 1
#define TRACE_QMP_JOB_COMPLETE_ENABLED 1
#define TRACE_QMP_JOB_FINALIZE_ENABLED 1
#define TRACE_QMP_JOB_DISMISS_ENABLED 1
#include "qemu/log-for-trace.h"
#include "qemu/error-report.h"


#define TRACE_BREAKPOINT_INSERT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_BREAKPOINT_INSERT) || \
    false)

static inline void _nocheck__trace_breakpoint_insert(int cpu_index, uint64_t pc, int flags)
{
    if (trace_event_get_state(TRACE_BREAKPOINT_INSERT) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 29 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:breakpoint_insert " "cpu=%d pc=0x%" PRIx64 " flags=0x%x" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , cpu_index, pc, flags);
#line 64 "trace/trace-root.h"
        } else {
#line 29 "../xemu/trace-events"
            qemu_log("breakpoint_insert " "cpu=%d pc=0x%" PRIx64 " flags=0x%x" "\n", cpu_index, pc, flags);
#line 68 "trace/trace-root.h"
        }
    }
}

static inline void trace_breakpoint_insert(int cpu_index, uint64_t pc, int flags)
{
    if (true) {
        _nocheck__trace_breakpoint_insert(cpu_index, pc, flags);
    }
}

#define TRACE_BREAKPOINT_REMOVE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_BREAKPOINT_REMOVE) || \
    false)

static inline void _nocheck__trace_breakpoint_remove(int cpu_index, uint64_t pc, int flags)
{
    if (trace_event_get_state(TRACE_BREAKPOINT_REMOVE) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 30 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:breakpoint_remove " "cpu=%d pc=0x%" PRIx64 " flags=0x%x" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , cpu_index, pc, flags);
#line 95 "trace/trace-root.h"
        } else {
#line 30 "../xemu/trace-events"
            qemu_log("breakpoint_remove " "cpu=%d pc=0x%" PRIx64 " flags=0x%x" "\n", cpu_index, pc, flags);
#line 99 "trace/trace-root.h"
        }
    }
}

static inline void trace_breakpoint_remove(int cpu_index, uint64_t pc, int flags)
{
    if (true) {
        _nocheck__trace_breakpoint_remove(cpu_index, pc, flags);
    }
}

#define TRACE_BREAKPOINT_SINGLESTEP_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_BREAKPOINT_SINGLESTEP) || \
    false)

static inline void _nocheck__trace_breakpoint_singlestep(int cpu_index, int enabled)
{
    if (trace_event_get_state(TRACE_BREAKPOINT_SINGLESTEP) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 31 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:breakpoint_singlestep " "cpu=%d enable=%d" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , cpu_index, enabled);
#line 126 "trace/trace-root.h"
        } else {
#line 31 "../xemu/trace-events"
            qemu_log("breakpoint_singlestep " "cpu=%d enable=%d" "\n", cpu_index, enabled);
#line 130 "trace/trace-root.h"
        }
    }
}

static inline void trace_breakpoint_singlestep(int cpu_index, int enabled)
{
    if (true) {
        _nocheck__trace_breakpoint_singlestep(cpu_index, enabled);
    }
}

#define TRACE_JOB_STATE_TRANSITION_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_JOB_STATE_TRANSITION) || \
    false)

static inline void _nocheck__trace_job_state_transition(void * job, int ret, const char * legal, const char * s0, const char * s1)
{
    if (trace_event_get_state(TRACE_JOB_STATE_TRANSITION) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 34 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:job_state_transition " "job %p (ret: %d) attempting %s transition (%s-->%s)" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job, ret, legal, s0, s1);
#line 157 "trace/trace-root.h"
        } else {
#line 34 "../xemu/trace-events"
            qemu_log("job_state_transition " "job %p (ret: %d) attempting %s transition (%s-->%s)" "\n", job, ret, legal, s0, s1);
#line 161 "trace/trace-root.h"
        }
    }
}

static inline void trace_job_state_transition(void * job, int ret, const char * legal, const char * s0, const char * s1)
{
    if (true) {
        _nocheck__trace_job_state_transition(job, ret, legal, s0, s1);
    }
}

#define TRACE_JOB_APPLY_VERB_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_JOB_APPLY_VERB) || \
    false)

static inline void _nocheck__trace_job_apply_verb(void * job, const char * state, const char * verb, const char * legal)
{
    if (trace_event_get_state(TRACE_JOB_APPLY_VERB) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 35 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:job_apply_verb " "job %p in state %s; applying verb %s (%s)" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job, state, verb, legal);
#line 188 "trace/trace-root.h"
        } else {
#line 35 "../xemu/trace-events"
            qemu_log("job_apply_verb " "job %p in state %s; applying verb %s (%s)" "\n", job, state, verb, legal);
#line 192 "trace/trace-root.h"
        }
    }
}

static inline void trace_job_apply_verb(void * job, const char * state, const char * verb, const char * legal)
{
    if (true) {
        _nocheck__trace_job_apply_verb(job, state, verb, legal);
    }
}

#define TRACE_JOB_COMPLETED_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_JOB_COMPLETED) || \
    false)

static inline void _nocheck__trace_job_completed(void * job, int ret)
{
    if (trace_event_get_state(TRACE_JOB_COMPLETED) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 36 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:job_completed " "job %p ret %d" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job, ret);
#line 219 "trace/trace-root.h"
        } else {
#line 36 "../xemu/trace-events"
            qemu_log("job_completed " "job %p ret %d" "\n", job, ret);
#line 223 "trace/trace-root.h"
        }
    }
}

static inline void trace_job_completed(void * job, int ret)
{
    if (true) {
        _nocheck__trace_job_completed(job, ret);
    }
}

#define TRACE_QMP_JOB_CANCEL_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QMP_JOB_CANCEL) || \
    false)

static inline void _nocheck__trace_qmp_job_cancel(void * job)
{
    if (trace_event_get_state(TRACE_QMP_JOB_CANCEL) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 39 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:qmp_job_cancel " "job %p" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job);
#line 250 "trace/trace-root.h"
        } else {
#line 39 "../xemu/trace-events"
            qemu_log("qmp_job_cancel " "job %p" "\n", job);
#line 254 "trace/trace-root.h"
        }
    }
}

static inline void trace_qmp_job_cancel(void * job)
{
    if (true) {
        _nocheck__trace_qmp_job_cancel(job);
    }
}

#define TRACE_QMP_JOB_PAUSE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QMP_JOB_PAUSE) || \
    false)

static inline void _nocheck__trace_qmp_job_pause(void * job)
{
    if (trace_event_get_state(TRACE_QMP_JOB_PAUSE) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 40 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:qmp_job_pause " "job %p" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job);
#line 281 "trace/trace-root.h"
        } else {
#line 40 "../xemu/trace-events"
            qemu_log("qmp_job_pause " "job %p" "\n", job);
#line 285 "trace/trace-root.h"
        }
    }
}

static inline void trace_qmp_job_pause(void * job)
{
    if (true) {
        _nocheck__trace_qmp_job_pause(job);
    }
}

#define TRACE_QMP_JOB_RESUME_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QMP_JOB_RESUME) || \
    false)

static inline void _nocheck__trace_qmp_job_resume(void * job)
{
    if (trace_event_get_state(TRACE_QMP_JOB_RESUME) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 41 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:qmp_job_resume " "job %p" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job);
#line 312 "trace/trace-root.h"
        } else {
#line 41 "../xemu/trace-events"
            qemu_log("qmp_job_resume " "job %p" "\n", job);
#line 316 "trace/trace-root.h"
        }
    }
}

static inline void trace_qmp_job_resume(void * job)
{
    if (true) {
        _nocheck__trace_qmp_job_resume(job);
    }
}

#define TRACE_QMP_JOB_COMPLETE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QMP_JOB_COMPLETE) || \
    false)

static inline void _nocheck__trace_qmp_job_complete(void * job)
{
    if (trace_event_get_state(TRACE_QMP_JOB_COMPLETE) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 42 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:qmp_job_complete " "job %p" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job);
#line 343 "trace/trace-root.h"
        } else {
#line 42 "../xemu/trace-events"
            qemu_log("qmp_job_complete " "job %p" "\n", job);
#line 347 "trace/trace-root.h"
        }
    }
}

static inline void trace_qmp_job_complete(void * job)
{
    if (true) {
        _nocheck__trace_qmp_job_complete(job);
    }
}

#define TRACE_QMP_JOB_FINALIZE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QMP_JOB_FINALIZE) || \
    false)

static inline void _nocheck__trace_qmp_job_finalize(void * job)
{
    if (trace_event_get_state(TRACE_QMP_JOB_FINALIZE) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 43 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:qmp_job_finalize " "job %p" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job);
#line 374 "trace/trace-root.h"
        } else {
#line 43 "../xemu/trace-events"
            qemu_log("qmp_job_finalize " "job %p" "\n", job);
#line 378 "trace/trace-root.h"
        }
    }
}

static inline void trace_qmp_job_finalize(void * job)
{
    if (true) {
        _nocheck__trace_qmp_job_finalize(job);
    }
}

#define TRACE_QMP_JOB_DISMISS_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_QMP_JOB_DISMISS) || \
    false)

static inline void _nocheck__trace_qmp_job_dismiss(void * job)
{
    if (trace_event_get_state(TRACE_QMP_JOB_DISMISS) && qemu_loglevel_mask(LOG_TRACE)) {
        if (message_with_timestamp) {
            struct timeval _now;
            gettimeofday(&_now, NULL);
#line 44 "../xemu/trace-events"
            qemu_log("%d@%zu.%06zu:qmp_job_dismiss " "job %p" "\n",
                     qemu_get_thread_id(),
                     (size_t)_now.tv_sec, (size_t)_now.tv_usec
                     , job);
#line 405 "trace/trace-root.h"
        } else {
#line 44 "../xemu/trace-events"
            qemu_log("qmp_job_dismiss " "job %p" "\n", job);
#line 409 "trace/trace-root.h"
        }
    }
}

static inline void trace_qmp_job_dismiss(void * job)
{
    if (true) {
        _nocheck__trace_qmp_job_dismiss(job);
    }
}
#endif /* TRACE_ROOT_GENERATED_TRACERS_H */
