diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/asoc.h | 45 | ||||
-rw-r--r-- | include/trace/events/sock.h | 68 | ||||
-rw-r--r-- | include/trace/events/udp.h | 32 | ||||
-rw-r--r-- | include/trace/events/vmscan.h | 77 |
4 files changed, 222 insertions, 0 deletions
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h index ae973d2e27a1..603f5a0f0365 100644 --- a/include/trace/events/asoc.h +++ b/include/trace/events/asoc.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | struct snd_soc_jack; | 10 | struct snd_soc_jack; |
11 | struct snd_soc_codec; | 11 | struct snd_soc_codec; |
12 | struct snd_soc_platform; | ||
12 | struct snd_soc_card; | 13 | struct snd_soc_card; |
13 | struct snd_soc_dapm_widget; | 14 | struct snd_soc_dapm_widget; |
14 | 15 | ||
@@ -59,6 +60,50 @@ DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read, | |||
59 | 60 | ||
60 | ); | 61 | ); |
61 | 62 | ||
63 | DECLARE_EVENT_CLASS(snd_soc_preg, | ||
64 | |||
65 | TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, | ||
66 | unsigned int val), | ||
67 | |||
68 | TP_ARGS(platform, reg, val), | ||
69 | |||
70 | TP_STRUCT__entry( | ||
71 | __string( name, platform->name ) | ||
72 | __field( int, id ) | ||
73 | __field( unsigned int, reg ) | ||
74 | __field( unsigned int, val ) | ||
75 | ), | ||
76 | |||
77 | TP_fast_assign( | ||
78 | __assign_str(name, platform->name); | ||
79 | __entry->id = platform->id; | ||
80 | __entry->reg = reg; | ||
81 | __entry->val = val; | ||
82 | ), | ||
83 | |||
84 | TP_printk("platform=%s.%d reg=%x val=%x", __get_str(name), | ||
85 | (int)__entry->id, (unsigned int)__entry->reg, | ||
86 | (unsigned int)__entry->val) | ||
87 | ); | ||
88 | |||
89 | DEFINE_EVENT(snd_soc_preg, snd_soc_preg_write, | ||
90 | |||
91 | TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, | ||
92 | unsigned int val), | ||
93 | |||
94 | TP_ARGS(platform, reg, val) | ||
95 | |||
96 | ); | ||
97 | |||
98 | DEFINE_EVENT(snd_soc_preg, snd_soc_preg_read, | ||
99 | |||
100 | TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, | ||
101 | unsigned int val), | ||
102 | |||
103 | TP_ARGS(platform, reg, val) | ||
104 | |||
105 | ); | ||
106 | |||
62 | DECLARE_EVENT_CLASS(snd_soc_card, | 107 | DECLARE_EVENT_CLASS(snd_soc_card, |
63 | 108 | ||
64 | TP_PROTO(struct snd_soc_card *card, int val), | 109 | TP_PROTO(struct snd_soc_card *card, int val), |
diff --git a/include/trace/events/sock.h b/include/trace/events/sock.h new file mode 100644 index 000000000000..779abb91df81 --- /dev/null +++ b/include/trace/events/sock.h | |||
@@ -0,0 +1,68 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM sock | ||
3 | |||
4 | #if !defined(_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_SOCK_H | ||
6 | |||
7 | #include <net/sock.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | |||
10 | TRACE_EVENT(sock_rcvqueue_full, | ||
11 | |||
12 | TP_PROTO(struct sock *sk, struct sk_buff *skb), | ||
13 | |||
14 | TP_ARGS(sk, skb), | ||
15 | |||
16 | TP_STRUCT__entry( | ||
17 | __field(int, rmem_alloc) | ||
18 | __field(unsigned int, truesize) | ||
19 | __field(int, sk_rcvbuf) | ||
20 | ), | ||
21 | |||
22 | TP_fast_assign( | ||
23 | __entry->rmem_alloc = atomic_read(&sk->sk_rmem_alloc); | ||
24 | __entry->truesize = skb->truesize; | ||
25 | __entry->sk_rcvbuf = sk->sk_rcvbuf; | ||
26 | ), | ||
27 | |||
28 | TP_printk("rmem_alloc=%d truesize=%u sk_rcvbuf=%d", | ||
29 | __entry->rmem_alloc, __entry->truesize, __entry->sk_rcvbuf) | ||
30 | ); | ||
31 | |||
32 | TRACE_EVENT(sock_exceed_buf_limit, | ||
33 | |||
34 | TP_PROTO(struct sock *sk, struct proto *prot, long allocated), | ||
35 | |||
36 | TP_ARGS(sk, prot, allocated), | ||
37 | |||
38 | TP_STRUCT__entry( | ||
39 | __array(char, name, 32) | ||
40 | __field(long *, sysctl_mem) | ||
41 | __field(long, allocated) | ||
42 | __field(int, sysctl_rmem) | ||
43 | __field(int, rmem_alloc) | ||
44 | ), | ||
45 | |||
46 | TP_fast_assign( | ||
47 | strncpy(__entry->name, prot->name, 32); | ||
48 | __entry->sysctl_mem = prot->sysctl_mem; | ||
49 | __entry->allocated = allocated; | ||
50 | __entry->sysctl_rmem = prot->sysctl_rmem[0]; | ||
51 | __entry->rmem_alloc = atomic_read(&sk->sk_rmem_alloc); | ||
52 | ), | ||
53 | |||
54 | TP_printk("proto:%s sysctl_mem=%ld,%ld,%ld allocated=%ld " | ||
55 | "sysctl_rmem=%d rmem_alloc=%d", | ||
56 | __entry->name, | ||
57 | __entry->sysctl_mem[0], | ||
58 | __entry->sysctl_mem[1], | ||
59 | __entry->sysctl_mem[2], | ||
60 | __entry->allocated, | ||
61 | __entry->sysctl_rmem, | ||
62 | __entry->rmem_alloc) | ||
63 | ); | ||
64 | |||
65 | #endif /* _TRACE_SOCK_H */ | ||
66 | |||
67 | /* This part must be outside protection */ | ||
68 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/udp.h b/include/trace/events/udp.h new file mode 100644 index 000000000000..a664bb940973 --- /dev/null +++ b/include/trace/events/udp.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM udp | ||
3 | |||
4 | #if !defined(_TRACE_UDP_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_UDP_H | ||
6 | |||
7 | #include <linux/udp.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | |||
10 | TRACE_EVENT(udp_fail_queue_rcv_skb, | ||
11 | |||
12 | TP_PROTO(int rc, struct sock *sk), | ||
13 | |||
14 | TP_ARGS(rc, sk), | ||
15 | |||
16 | TP_STRUCT__entry( | ||
17 | __field(int, rc) | ||
18 | __field(__u16, lport) | ||
19 | ), | ||
20 | |||
21 | TP_fast_assign( | ||
22 | __entry->rc = rc; | ||
23 | __entry->lport = inet_sk(sk)->inet_num; | ||
24 | ), | ||
25 | |||
26 | TP_printk("rc=%d port=%hu", __entry->rc, __entry->lport) | ||
27 | ); | ||
28 | |||
29 | #endif /* _TRACE_UDP_H */ | ||
30 | |||
31 | /* This part must be outside protection */ | ||
32 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h index b2c33bd955fa..36851f7f13da 100644 --- a/include/trace/events/vmscan.h +++ b/include/trace/events/vmscan.h | |||
@@ -179,6 +179,83 @@ DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_re | |||
179 | TP_ARGS(nr_reclaimed) | 179 | TP_ARGS(nr_reclaimed) |
180 | ); | 180 | ); |
181 | 181 | ||
182 | TRACE_EVENT(mm_shrink_slab_start, | ||
183 | TP_PROTO(struct shrinker *shr, struct shrink_control *sc, | ||
184 | long nr_objects_to_shrink, unsigned long pgs_scanned, | ||
185 | unsigned long lru_pgs, unsigned long cache_items, | ||
186 | unsigned long long delta, unsigned long total_scan), | ||
187 | |||
188 | TP_ARGS(shr, sc, nr_objects_to_shrink, pgs_scanned, lru_pgs, | ||
189 | cache_items, delta, total_scan), | ||
190 | |||
191 | TP_STRUCT__entry( | ||
192 | __field(struct shrinker *, shr) | ||
193 | __field(void *, shrink) | ||
194 | __field(long, nr_objects_to_shrink) | ||
195 | __field(gfp_t, gfp_flags) | ||
196 | __field(unsigned long, pgs_scanned) | ||
197 | __field(unsigned long, lru_pgs) | ||
198 | __field(unsigned long, cache_items) | ||
199 | __field(unsigned long long, delta) | ||
200 | __field(unsigned long, total_scan) | ||
201 | ), | ||
202 | |||
203 | TP_fast_assign( | ||
204 | __entry->shr = shr; | ||
205 | __entry->shrink = shr->shrink; | ||
206 | __entry->nr_objects_to_shrink = nr_objects_to_shrink; | ||
207 | __entry->gfp_flags = sc->gfp_mask; | ||
208 | __entry->pgs_scanned = pgs_scanned; | ||
209 | __entry->lru_pgs = lru_pgs; | ||
210 | __entry->cache_items = cache_items; | ||
211 | __entry->delta = delta; | ||
212 | __entry->total_scan = total_scan; | ||
213 | ), | ||
214 | |||
215 | TP_printk("%pF %p: objects to shrink %ld gfp_flags %s pgs_scanned %ld lru_pgs %ld cache items %ld delta %lld total_scan %ld", | ||
216 | __entry->shrink, | ||
217 | __entry->shr, | ||
218 | __entry->nr_objects_to_shrink, | ||
219 | show_gfp_flags(__entry->gfp_flags), | ||
220 | __entry->pgs_scanned, | ||
221 | __entry->lru_pgs, | ||
222 | __entry->cache_items, | ||
223 | __entry->delta, | ||
224 | __entry->total_scan) | ||
225 | ); | ||
226 | |||
227 | TRACE_EVENT(mm_shrink_slab_end, | ||
228 | TP_PROTO(struct shrinker *shr, int shrinker_retval, | ||
229 | long unused_scan_cnt, long new_scan_cnt), | ||
230 | |||
231 | TP_ARGS(shr, shrinker_retval, unused_scan_cnt, new_scan_cnt), | ||
232 | |||
233 | TP_STRUCT__entry( | ||
234 | __field(struct shrinker *, shr) | ||
235 | __field(void *, shrink) | ||
236 | __field(long, unused_scan) | ||
237 | __field(long, new_scan) | ||
238 | __field(int, retval) | ||
239 | __field(long, total_scan) | ||
240 | ), | ||
241 | |||
242 | TP_fast_assign( | ||
243 | __entry->shr = shr; | ||
244 | __entry->shrink = shr->shrink; | ||
245 | __entry->unused_scan = unused_scan_cnt; | ||
246 | __entry->new_scan = new_scan_cnt; | ||
247 | __entry->retval = shrinker_retval; | ||
248 | __entry->total_scan = new_scan_cnt - unused_scan_cnt; | ||
249 | ), | ||
250 | |||
251 | TP_printk("%pF %p: unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d", | ||
252 | __entry->shrink, | ||
253 | __entry->shr, | ||
254 | __entry->unused_scan, | ||
255 | __entry->new_scan, | ||
256 | __entry->total_scan, | ||
257 | __entry->retval) | ||
258 | ); | ||
182 | 259 | ||
183 | DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, | 260 | DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, |
184 | 261 | ||