Commit 19d2819d authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Add a tracepoint for copygc waiting

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent c4d4b2f0
......@@ -326,6 +326,7 @@ static int bch2_copygc_thread(void *arg)
wait = bch2_copygc_wait_amount(c);
if (wait > clock->max_slop) {
trace_copygc_wait(c, wait, last + wait);
c->copygc_wait = last + wait;
bch2_kthread_io_clock_wait(clock, last + wait,
MAX_SCHEDULE_TIMEOUT);
......
......@@ -528,6 +528,27 @@ TRACE_EVENT(copygc,
__entry->buckets_moved, __entry->buckets_not_moved)
);
TRACE_EVENT(copygc_wait,
TP_PROTO(struct bch_fs *c,
u64 wait_amount, u64 until),
TP_ARGS(c, wait_amount, until),
TP_STRUCT__entry(
__array(char, uuid, 16 )
__field(u64, wait_amount )
__field(u64, until )
),
TP_fast_assign(
memcpy(__entry->uuid, c->sb.user_uuid.b, 16);
__entry->wait_amount = wait_amount;
__entry->until = until;
),
TP_printk("%pU waiting for %llu sectors until %llu",
__entry->uuid, __entry->wait_amount, __entry->until)
);
TRACE_EVENT(trans_get_iter,
TP_PROTO(unsigned long caller, unsigned long ip,
enum btree_id btree_id,
......
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