From ae0e61175e22b77267c2c59d0061925a0a604074 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 16 Nov 2023 20:41:10 -0500 Subject: bcachefs: Add a tracepoint for journal entry close Signed-off-by: Kent Overstreet --- fs/bcachefs/trace.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'fs/bcachefs/trace.h') diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index f663f21b07f3..52db4df67c3a 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -188,6 +188,25 @@ DEFINE_EVENT(bch_fs, journal_entry_full, TP_ARGS(c) ); +TRACE_EVENT(journal_entry_close, + TP_PROTO(struct bch_fs *c, unsigned bytes), + TP_ARGS(c, bytes), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(u32, bytes ) + ), + + TP_fast_assign( + __entry->dev = c->dev; + __entry->bytes = bytes; + ), + + TP_printk("%d,%d entry bytes %u", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->bytes) +); + DEFINE_EVENT(bio, journal_write, TP_PROTO(struct bio *bio), TP_ARGS(bio) -- cgit v1.2.3