Go to the documentation of this file. 22 #ifndef _DEBUG_COMPAT_H_ 23 #define _DEBUG_COMPAT_H_ 29 #if defined(__x86__) || defined(__x86_64__) 33 #if defined(DEBUG) && DEBUG > 0 && defined(x86) 35 #define DEBUGV_ERROR(fmt, args...) \ 36 fprintf(stderr, "ERROR: %s:%d:%s(): " fmt, __FILE__, __LINE__, __func__, \ 39 #define DEBUGV(fmt, args...) \ 40 fprintf(stdout, "DEBUG: %s:%d:%s(): " fmt, __FILE__, __LINE__, __func__, \ 43 #if defined(DEBUG) && DEBUG > 2 && defined(x86) 45 #define DEBUGV3(fmt, args...) \ 46 fprintf(stdout, "DEBUG: %s:%d:%s(): " fmt, __FILE__, __LINE__, __func__, \ 49 #define DEBUGV3_APPEND(fmt, args...) fprintf(stdout, fmt, ##args) 54 #define DEBUGV3_APPEND(...) 58 #elif defined(DEBUG) && DEBUG > 0 && defined(ARM_CM4_FP) 60 #define DEBUGV_ERROR(fmt, args...) \ 61 ::printf("ERROR: %s:%d:%s(): " fmt, __FILE__, __LINE__, __func__, ##args) 63 #define DEBUGV(fmt, args...) \ 64 ::printf("DEBUG: %s:%d:%s(): " fmt, __FILE__, __LINE__, __func__, ##args) 66 #if defined(DEBUG) && DEBUG > 2 && defined(ARM_CM4_FP) 68 #define DEBUGV3(fmt, args...) \ 69 ::printf("DEBUG3: %s:%d:%s(): " fmt, __FILE__, __LINE__, __func__, ##args) 71 #define DEBUGV3_APPEND(fmt, args...) ::printf(fmt, ##args) 77 #define DEBUGV3_APPEND(...) 85 #define DEBUGV_ERROR(...) 86 #define DEBUGV3_APPEND(...) 92 #define START_MEASURE() \ 93 uint64_t start, stop; \ 94 volatile int cycle_count = 0; \ 95 start = clockgettime(); \ 96 // DEBUGV3("START_TIME: %lld\n", start); 98 #define COUNT_CYCLE() cycle_count++; 100 #define STOP_MEASURE() \ 101 stop = clockgettime(); \ 102 DEBUGV("DURATION_TIME:%llu:%u\n", stop - start, cycle_count); 104 #endif //_DEBUG_COMPAT_H_