diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 81b1c321fabd..79f92f7b3b3d 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -106,7 +106,7 @@ #include #include #include - +#include /* * Export tracepoints that act as a bare tracehook (ie: have no trace event * associated with them) to allow external modules to probe them. @@ -409,6 +409,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_encrypt_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_init_aes_encrypt); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_skip_swap_map_write); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_post_image_save); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dm_update_clone_bio); /* * For type visibility diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 41d2e1285c07..fd02821e768f 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -30,7 +30,7 @@ #include #include #include - +#include #define DM_MSG_PREFIX "core" /* @@ -1292,7 +1292,7 @@ static int clone_bio(struct dm_target_io *tio, struct bio *bio, int r; __bio_clone_fast(clone, bio); - + trace_android_vh_dm_update_clone_bio(clone, bio); r = bio_crypt_clone(clone, bio, GFP_NOIO); if (r < 0) return r; diff --git a/include/trace/hooks/dm.h b/include/trace/hooks/dm.h new file mode 100644 index 000000000000..da42a170b228 --- /dev/null +++ b/include/trace/hooks/dm.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM dm + +#define TRACE_INCLUDE_PATH trace/hooks + +#if !defined(_TRACE_HOOK_DM_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_HOOK_DM_H + +#include +#include + +struct bio; +DECLARE_HOOK(android_vh_dm_update_clone_bio, + TP_PROTO(struct bio *clone, struct bio *bio), + TP_ARGS(clone, bio)); + +#endif /* _TRACE_HOOK_DM_H */ + +/* This part must be outside protection */ +#include