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 #undef TRACE_SYSTEM
27 #define TRACE_SYSTEM amdgpu_dm
28
29 #if !defined(_AMDGPU_DM_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
30 #define _AMDGPU_DM_TRACE_H_
31
32 #include <linux/tracepoint.h>
33
34 TRACE_EVENT(amdgpu_dc_rreg,
35 TP_PROTO(unsigned long *read_count, uint32_t reg, uint32_t value),
36 TP_ARGS(read_count, reg, value),
37 TP_STRUCT__entry(
38 __field(uint32_t, reg)
39 __field(uint32_t, value)
40 ),
41 TP_fast_assign(
42 __entry->reg = reg;
43 __entry->value = value;
44 *read_count = *read_count + 1;
45 ),
46 TP_printk("reg=0x%08lx, value=0x%08lx",
47 (unsigned long)__entry->reg,
48 (unsigned long)__entry->value)
49 );
50
51 TRACE_EVENT(amdgpu_dc_wreg,
52 TP_PROTO(unsigned long *write_count, uint32_t reg, uint32_t value),
53 TP_ARGS(write_count, reg, value),
54 TP_STRUCT__entry(
55 __field(uint32_t, reg)
56 __field(uint32_t, value)
57 ),
58 TP_fast_assign(
59 __entry->reg = reg;
60 __entry->value = value;
61 *write_count = *write_count + 1;
62 ),
63 TP_printk("reg=0x%08lx, value=0x%08lx",
64 (unsigned long)__entry->reg,
65 (unsigned long)__entry->value)
66 );
67
68
69 TRACE_EVENT(amdgpu_dc_performance,
70 TP_PROTO(unsigned long read_count, unsigned long write_count,
71 unsigned long *last_read, unsigned long *last_write,
72 const char *func, unsigned int line),
73 TP_ARGS(read_count, write_count, last_read, last_write, func, line),
74 TP_STRUCT__entry(
75 __field(uint32_t, reads)
76 __field(uint32_t, writes)
77 __field(uint32_t, read_delta)
78 __field(uint32_t, write_delta)
79 __string(func, func)
80 __field(uint32_t, line)
81 ),
82 TP_fast_assign(
83 __entry->reads = read_count;
84 __entry->writes = write_count;
85 __entry->read_delta = read_count - *last_read;
86 __entry->write_delta = write_count - *last_write;
87 __assign_str(func, func);
88 __entry->line = line;
89 *last_read = read_count;
90 *last_write = write_count;
91 ),
92 TP_printk("%s:%d reads=%08ld (%08ld total), writes=%08ld (%08ld total)",
93 __get_str(func), __entry->line,
94 (unsigned long)__entry->read_delta,
95 (unsigned long)__entry->reads,
96 (unsigned long)__entry->write_delta,
97 (unsigned long)__entry->writes)
98 );
99 #endif
100
101 #undef TRACE_INCLUDE_PATH
102 #define TRACE_INCLUDE_PATH .
103 #define TRACE_INCLUDE_FILE amdgpu_dm_trace
104 #include <trace/define_trace.h>