drm/panel: samsung-s6e88a0-ams452ef01: transition to mipi_dsi wrapped functions
[drm/drm-misc.git] / include / trace / events / cachefiles.h
blob7d931db02b9346ac1c57a4e191399fb0c5e65eb8
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* CacheFiles tracepoints
4 * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved.
5 * Written by David Howells (dhowells@redhat.com)
6 */
7 #undef TRACE_SYSTEM
8 #define TRACE_SYSTEM cachefiles
10 #if !defined(_TRACE_CACHEFILES_H) || defined(TRACE_HEADER_MULTI_READ)
11 #define _TRACE_CACHEFILES_H
13 #include <linux/tracepoint.h>
16 * Define enums for tracing information.
18 #ifndef __CACHEFILES_DECLARE_TRACE_ENUMS_ONCE_ONLY
19 #define __CACHEFILES_DECLARE_TRACE_ENUMS_ONCE_ONLY
21 enum cachefiles_obj_ref_trace {
22 cachefiles_obj_get_ioreq,
23 cachefiles_obj_new,
24 cachefiles_obj_put_alloc_fail,
25 cachefiles_obj_put_detach,
26 cachefiles_obj_put_ioreq,
27 cachefiles_obj_see_clean_commit,
28 cachefiles_obj_see_clean_delete,
29 cachefiles_obj_see_clean_drop_tmp,
30 cachefiles_obj_see_lookup_cookie,
31 cachefiles_obj_see_lookup_failed,
32 cachefiles_obj_see_withdraw_cookie,
33 cachefiles_obj_see_withdrawal,
34 cachefiles_obj_get_ondemand_fd,
35 cachefiles_obj_put_ondemand_fd,
36 cachefiles_obj_get_read_req,
37 cachefiles_obj_put_read_req,
40 enum fscache_why_object_killed {
41 FSCACHE_OBJECT_IS_STALE,
42 FSCACHE_OBJECT_IS_WEIRD,
43 FSCACHE_OBJECT_INVALIDATED,
44 FSCACHE_OBJECT_NO_SPACE,
45 FSCACHE_OBJECT_WAS_RETIRED,
46 FSCACHE_OBJECT_WAS_CULLED,
47 FSCACHE_VOLUME_IS_WEIRD,
50 enum cachefiles_coherency_trace {
51 cachefiles_coherency_check_aux,
52 cachefiles_coherency_check_content,
53 cachefiles_coherency_check_dirty,
54 cachefiles_coherency_check_len,
55 cachefiles_coherency_check_objsize,
56 cachefiles_coherency_check_ok,
57 cachefiles_coherency_check_type,
58 cachefiles_coherency_check_xattr,
59 cachefiles_coherency_set_fail,
60 cachefiles_coherency_set_ok,
61 cachefiles_coherency_vol_check_cmp,
62 cachefiles_coherency_vol_check_ok,
63 cachefiles_coherency_vol_check_resv,
64 cachefiles_coherency_vol_check_xattr,
65 cachefiles_coherency_vol_set_fail,
66 cachefiles_coherency_vol_set_ok,
69 enum cachefiles_trunc_trace {
70 cachefiles_trunc_dio_adjust,
71 cachefiles_trunc_expand_tmpfile,
72 cachefiles_trunc_shrink,
75 enum cachefiles_prepare_read_trace {
76 cachefiles_trace_read_after_eof,
77 cachefiles_trace_read_found_hole,
78 cachefiles_trace_read_found_part,
79 cachefiles_trace_read_have_data,
80 cachefiles_trace_read_no_data,
81 cachefiles_trace_read_no_file,
82 cachefiles_trace_read_seek_error,
83 cachefiles_trace_read_seek_nxio,
86 enum cachefiles_error_trace {
87 cachefiles_trace_fallocate_error,
88 cachefiles_trace_getxattr_error,
89 cachefiles_trace_link_error,
90 cachefiles_trace_lookup_error,
91 cachefiles_trace_mkdir_error,
92 cachefiles_trace_notify_change_error,
93 cachefiles_trace_open_error,
94 cachefiles_trace_read_error,
95 cachefiles_trace_remxattr_error,
96 cachefiles_trace_rename_error,
97 cachefiles_trace_seek_error,
98 cachefiles_trace_setxattr_error,
99 cachefiles_trace_statfs_error,
100 cachefiles_trace_tmpfile_error,
101 cachefiles_trace_trunc_error,
102 cachefiles_trace_unlink_error,
103 cachefiles_trace_write_error,
106 #endif
109 * Define enum -> string mappings for display.
111 #define cachefiles_obj_kill_traces \
112 EM(FSCACHE_OBJECT_IS_STALE, "stale") \
113 EM(FSCACHE_OBJECT_IS_WEIRD, "weird") \
114 EM(FSCACHE_OBJECT_INVALIDATED, "inval") \
115 EM(FSCACHE_OBJECT_NO_SPACE, "no_space") \
116 EM(FSCACHE_OBJECT_WAS_RETIRED, "was_retired") \
117 EM(FSCACHE_OBJECT_WAS_CULLED, "was_culled") \
118 E_(FSCACHE_VOLUME_IS_WEIRD, "volume_weird")
120 #define cachefiles_obj_ref_traces \
121 EM(cachefiles_obj_get_ioreq, "GET ioreq") \
122 EM(cachefiles_obj_new, "NEW obj") \
123 EM(cachefiles_obj_put_alloc_fail, "PUT alloc_fail") \
124 EM(cachefiles_obj_put_detach, "PUT detach") \
125 EM(cachefiles_obj_put_ioreq, "PUT ioreq") \
126 EM(cachefiles_obj_see_clean_commit, "SEE clean_commit") \
127 EM(cachefiles_obj_see_clean_delete, "SEE clean_delete") \
128 EM(cachefiles_obj_see_clean_drop_tmp, "SEE clean_drop_tmp") \
129 EM(cachefiles_obj_see_lookup_cookie, "SEE lookup_cookie") \
130 EM(cachefiles_obj_see_lookup_failed, "SEE lookup_failed") \
131 EM(cachefiles_obj_see_withdraw_cookie, "SEE withdraw_cookie") \
132 EM(cachefiles_obj_see_withdrawal, "SEE withdrawal") \
133 EM(cachefiles_obj_get_ondemand_fd, "GET ondemand_fd") \
134 EM(cachefiles_obj_put_ondemand_fd, "PUT ondemand_fd") \
135 EM(cachefiles_obj_get_read_req, "GET read_req") \
136 E_(cachefiles_obj_put_read_req, "PUT read_req")
138 #define cachefiles_coherency_traces \
139 EM(cachefiles_coherency_check_aux, "BAD aux ") \
140 EM(cachefiles_coherency_check_content, "BAD cont") \
141 EM(cachefiles_coherency_check_dirty, "BAD dirt") \
142 EM(cachefiles_coherency_check_len, "BAD len ") \
143 EM(cachefiles_coherency_check_objsize, "BAD osiz") \
144 EM(cachefiles_coherency_check_ok, "OK ") \
145 EM(cachefiles_coherency_check_type, "BAD type") \
146 EM(cachefiles_coherency_check_xattr, "BAD xatt") \
147 EM(cachefiles_coherency_set_fail, "SET fail") \
148 EM(cachefiles_coherency_set_ok, "SET ok ") \
149 EM(cachefiles_coherency_vol_check_cmp, "VOL BAD cmp ") \
150 EM(cachefiles_coherency_vol_check_ok, "VOL OK ") \
151 EM(cachefiles_coherency_vol_check_resv, "VOL BAD resv") \
152 EM(cachefiles_coherency_vol_check_xattr,"VOL BAD xatt") \
153 EM(cachefiles_coherency_vol_set_fail, "VOL SET fail") \
154 E_(cachefiles_coherency_vol_set_ok, "VOL SET ok ")
156 #define cachefiles_trunc_traces \
157 EM(cachefiles_trunc_dio_adjust, "DIOADJ") \
158 EM(cachefiles_trunc_expand_tmpfile, "EXPTMP") \
159 E_(cachefiles_trunc_shrink, "SHRINK")
161 #define cachefiles_prepare_read_traces \
162 EM(cachefiles_trace_read_after_eof, "after-eof ") \
163 EM(cachefiles_trace_read_found_hole, "found-hole") \
164 EM(cachefiles_trace_read_found_part, "found-part") \
165 EM(cachefiles_trace_read_have_data, "have-data ") \
166 EM(cachefiles_trace_read_no_data, "no-data ") \
167 EM(cachefiles_trace_read_no_file, "no-file ") \
168 EM(cachefiles_trace_read_seek_error, "seek-error") \
169 E_(cachefiles_trace_read_seek_nxio, "seek-enxio")
171 #define cachefiles_error_traces \
172 EM(cachefiles_trace_fallocate_error, "fallocate") \
173 EM(cachefiles_trace_getxattr_error, "getxattr") \
174 EM(cachefiles_trace_link_error, "link") \
175 EM(cachefiles_trace_lookup_error, "lookup") \
176 EM(cachefiles_trace_mkdir_error, "mkdir") \
177 EM(cachefiles_trace_notify_change_error, "notify_change") \
178 EM(cachefiles_trace_open_error, "open") \
179 EM(cachefiles_trace_read_error, "read") \
180 EM(cachefiles_trace_remxattr_error, "remxattr") \
181 EM(cachefiles_trace_rename_error, "rename") \
182 EM(cachefiles_trace_seek_error, "seek") \
183 EM(cachefiles_trace_setxattr_error, "setxattr") \
184 EM(cachefiles_trace_statfs_error, "statfs") \
185 EM(cachefiles_trace_tmpfile_error, "tmpfile") \
186 EM(cachefiles_trace_trunc_error, "trunc") \
187 EM(cachefiles_trace_unlink_error, "unlink") \
188 E_(cachefiles_trace_write_error, "write")
192 * Export enum symbols via userspace.
194 #undef EM
195 #undef E_
196 #define EM(a, b) TRACE_DEFINE_ENUM(a);
197 #define E_(a, b) TRACE_DEFINE_ENUM(a);
199 cachefiles_obj_kill_traces;
200 cachefiles_obj_ref_traces;
201 cachefiles_coherency_traces;
202 cachefiles_trunc_traces;
203 cachefiles_prepare_read_traces;
204 cachefiles_error_traces;
207 * Now redefine the EM() and E_() macros to map the enums to the strings that
208 * will be printed in the output.
210 #undef EM
211 #undef E_
212 #define EM(a, b) { a, b },
213 #define E_(a, b) { a, b }
216 TRACE_EVENT(cachefiles_ref,
217 TP_PROTO(unsigned int object_debug_id,
218 unsigned int cookie_debug_id,
219 int usage,
220 enum cachefiles_obj_ref_trace why),
222 TP_ARGS(object_debug_id, cookie_debug_id, usage, why),
224 /* Note that obj may be NULL */
225 TP_STRUCT__entry(
226 __field(unsigned int, obj )
227 __field(unsigned int, cookie )
228 __field(enum cachefiles_obj_ref_trace, why )
229 __field(int, usage )
232 TP_fast_assign(
233 __entry->obj = object_debug_id;
234 __entry->cookie = cookie_debug_id;
235 __entry->usage = usage;
236 __entry->why = why;
239 TP_printk("c=%08x o=%08x u=%d %s",
240 __entry->cookie, __entry->obj, __entry->usage,
241 __print_symbolic(__entry->why, cachefiles_obj_ref_traces))
244 TRACE_EVENT(cachefiles_lookup,
245 TP_PROTO(struct cachefiles_object *obj,
246 struct dentry *dir,
247 struct dentry *de),
249 TP_ARGS(obj, dir, de),
251 TP_STRUCT__entry(
252 __field(unsigned int, obj )
253 __field(short, error )
254 __field(unsigned long, dino )
255 __field(unsigned long, ino )
258 TP_fast_assign(
259 __entry->obj = obj ? obj->debug_id : 0;
260 __entry->dino = d_backing_inode(dir)->i_ino;
261 __entry->ino = (!IS_ERR(de) && d_backing_inode(de) ?
262 d_backing_inode(de)->i_ino : 0);
263 __entry->error = IS_ERR(de) ? PTR_ERR(de) : 0;
266 TP_printk("o=%08x dB=%lx B=%lx e=%d",
267 __entry->obj, __entry->dino, __entry->ino, __entry->error)
270 TRACE_EVENT(cachefiles_mkdir,
271 TP_PROTO(struct dentry *dir, struct dentry *subdir),
273 TP_ARGS(dir, subdir),
275 TP_STRUCT__entry(
276 __field(unsigned int, dir )
277 __field(unsigned int, subdir )
280 TP_fast_assign(
281 __entry->dir = d_backing_inode(dir)->i_ino;
282 __entry->subdir = d_backing_inode(subdir)->i_ino;
285 TP_printk("dB=%x sB=%x",
286 __entry->dir,
287 __entry->subdir)
290 TRACE_EVENT(cachefiles_tmpfile,
291 TP_PROTO(struct cachefiles_object *obj, struct inode *backer),
293 TP_ARGS(obj, backer),
295 TP_STRUCT__entry(
296 __field(unsigned int, obj )
297 __field(unsigned int, backer )
300 TP_fast_assign(
301 __entry->obj = obj->debug_id;
302 __entry->backer = backer->i_ino;
305 TP_printk("o=%08x B=%x",
306 __entry->obj,
307 __entry->backer)
310 TRACE_EVENT(cachefiles_link,
311 TP_PROTO(struct cachefiles_object *obj, struct inode *backer),
313 TP_ARGS(obj, backer),
315 TP_STRUCT__entry(
316 __field(unsigned int, obj )
317 __field(unsigned int, backer )
320 TP_fast_assign(
321 __entry->obj = obj->debug_id;
322 __entry->backer = backer->i_ino;
325 TP_printk("o=%08x B=%x",
326 __entry->obj,
327 __entry->backer)
330 TRACE_EVENT(cachefiles_unlink,
331 TP_PROTO(struct cachefiles_object *obj,
332 ino_t ino,
333 enum fscache_why_object_killed why),
335 TP_ARGS(obj, ino, why),
337 /* Note that obj may be NULL */
338 TP_STRUCT__entry(
339 __field(unsigned int, obj )
340 __field(unsigned int, ino )
341 __field(enum fscache_why_object_killed, why )
344 TP_fast_assign(
345 __entry->obj = obj ? obj->debug_id : UINT_MAX;
346 __entry->ino = ino;
347 __entry->why = why;
350 TP_printk("o=%08x B=%x w=%s",
351 __entry->obj, __entry->ino,
352 __print_symbolic(__entry->why, cachefiles_obj_kill_traces))
355 TRACE_EVENT(cachefiles_rename,
356 TP_PROTO(struct cachefiles_object *obj,
357 ino_t ino,
358 enum fscache_why_object_killed why),
360 TP_ARGS(obj, ino, why),
362 /* Note that obj may be NULL */
363 TP_STRUCT__entry(
364 __field(unsigned int, obj )
365 __field(unsigned int, ino )
366 __field(enum fscache_why_object_killed, why )
369 TP_fast_assign(
370 __entry->obj = obj ? obj->debug_id : UINT_MAX;
371 __entry->ino = ino;
372 __entry->why = why;
375 TP_printk("o=%08x B=%x w=%s",
376 __entry->obj, __entry->ino,
377 __print_symbolic(__entry->why, cachefiles_obj_kill_traces))
380 TRACE_EVENT(cachefiles_coherency,
381 TP_PROTO(struct cachefiles_object *obj,
382 ino_t ino,
383 enum cachefiles_content content,
384 enum cachefiles_coherency_trace why),
386 TP_ARGS(obj, ino, content, why),
388 /* Note that obj may be NULL */
389 TP_STRUCT__entry(
390 __field(unsigned int, obj )
391 __field(enum cachefiles_coherency_trace, why )
392 __field(enum cachefiles_content, content )
393 __field(u64, ino )
396 TP_fast_assign(
397 __entry->obj = obj->debug_id;
398 __entry->why = why;
399 __entry->content = content;
400 __entry->ino = ino;
403 TP_printk("o=%08x %s B=%llx c=%u",
404 __entry->obj,
405 __print_symbolic(__entry->why, cachefiles_coherency_traces),
406 __entry->ino,
407 __entry->content)
410 TRACE_EVENT(cachefiles_vol_coherency,
411 TP_PROTO(struct cachefiles_volume *volume,
412 ino_t ino,
413 enum cachefiles_coherency_trace why),
415 TP_ARGS(volume, ino, why),
417 /* Note that obj may be NULL */
418 TP_STRUCT__entry(
419 __field(unsigned int, vol )
420 __field(enum cachefiles_coherency_trace, why )
421 __field(u64, ino )
424 TP_fast_assign(
425 __entry->vol = volume->vcookie->debug_id;
426 __entry->why = why;
427 __entry->ino = ino;
430 TP_printk("V=%08x %s B=%llx",
431 __entry->vol,
432 __print_symbolic(__entry->why, cachefiles_coherency_traces),
433 __entry->ino)
436 TRACE_EVENT(cachefiles_prep_read,
437 TP_PROTO(struct cachefiles_object *obj,
438 loff_t start,
439 size_t len,
440 unsigned short flags,
441 enum netfs_io_source source,
442 enum cachefiles_prepare_read_trace why,
443 ino_t cache_inode, ino_t netfs_inode),
445 TP_ARGS(obj, start, len, flags, source, why, cache_inode, netfs_inode),
447 TP_STRUCT__entry(
448 __field(unsigned int, obj )
449 __field(unsigned short, flags )
450 __field(enum netfs_io_source, source )
451 __field(enum cachefiles_prepare_read_trace, why )
452 __field(size_t, len )
453 __field(loff_t, start )
454 __field(unsigned int, netfs_inode )
455 __field(unsigned int, cache_inode )
458 TP_fast_assign(
459 __entry->obj = obj ? obj->debug_id : 0;
460 __entry->flags = flags;
461 __entry->source = source;
462 __entry->why = why;
463 __entry->len = len;
464 __entry->start = start;
465 __entry->netfs_inode = netfs_inode;
466 __entry->cache_inode = cache_inode;
469 TP_printk("o=%08x %s %s f=%02x s=%llx %zx ni=%x B=%x",
470 __entry->obj,
471 __print_symbolic(__entry->source, netfs_sreq_sources),
472 __print_symbolic(__entry->why, cachefiles_prepare_read_traces),
473 __entry->flags,
474 __entry->start, __entry->len,
475 __entry->netfs_inode, __entry->cache_inode)
478 TRACE_EVENT(cachefiles_read,
479 TP_PROTO(struct cachefiles_object *obj,
480 struct inode *backer,
481 loff_t start,
482 size_t len),
484 TP_ARGS(obj, backer, start, len),
486 TP_STRUCT__entry(
487 __field(unsigned int, obj )
488 __field(unsigned int, backer )
489 __field(size_t, len )
490 __field(loff_t, start )
493 TP_fast_assign(
494 __entry->obj = obj->debug_id;
495 __entry->backer = backer->i_ino;
496 __entry->start = start;
497 __entry->len = len;
500 TP_printk("o=%08x B=%x s=%llx l=%zx",
501 __entry->obj,
502 __entry->backer,
503 __entry->start,
504 __entry->len)
507 TRACE_EVENT(cachefiles_write,
508 TP_PROTO(struct cachefiles_object *obj,
509 struct inode *backer,
510 loff_t start,
511 size_t len),
513 TP_ARGS(obj, backer, start, len),
515 TP_STRUCT__entry(
516 __field(unsigned int, obj )
517 __field(unsigned int, backer )
518 __field(size_t, len )
519 __field(loff_t, start )
522 TP_fast_assign(
523 __entry->obj = obj->debug_id;
524 __entry->backer = backer->i_ino;
525 __entry->start = start;
526 __entry->len = len;
529 TP_printk("o=%08x B=%x s=%llx l=%zx",
530 __entry->obj,
531 __entry->backer,
532 __entry->start,
533 __entry->len)
536 TRACE_EVENT(cachefiles_trunc,
537 TP_PROTO(struct cachefiles_object *obj, struct inode *backer,
538 loff_t from, loff_t to, enum cachefiles_trunc_trace why),
540 TP_ARGS(obj, backer, from, to, why),
542 TP_STRUCT__entry(
543 __field(unsigned int, obj )
544 __field(unsigned int, backer )
545 __field(enum cachefiles_trunc_trace, why )
546 __field(loff_t, from )
547 __field(loff_t, to )
550 TP_fast_assign(
551 __entry->obj = obj->debug_id;
552 __entry->backer = backer->i_ino;
553 __entry->from = from;
554 __entry->to = to;
555 __entry->why = why;
558 TP_printk("o=%08x B=%x %s l=%llx->%llx",
559 __entry->obj,
560 __entry->backer,
561 __print_symbolic(__entry->why, cachefiles_trunc_traces),
562 __entry->from,
563 __entry->to)
566 TRACE_EVENT(cachefiles_mark_active,
567 TP_PROTO(struct cachefiles_object *obj,
568 struct inode *inode),
570 TP_ARGS(obj, inode),
572 /* Note that obj may be NULL */
573 TP_STRUCT__entry(
574 __field(unsigned int, obj )
575 __field(ino_t, inode )
578 TP_fast_assign(
579 __entry->obj = obj ? obj->debug_id : 0;
580 __entry->inode = inode->i_ino;
583 TP_printk("o=%08x B=%lx",
584 __entry->obj, __entry->inode)
587 TRACE_EVENT(cachefiles_mark_failed,
588 TP_PROTO(struct cachefiles_object *obj,
589 struct inode *inode),
591 TP_ARGS(obj, inode),
593 /* Note that obj may be NULL */
594 TP_STRUCT__entry(
595 __field(unsigned int, obj )
596 __field(ino_t, inode )
599 TP_fast_assign(
600 __entry->obj = obj ? obj->debug_id : 0;
601 __entry->inode = inode->i_ino;
604 TP_printk("o=%08x B=%lx",
605 __entry->obj, __entry->inode)
608 TRACE_EVENT(cachefiles_mark_inactive,
609 TP_PROTO(struct cachefiles_object *obj,
610 struct inode *inode),
612 TP_ARGS(obj, inode),
614 /* Note that obj may be NULL */
615 TP_STRUCT__entry(
616 __field(unsigned int, obj )
617 __field(ino_t, inode )
620 TP_fast_assign(
621 __entry->obj = obj ? obj->debug_id : 0;
622 __entry->inode = inode->i_ino;
625 TP_printk("o=%08x B=%lx",
626 __entry->obj, __entry->inode)
629 TRACE_EVENT(cachefiles_vfs_error,
630 TP_PROTO(struct cachefiles_object *obj, struct inode *backer,
631 int error, enum cachefiles_error_trace where),
633 TP_ARGS(obj, backer, error, where),
635 TP_STRUCT__entry(
636 __field(unsigned int, obj )
637 __field(unsigned int, backer )
638 __field(enum cachefiles_error_trace, where )
639 __field(short, error )
642 TP_fast_assign(
643 __entry->obj = obj ? obj->debug_id : 0;
644 __entry->backer = backer->i_ino;
645 __entry->error = error;
646 __entry->where = where;
649 TP_printk("o=%08x B=%x %s e=%d",
650 __entry->obj,
651 __entry->backer,
652 __print_symbolic(__entry->where, cachefiles_error_traces),
653 __entry->error)
656 TRACE_EVENT(cachefiles_io_error,
657 TP_PROTO(struct cachefiles_object *obj, struct inode *backer,
658 int error, enum cachefiles_error_trace where),
660 TP_ARGS(obj, backer, error, where),
662 TP_STRUCT__entry(
663 __field(unsigned int, obj )
664 __field(unsigned int, backer )
665 __field(enum cachefiles_error_trace, where )
666 __field(short, error )
669 TP_fast_assign(
670 __entry->obj = obj ? obj->debug_id : 0;
671 __entry->backer = backer->i_ino;
672 __entry->error = error;
673 __entry->where = where;
676 TP_printk("o=%08x B=%x %s e=%d",
677 __entry->obj,
678 __entry->backer,
679 __print_symbolic(__entry->where, cachefiles_error_traces),
680 __entry->error)
683 TRACE_EVENT(cachefiles_ondemand_open,
684 TP_PROTO(struct cachefiles_object *obj, struct cachefiles_msg *msg,
685 struct cachefiles_open *load),
687 TP_ARGS(obj, msg, load),
689 TP_STRUCT__entry(
690 __field(unsigned int, obj )
691 __field(unsigned int, msg_id )
692 __field(unsigned int, object_id )
693 __field(unsigned int, fd )
694 __field(unsigned int, flags )
697 TP_fast_assign(
698 __entry->obj = obj ? obj->debug_id : 0;
699 __entry->msg_id = msg->msg_id;
700 __entry->object_id = msg->object_id;
701 __entry->fd = load->fd;
702 __entry->flags = load->flags;
705 TP_printk("o=%08x mid=%x oid=%x fd=%d f=%x",
706 __entry->obj,
707 __entry->msg_id,
708 __entry->object_id,
709 __entry->fd,
710 __entry->flags)
713 TRACE_EVENT(cachefiles_ondemand_copen,
714 TP_PROTO(struct cachefiles_object *obj, unsigned int msg_id,
715 long len),
717 TP_ARGS(obj, msg_id, len),
719 TP_STRUCT__entry(
720 __field(unsigned int, obj )
721 __field(unsigned int, msg_id )
722 __field(long, len )
725 TP_fast_assign(
726 __entry->obj = obj ? obj->debug_id : 0;
727 __entry->msg_id = msg_id;
728 __entry->len = len;
731 TP_printk("o=%08x mid=%x l=%lx",
732 __entry->obj,
733 __entry->msg_id,
734 __entry->len)
737 TRACE_EVENT(cachefiles_ondemand_close,
738 TP_PROTO(struct cachefiles_object *obj, struct cachefiles_msg *msg),
740 TP_ARGS(obj, msg),
742 TP_STRUCT__entry(
743 __field(unsigned int, obj )
744 __field(unsigned int, msg_id )
745 __field(unsigned int, object_id )
748 TP_fast_assign(
749 __entry->obj = obj ? obj->debug_id : 0;
750 __entry->msg_id = msg->msg_id;
751 __entry->object_id = msg->object_id;
754 TP_printk("o=%08x mid=%x oid=%x",
755 __entry->obj,
756 __entry->msg_id,
757 __entry->object_id)
760 TRACE_EVENT(cachefiles_ondemand_read,
761 TP_PROTO(struct cachefiles_object *obj, struct cachefiles_msg *msg,
762 struct cachefiles_read *load),
764 TP_ARGS(obj, msg, load),
766 TP_STRUCT__entry(
767 __field(unsigned int, obj )
768 __field(unsigned int, msg_id )
769 __field(unsigned int, object_id )
770 __field(loff_t, start )
771 __field(size_t, len )
774 TP_fast_assign(
775 __entry->obj = obj ? obj->debug_id : 0;
776 __entry->msg_id = msg->msg_id;
777 __entry->object_id = msg->object_id;
778 __entry->start = load->off;
779 __entry->len = load->len;
782 TP_printk("o=%08x mid=%x oid=%x s=%llx l=%zx",
783 __entry->obj,
784 __entry->msg_id,
785 __entry->object_id,
786 __entry->start,
787 __entry->len)
790 TRACE_EVENT(cachefiles_ondemand_cread,
791 TP_PROTO(struct cachefiles_object *obj, unsigned int msg_id),
793 TP_ARGS(obj, msg_id),
795 TP_STRUCT__entry(
796 __field(unsigned int, obj )
797 __field(unsigned int, msg_id )
800 TP_fast_assign(
801 __entry->obj = obj ? obj->debug_id : 0;
802 __entry->msg_id = msg_id;
805 TP_printk("o=%08x mid=%x",
806 __entry->obj,
807 __entry->msg_id)
810 TRACE_EVENT(cachefiles_ondemand_fd_write,
811 TP_PROTO(struct cachefiles_object *obj, struct inode *backer,
812 loff_t start, size_t len),
814 TP_ARGS(obj, backer, start, len),
816 TP_STRUCT__entry(
817 __field(unsigned int, obj )
818 __field(unsigned int, backer )
819 __field(loff_t, start )
820 __field(size_t, len )
823 TP_fast_assign(
824 __entry->obj = obj ? obj->debug_id : 0;
825 __entry->backer = backer->i_ino;
826 __entry->start = start;
827 __entry->len = len;
830 TP_printk("o=%08x iB=%x s=%llx l=%zx",
831 __entry->obj,
832 __entry->backer,
833 __entry->start,
834 __entry->len)
837 TRACE_EVENT(cachefiles_ondemand_fd_release,
838 TP_PROTO(struct cachefiles_object *obj, int object_id),
840 TP_ARGS(obj, object_id),
842 TP_STRUCT__entry(
843 __field(unsigned int, obj )
844 __field(unsigned int, object_id )
847 TP_fast_assign(
848 __entry->obj = obj ? obj->debug_id : 0;
849 __entry->object_id = object_id;
852 TP_printk("o=%08x oid=%x",
853 __entry->obj,
854 __entry->object_id)
857 #endif /* _TRACE_CACHEFILES_H */
859 /* This part must be outside protection */
860 #include <trace/define_trace.h>