1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM fuse
5 #if !defined(_TRACE_FUSE_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/tracepoint.h>
11 EM( FUSE_LOOKUP, "FUSE_LOOKUP") \
12 EM( FUSE_FORGET, "FUSE_FORGET") \
13 EM( FUSE_GETATTR, "FUSE_GETATTR") \
14 EM( FUSE_SETATTR, "FUSE_SETATTR") \
15 EM( FUSE_READLINK, "FUSE_READLINK") \
16 EM( FUSE_SYMLINK, "FUSE_SYMLINK") \
17 EM( FUSE_MKNOD, "FUSE_MKNOD") \
18 EM( FUSE_MKDIR, "FUSE_MKDIR") \
19 EM( FUSE_UNLINK, "FUSE_UNLINK") \
20 EM( FUSE_RMDIR, "FUSE_RMDIR") \
21 EM( FUSE_RENAME, "FUSE_RENAME") \
22 EM( FUSE_LINK, "FUSE_LINK") \
23 EM( FUSE_OPEN, "FUSE_OPEN") \
24 EM( FUSE_READ, "FUSE_READ") \
25 EM( FUSE_WRITE, "FUSE_WRITE") \
26 EM( FUSE_STATFS, "FUSE_STATFS") \
27 EM( FUSE_RELEASE, "FUSE_RELEASE") \
28 EM( FUSE_FSYNC, "FUSE_FSYNC") \
29 EM( FUSE_SETXATTR, "FUSE_SETXATTR") \
30 EM( FUSE_GETXATTR, "FUSE_GETXATTR") \
31 EM( FUSE_LISTXATTR, "FUSE_LISTXATTR") \
32 EM( FUSE_REMOVEXATTR, "FUSE_REMOVEXATTR") \
33 EM( FUSE_FLUSH, "FUSE_FLUSH") \
34 EM( FUSE_INIT, "FUSE_INIT") \
35 EM( FUSE_OPENDIR, "FUSE_OPENDIR") \
36 EM( FUSE_READDIR, "FUSE_READDIR") \
37 EM( FUSE_RELEASEDIR, "FUSE_RELEASEDIR") \
38 EM( FUSE_FSYNCDIR, "FUSE_FSYNCDIR") \
39 EM( FUSE_GETLK, "FUSE_GETLK") \
40 EM( FUSE_SETLK, "FUSE_SETLK") \
41 EM( FUSE_SETLKW, "FUSE_SETLKW") \
42 EM( FUSE_ACCESS, "FUSE_ACCESS") \
43 EM( FUSE_CREATE, "FUSE_CREATE") \
44 EM( FUSE_INTERRUPT, "FUSE_INTERRUPT") \
45 EM( FUSE_BMAP, "FUSE_BMAP") \
46 EM( FUSE_DESTROY, "FUSE_DESTROY") \
47 EM( FUSE_IOCTL, "FUSE_IOCTL") \
48 EM( FUSE_POLL, "FUSE_POLL") \
49 EM( FUSE_NOTIFY_REPLY, "FUSE_NOTIFY_REPLY") \
50 EM( FUSE_BATCH_FORGET, "FUSE_BATCH_FORGET") \
51 EM( FUSE_FALLOCATE, "FUSE_FALLOCATE") \
52 EM( FUSE_READDIRPLUS, "FUSE_READDIRPLUS") \
53 EM( FUSE_RENAME2, "FUSE_RENAME2") \
54 EM( FUSE_LSEEK, "FUSE_LSEEK") \
55 EM( FUSE_COPY_FILE_RANGE, "FUSE_COPY_FILE_RANGE") \
56 EM( FUSE_SETUPMAPPING, "FUSE_SETUPMAPPING") \
57 EM( FUSE_REMOVEMAPPING, "FUSE_REMOVEMAPPING") \
58 EM( FUSE_SYNCFS, "FUSE_SYNCFS") \
59 EM( FUSE_TMPFILE, "FUSE_TMPFILE") \
60 EM( FUSE_STATX, "FUSE_STATX") \
61 EMe(CUSE_INIT, "CUSE_INIT")
64 * This will turn the above table into TRACE_DEFINE_ENUM() for each of the
69 #define EM(a, b) TRACE_DEFINE_ENUM(a);
70 #define EMe(a, b) TRACE_DEFINE_ENUM(a);
74 /* Now we redfine it with the table that __print_symbolic needs. */
77 #define EM(a, b) {a, b},
78 #define EMe(a, b) {a, b}
80 TRACE_EVENT(fuse_request_send
,
81 TP_PROTO(const struct fuse_req
*req
),
86 __field(dev_t
, connection
)
87 __field(uint64_t, unique
)
88 __field(enum fuse_opcode
, opcode
)
89 __field(uint32_t, len
)
93 __entry
->connection
= req
->fm
->fc
->dev
;
94 __entry
->unique
= req
->in
.h
.unique
;
95 __entry
->opcode
= req
->in
.h
.opcode
;
96 __entry
->len
= req
->in
.h
.len
;
99 TP_printk("connection %u req %llu opcode %u (%s) len %u ",
100 __entry
->connection
, __entry
->unique
, __entry
->opcode
,
101 __print_symbolic(__entry
->opcode
, OPCODES
), __entry
->len
)
104 TRACE_EVENT(fuse_request_end
,
105 TP_PROTO(const struct fuse_req
*req
),
110 __field(dev_t
, connection
)
111 __field(uint64_t, unique
)
112 __field(uint32_t, len
)
113 __field(int32_t, error
)
117 __entry
->connection
= req
->fm
->fc
->dev
;
118 __entry
->unique
= req
->in
.h
.unique
;
119 __entry
->len
= req
->out
.h
.len
;
120 __entry
->error
= req
->out
.h
.error
;
123 TP_printk("connection %u req %llu len %u error %d", __entry
->connection
,
124 __entry
->unique
, __entry
->len
, __entry
->error
)
127 #endif /* _TRACE_FUSE_H */
129 #undef TRACE_INCLUDE_PATH
130 #define TRACE_INCLUDE_PATH .
131 #define TRACE_INCLUDE_FILE fuse_trace
132 #include <trace/define_trace.h>