mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-04 07:07:03 +00:00
scoutfs: add key trace class
Some item tracing functions were really just tracing a key. Refactor it into a trace class with event users. Later patches can then use the key trace class. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+2
-2
@@ -408,7 +408,7 @@ restart:
|
||||
}
|
||||
}
|
||||
|
||||
trace_scoutfs_item_insertion(sb, ins->key, ins->val);
|
||||
trace_scoutfs_item_insertion(sb, ins->key);
|
||||
|
||||
rb_link_node(&ins->node, parent, node);
|
||||
rb_insert_augmented(&ins->node, root, &scoutfs_item_rb_cb);
|
||||
@@ -632,7 +632,7 @@ int scoutfs_item_lookup(struct super_block *sb, struct scoutfs_key_buf *key,
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
trace_scoutfs_item_lookup(sb, key, val);
|
||||
trace_scoutfs_item_lookup(sb, key);
|
||||
|
||||
end = scoutfs_key_alloc(sb, SCOUTFS_MAX_KEY_SIZE);
|
||||
if (!end) {
|
||||
|
||||
+11
-15
@@ -204,10 +204,9 @@ TRACE_EVENT(scoutfs_manifest_add,
|
||||
__entry->seq, __entry->level)
|
||||
);
|
||||
|
||||
TRACE_EVENT(scoutfs_item_lookup,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_key_buf *key,
|
||||
struct kvec *val),
|
||||
TP_ARGS(sb, key, val),
|
||||
DECLARE_EVENT_CLASS(scoutfs_key_class,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_key_buf *key),
|
||||
TP_ARGS(sb, key),
|
||||
TP_STRUCT__entry(
|
||||
__dynamic_array(char, key, scoutfs_key_str(NULL, key))
|
||||
),
|
||||
@@ -217,17 +216,14 @@ TRACE_EVENT(scoutfs_item_lookup,
|
||||
TP_printk("key %s", __get_str(key))
|
||||
);
|
||||
|
||||
TRACE_EVENT(scoutfs_item_insertion,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_key_buf *key,
|
||||
struct kvec *val),
|
||||
TP_ARGS(sb, key, val),
|
||||
TP_STRUCT__entry(
|
||||
__dynamic_array(char, key, scoutfs_key_str(NULL, key))
|
||||
),
|
||||
TP_fast_assign(
|
||||
scoutfs_key_str(__get_dynamic_array(key), key);
|
||||
),
|
||||
TP_printk("key %s", __get_str(key))
|
||||
DEFINE_EVENT(scoutfs_key_class, scoutfs_item_lookup,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_key_buf *key),
|
||||
TP_ARGS(sb, key)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(scoutfs_key_class, scoutfs_item_insertion,
|
||||
TP_PROTO(struct super_block *sb, struct scoutfs_key_buf *key),
|
||||
TP_ARGS(sb, key)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(scoutfs_range_class,
|
||||
|
||||
Reference in New Issue
Block a user