1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef LITMUS_DEBUG_TRACE_H
#define LITMUS_DEBUG_TRACE_H
#ifdef CONFIG_SCHED_DEBUG_TRACE
void sched_trace_log_message(const char* fmt, ...);
void dump_trace_buffer(int max);
#else
#define sched_trace_log_message(fmt, ...)
#endif
extern atomic_t __log_seq_no;
#define TRACE(fmt, args...) \
sched_trace_log_message("%d P%d: " fmt, atomic_add_return(1, &__log_seq_no), \
raw_smp_processor_id(), ## args)
#define TRACE_TASK(t, fmt, args...) \
TRACE("(%s/%d) " fmt, (t)->comm, (t)->pid, ##args)
#define TRACE_CUR(fmt, args...) \
TRACE_TASK(current, fmt, ## args)
#endif
|