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
26
27
28
29
30
31
32
33
34
35
36
37
|
#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;
#ifdef CONFIG_SCHED_DEBUG_TRACE_CALLER
#define TRACE_PREFIX "%d P%d [%s@%s:%d]: "
#define TRACE_ARGS atomic_add_return(1, &__log_seq_no), \
raw_smp_processor_id(), \
__FUNCTION__, __FILE__, __LINE__
#else
#define TRACE_PREFIX "%d P%d: "
#define TRACE_ARGS atomic_add_return(1, &__log_seq_no), \
raw_smp_processor_id()
#endif
#define TRACE(fmt, args...) \
sched_trace_log_message(TRACE_PREFIX fmt, \
TRACE_ARGS, ## args)
#define TRACE_TASK(t, fmt, args...) \
TRACE("(%s/%d:%d) " fmt, (t)->comm, (t)->pid, \
(t)->rt_param.job_params.job_no, ##args)
#define TRACE_CUR(fmt, args...) \
TRACE_TASK(current, fmt, ## args)
#endif
|