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:
Zach Brown
2017-06-02 09:20:02 -07:00
parent a2ef5ecb33
commit c84250b8c6
2 changed files with 14 additions and 2 deletions

View File

@@ -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;

View File

@@ -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" }, \