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)
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
,
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
,
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.
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.
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
,
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 */
226 __field(unsigned int, obj
)
227 __field(unsigned int, cookie
)
228 __field(enum cachefiles_obj_ref_trace
, why
)
233 __entry
->obj
= object_debug_id
;
234 __entry
->cookie
= cookie_debug_id
;
235 __entry
->usage
= usage
;
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
,
249 TP_ARGS(obj
, dir
, de
),
252 __field(unsigned int, obj
)
253 __field(short, error
)
254 __field(unsigned long, dino
)
255 __field(unsigned long, ino
)
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
),
276 __field(unsigned int, dir
)
277 __field(unsigned int, subdir
)
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",
290 TRACE_EVENT(cachefiles_tmpfile
,
291 TP_PROTO(struct cachefiles_object
*obj
, struct inode
*backer
),
293 TP_ARGS(obj
, backer
),
296 __field(unsigned int, obj
)
297 __field(unsigned int, backer
)
301 __entry
->obj
= obj
->debug_id
;
302 __entry
->backer
= backer
->i_ino
;
305 TP_printk("o=%08x B=%x",
310 TRACE_EVENT(cachefiles_link
,
311 TP_PROTO(struct cachefiles_object
*obj
, struct inode
*backer
),
313 TP_ARGS(obj
, backer
),
316 __field(unsigned int, obj
)
317 __field(unsigned int, backer
)
321 __entry
->obj
= obj
->debug_id
;
322 __entry
->backer
= backer
->i_ino
;
325 TP_printk("o=%08x B=%x",
330 TRACE_EVENT(cachefiles_unlink
,
331 TP_PROTO(struct cachefiles_object
*obj
,
333 enum fscache_why_object_killed why
),
335 TP_ARGS(obj
, ino
, why
),
337 /* Note that obj may be NULL */
339 __field(unsigned int, obj
)
340 __field(unsigned int, ino
)
341 __field(enum fscache_why_object_killed
, why
)
345 __entry
->obj
= obj
? obj
->debug_id
: UINT_MAX
;
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
,
358 enum fscache_why_object_killed why
),
360 TP_ARGS(obj
, ino
, why
),
362 /* Note that obj may be NULL */
364 __field(unsigned int, obj
)
365 __field(unsigned int, ino
)
366 __field(enum fscache_why_object_killed
, why
)
370 __entry
->obj
= obj
? obj
->debug_id
: UINT_MAX
;
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
,
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 */
390 __field(unsigned int, obj
)
391 __field(enum cachefiles_coherency_trace
, why
)
392 __field(enum cachefiles_content
, content
)
397 __entry
->obj
= obj
->debug_id
;
399 __entry
->content
= content
;
403 TP_printk("o=%08x %s B=%llx c=%u",
405 __print_symbolic(__entry
->why
, cachefiles_coherency_traces
),
410 TRACE_EVENT(cachefiles_vol_coherency
,
411 TP_PROTO(struct cachefiles_volume
*volume
,
413 enum cachefiles_coherency_trace why
),
415 TP_ARGS(volume
, ino
, why
),
417 /* Note that obj may be NULL */
419 __field(unsigned int, vol
)
420 __field(enum cachefiles_coherency_trace
, why
)
425 __entry
->vol
= volume
->vcookie
->debug_id
;
430 TP_printk("V=%08x %s B=%llx",
432 __print_symbolic(__entry
->why
, cachefiles_coherency_traces
),
436 TRACE_EVENT(cachefiles_prep_read
,
437 TP_PROTO(struct cachefiles_object
*obj
,
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
),
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
)
459 __entry
->obj
= obj
? obj
->debug_id
: 0;
460 __entry
->flags
= flags
;
461 __entry
->source
= source
;
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",
471 __print_symbolic(__entry
->source
, netfs_sreq_sources
),
472 __print_symbolic(__entry
->why
, cachefiles_prepare_read_traces
),
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
,
484 TP_ARGS(obj
, backer
, start
, len
),
487 __field(unsigned int, obj
)
488 __field(unsigned int, backer
)
489 __field(size_t, len
)
490 __field(loff_t
, start
)
494 __entry
->obj
= obj
->debug_id
;
495 __entry
->backer
= backer
->i_ino
;
496 __entry
->start
= start
;
500 TP_printk("o=%08x B=%x s=%llx l=%zx",
507 TRACE_EVENT(cachefiles_write
,
508 TP_PROTO(struct cachefiles_object
*obj
,
509 struct inode
*backer
,
513 TP_ARGS(obj
, backer
, start
, len
),
516 __field(unsigned int, obj
)
517 __field(unsigned int, backer
)
518 __field(size_t, len
)
519 __field(loff_t
, start
)
523 __entry
->obj
= obj
->debug_id
;
524 __entry
->backer
= backer
->i_ino
;
525 __entry
->start
= start
;
529 TP_printk("o=%08x B=%x s=%llx l=%zx",
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
),
543 __field(unsigned int, obj
)
544 __field(unsigned int, backer
)
545 __field(enum cachefiles_trunc_trace
, why
)
546 __field(loff_t
, from
)
551 __entry
->obj
= obj
->debug_id
;
552 __entry
->backer
= backer
->i_ino
;
553 __entry
->from
= from
;
558 TP_printk("o=%08x B=%x %s l=%llx->%llx",
561 __print_symbolic(__entry
->why
, cachefiles_trunc_traces
),
566 TRACE_EVENT(cachefiles_mark_active
,
567 TP_PROTO(struct cachefiles_object
*obj
,
568 struct inode
*inode
),
572 /* Note that obj may be NULL */
574 __field(unsigned int, obj
)
575 __field(ino_t
, inode
)
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
),
593 /* Note that obj may be NULL */
595 __field(unsigned int, obj
)
596 __field(ino_t
, inode
)
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
),
614 /* Note that obj may be NULL */
616 __field(unsigned int, obj
)
617 __field(ino_t
, inode
)
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
),
636 __field(unsigned int, obj
)
637 __field(unsigned int, backer
)
638 __field(enum cachefiles_error_trace
, where
)
639 __field(short, error
)
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",
652 __print_symbolic(__entry
->where
, cachefiles_error_traces
),
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
),
663 __field(unsigned int, obj
)
664 __field(unsigned int, backer
)
665 __field(enum cachefiles_error_trace
, where
)
666 __field(short, error
)
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",
679 __print_symbolic(__entry
->where
, cachefiles_error_traces
),
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
),
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
)
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",
713 TRACE_EVENT(cachefiles_ondemand_copen
,
714 TP_PROTO(struct cachefiles_object
*obj
, unsigned int msg_id
,
717 TP_ARGS(obj
, msg_id
, len
),
720 __field(unsigned int, obj
)
721 __field(unsigned int, msg_id
)
726 __entry
->obj
= obj
? obj
->debug_id
: 0;
727 __entry
->msg_id
= msg_id
;
731 TP_printk("o=%08x mid=%x l=%lx",
737 TRACE_EVENT(cachefiles_ondemand_close
,
738 TP_PROTO(struct cachefiles_object
*obj
, struct cachefiles_msg
*msg
),
743 __field(unsigned int, obj
)
744 __field(unsigned int, msg_id
)
745 __field(unsigned int, object_id
)
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",
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
),
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
)
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",
790 TRACE_EVENT(cachefiles_ondemand_cread
,
791 TP_PROTO(struct cachefiles_object
*obj
, unsigned int msg_id
),
793 TP_ARGS(obj
, msg_id
),
796 __field(unsigned int, obj
)
797 __field(unsigned int, msg_id
)
801 __entry
->obj
= obj
? obj
->debug_id
: 0;
802 __entry
->msg_id
= msg_id
;
805 TP_printk("o=%08x mid=%x",
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
),
817 __field(unsigned int, obj
)
818 __field(unsigned int, backer
)
819 __field(loff_t
, start
)
820 __field(size_t, len
)
824 __entry
->obj
= obj
? obj
->debug_id
: 0;
825 __entry
->backer
= backer
->i_ino
;
826 __entry
->start
= start
;
830 TP_printk("o=%08x iB=%x s=%llx l=%zx",
837 TRACE_EVENT(cachefiles_ondemand_fd_release
,
838 TP_PROTO(struct cachefiles_object
*obj
, int object_id
),
840 TP_ARGS(obj
, object_id
),
843 __field(unsigned int, obj
)
844 __field(unsigned int, object_id
)
848 __entry
->obj
= obj
? obj
->debug_id
: 0;
849 __entry
->object_id
= object_id
;
852 TP_printk("o=%08x oid=%x",
857 #endif /* _TRACE_CACHEFILES_H */
859 /* This part must be outside protection */
860 #include <trace/define_trace.h>