Commit ae0e6117 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Add a tracepoint for journal entry close

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent b27d7afb
......@@ -184,6 +184,8 @@ static void __journal_entry_close(struct journal *j, unsigned closed_val)
/* Close out old buffer: */
buf->data->u64s = cpu_to_le32(old.cur_entry_offset);
trace_journal_entry_close(c, vstruct_bytes(buf->data));
sectors = vstruct_blocks_plus(buf->data, c->block_bits,
buf->u64s_reserved) << c->block_bits;
BUG_ON(sectors > buf->sectors);
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment