20 |
|
|
21 |
#include "libkern.h" |
#include "libkern.h" |
22 |
|
|
23 |
|
struct trace_statistics |
24 |
|
{ |
25 |
|
unsigned int context_switches; |
26 |
|
unsigned int kernel_stacks; |
27 |
|
unsigned int stack_handoffs; |
28 |
|
}; |
29 |
|
|
30 |
|
extern struct trace_statistics trace_stats; |
31 |
|
|
32 |
|
#if DIAGNOSTICS |
33 |
|
#define trace_count(CNT) (trace_stats.CNT) |
34 |
|
#else |
35 |
|
#define trace_count(CNT) |
36 |
|
#endif |
37 |
|
|
38 |
#define trace_printf(fmt...) \ |
#define trace_printf(fmt...) \ |
39 |
_trace_printf (basename (__FILE__), __LINE__, fmt) |
_trace_printf (basename (__FILE__), __LINE__, fmt) |
40 |
extern void _trace_printf (char *, int, char *, ...); |
extern void _trace_printf (char *, int, char *, ...); |