mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 19:20:44 +00:00
scoutfs: add item_set_batch trace point
Restore the item_set_batch trace point by changing the current insert_batch tracepoint to a class and defining insert and set as class trace points. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -1037,7 +1037,7 @@ int scoutfs_item_set_batch(struct super_block *sb, struct list_head *list,
|
||||
if (WARN_ON_ONCE(invalid_flags(sif)))
|
||||
return -EINVAL;
|
||||
|
||||
// trace_scoutfs_item_set_batch(sb, start, end);
|
||||
trace_scoutfs_item_set_batch(sb, start, end);
|
||||
|
||||
if (WARN_ON_ONCE(scoutfs_key_compare(start, end) > 0))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -230,7 +230,7 @@ TRACE_EVENT(scoutfs_item_insertion,
|
||||
TP_printk("key %s", __get_str(key))
|
||||
);
|
||||
|
||||
TRACE_EVENT(scoutfs_item_insert_batch,
|
||||
DECLARE_EVENT_CLASS(scoutfs_range_class,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_key_buf *start,
|
||||
struct scoutfs_key_buf *end),
|
||||
TP_ARGS(sb, start, end),
|
||||
@@ -245,6 +245,18 @@ TRACE_EVENT(scoutfs_item_insert_batch,
|
||||
TP_printk("start %s end %s", __get_str(start), __get_str(end))
|
||||
);
|
||||
|
||||
DEFINE_EVENT(scoutfs_range_class, scoutfs_item_set_batch,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_key_buf *start,
|
||||
struct scoutfs_key_buf *end),
|
||||
TP_ARGS(sb, start, end)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(scoutfs_range_class, scoutfs_item_insert_batch,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_key_buf *start,
|
||||
struct scoutfs_key_buf *end),
|
||||
TP_ARGS(sb, start, end)
|
||||
);
|
||||
|
||||
#define lock_mode(mode) \
|
||||
__print_symbolic(mode, \
|
||||
{ SCOUTFS_LOCK_MODE_READ, "READ" }, \
|
||||
|
||||
Reference in New Issue
Block a user