diff options
author | Josef Bacik <josef@toxicpanda.com> | 2024-07-03 10:38:42 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2024-08-29 11:43:13 +0200 |
commit | 396b209e405a571ce8e06d3760ffc3e389a944f1 (patch) | |
tree | bc4e2aec5ccd83b70b14426eea4368d7e4c73e4a /fs/fuse/dev.c | |
parent | 0acad9289be33d324537d6c51988be0541b1139d (diff) |
fuse: add simple request tracepoints
I've been timing various fuse operations and it's quite annoying to do
with kprobes. Add two tracepoints for sending and ending fuse requests
to make it easier to debug and time various operations.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 2364df0324f7..1b6088288a16 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -22,6 +22,9 @@ #include <linux/splice.h> #include <linux/sched.h> +#define CREATE_TRACE_POINTS +#include "fuse_trace.h" + MODULE_ALIAS_MISCDEV(FUSE_MINOR); MODULE_ALIAS("devname:fuse"); @@ -289,6 +292,7 @@ static void fuse_send_one(struct fuse_iqueue *fiq, struct fuse_req *req) req->in.h.len = sizeof(struct fuse_in_header) + fuse_len_args(req->args->in_numargs, (struct fuse_arg *) req->args->in_args); + trace_fuse_request_send(req); fiq->ops->send_req(fiq, req); } @@ -335,6 +339,7 @@ void fuse_request_end(struct fuse_req *req) if (test_and_set_bit(FR_FINISHED, &req->flags)) goto put_request; + trace_fuse_request_end(req); /* * test_and_set_bit() implies smp_mb() between bit * changing and below FR_INTERRUPTED check. Pairs with |