[PATCH] fs: export some tracepoints for iotrace

Xiang Gao posted 1 patch 2 months, 1 week ago
drivers/ufs/core/ufshcd.c | 2 ++
fs/f2fs/checkpoint.c      | 2 ++
fs/f2fs/file.c            | 3 +++
fs/f2fs/gc.c              | 3 +++
4 files changed, 10 insertions(+)
[PATCH] fs: export some tracepoints for iotrace
Posted by Xiang Gao 2 months, 1 week ago
From: gaoxiang17 <gaoxiang17@xiaomi.com>

Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>
---
 drivers/ufs/core/ufshcd.c | 2 ++
 fs/f2fs/checkpoint.c      | 2 ++
 fs/f2fs/file.c            | 3 +++
 fs/f2fs/gc.c              | 3 +++
 4 files changed, 10 insertions(+)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 50adfb8b335b..4035b958057e 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -41,6 +41,8 @@
 #define CREATE_TRACE_POINTS
 #include "ufs_trace.h"
 
+EXPORT_TRACEPOINT_SYMBOL_GPL(ufshcd_command);
+
 #define UFSHCD_ENABLE_INTRS	(UTP_TRANSFER_REQ_COMPL |\
 				 UTP_TASK_REQ_COMPL |\
 				 UFSHCD_ERROR_MASK)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index f149ec28aefd..83982977e9ec 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -21,6 +21,8 @@
 #include "iostat.h"
 #include <trace/events/f2fs.h>
 
+EXPORT_TRACEPOINT_SYMBOL_GPL(f2fs_write_checkpoint);
+
 #define DEFAULT_CHECKPOINT_IOPRIO (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_RT, 3))
 
 static struct kmem_cache *ino_entry_slab;
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index c677230699fd..44e1294a3e69 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -35,6 +35,9 @@
 #include <trace/events/f2fs.h>
 #include <uapi/linux/f2fs.h>
 
+EXPORT_TRACEPOINT_SYMBOL_GPL(f2fs_sync_file_enter);
+EXPORT_TRACEPOINT_SYMBOL_GPL(f2fs_sync_file_exit);
+
 static void f2fs_zero_post_eof_page(struct inode *inode, loff_t new_size)
 {
 	loff_t old_size = i_size_read(inode);
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 3cb5242f4ddf..ae153b41058d 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -23,6 +23,9 @@
 #include "iostat.h"
 #include <trace/events/f2fs.h>
 
+EXPORT_TRACEPOINT_SYMBOL_GPL(f2fs_gc_begin);
+EXPORT_TRACEPOINT_SYMBOL_GPL(f2fs_gc_end);
+
 static struct kmem_cache *victim_entry_slab;
 
 static unsigned int count_bits(const unsigned long *addr,
-- 
2.34.1
Re: [PATCH] fs: export some tracepoints for iotrace
Posted by Christoph Hellwig 2 months ago
On Wed, Jul 30, 2025 at 12:03:45AM +0800, Xiang Gao wrote:
> From: gaoxiang17 <gaoxiang17@xiaomi.com>
> 
> Signed-off-by: gaoxiang17 <gaoxiang17@xiaomi.com>

Random exports without a user of even explanation are weird.

What up with Android folks that this kind of junk keeps getting sent
over and over?