From 3d58a62727346b7ac1a6cb36fed1a06ed72228dd Mon Sep 17 00:00:00 2001 From: save Date: Mon, 7 Apr 2008 14:17:42 +0000 Subject: Moved the complete svn base into the cesar directory. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1769 017c9cb6-072f-447c-8318-d5b54f68fe89 --- cesar/hle/inc/trace.h | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 cesar/hle/inc/trace.h (limited to 'cesar/hle/inc/trace.h') diff --git a/cesar/hle/inc/trace.h b/cesar/hle/inc/trace.h new file mode 100644 index 0000000000..063bf907d9 --- /dev/null +++ b/cesar/hle/inc/trace.h @@ -0,0 +1,73 @@ +#ifndef hle_inc_trace_h +#define hle_inc_trace_h +/* Cesar project {{{ + * + * Copyright (C) 2007 Spidcom + * + * <<>> + * + * }}} */ +/** + * \file hle/inc/trace.h + * \brief trace system for the HLE. + * \ingroup hle + * + */ + +#include "lib/trace.h" + +/** Shortcut for tracing inside the HLE. */ +#define HLE_TRACE(id, args...)\ + TRACE_FAST_SHORT(HLE_TRACE_, &ctx->trace, id, ## args) + +#if CONFIG_TRACE + +enum +{ + HLE_TRACE_INIT, + HLE_TRACE_UNINIT, + HLE_TRACE_DATA_SEND, + HLE_TRACE_DATA_SEND_DONE, + HLE_TRACE_DATA_BUFFER_ADD, + HLE_TRACE_DATA_RECV, + HLE_TRACE_MME_BUFFER_ADD, + HLE_TRACE_MME_SEND, + HLE_TRACE_MME_SEND_DONE, + HLE_TRACE_MME_RECV, + HLE_TRACE_IPMBOX +}; + +BEGIN_DECLS + +/** + * Initialize the trace buffer + * \param ctx the hle context. + */ +void +hle_trace_init (hle_t *ctx); + +/** + * Uninit the trace buffer + * \param ctx the hle context + */ +void +hle_trace_uninit (hle_t *ctx); + +/** + * Print the trace buffers + * \param ctx the hle context + */ +void +hle_trace_print (hle_t *ctx); + +END_DECLS + +#else /* !CONFIG_TRACE */ + +#define hle_trace_init(ctx) ((void) 0) +#define hle_trace_uninit(ctx) ((void) 0) +#define hle_trace_print(ctx) ((void) 0) + +#endif /* !CONFIG_TRACE */ + +#endif /* hle_inc_trace_h */ -- cgit v1.2.3