1/*
2 * Copyright (c) 2016 ETH Zurich.
3 * All rights reserved.
4 *
5 * This file is distributed under the terms in the attached LICENSE file.
6 * If you do not find this file, copies can be found by writing to:
7 * ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
8 */
9#ifndef DQI_DEBUG_H_
10#define DQI_DEBUG_H_ 1
11
12
13//#define DQI_DEBUG_ENABLED 1
14//#define DQI_REGION_DEBUG_ENABLED 1
15//#define DQI_DEBUG_QUEUE_ENABLED 1
16
17/*****************************************************************
18 * Debug printer:
19 *****************************************************************/
20
21#if defined(DQI_DEBUG_ENABLED)
22#define DQI_DEBUG(x...) do { printf("DQI:%s.%d:%s:%d: ", \
23            disp_name(), disp_get_core_id(), __func__, __LINE__); \
24                printf(x);\
25        } while (0)
26
27#else
28#define DQI_DEBUG(x...) ((void)0)
29#endif
30
31#if defined(DQI_REGION_DEBUG_ENABLED)
32#define DQI_DEBUG_REGION(x...) do { printf("DQI_REGION:%s.%d:%s:%d: ", \
33            disp_name(), disp_get_core_id(), __func__, __LINE__); \
34                printf(x);\
35        } while (0)
36
37#else
38#define DQI_DEBUG_REGION(x...) ((void)0)
39#endif
40
41
42#if defined(DQI_DEBUG_QUEUE_ENABLED)
43#define DQI_DEBUG_QUEUE(x...) do { printf("DQI_REGION:%s.%d:%s:%d: ", \
44            disp_name(), disp_get_core_id(), __func__, __LINE__); \
45                printf(x);\
46        } while (0)
47
48#else
49#define DQI_DEBUG_QUEUE(x...) ((void)0)
50#endif
51
52#endif /* DQI_DEBUG_H_ */
53