summaryrefslogtreecommitdiff
path: root/fs/bcachefs/trace.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-04 16:06:55 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:42 -0400
commitae10fe017bf54653a61a93e49fac1c3e2b474e20 (patch)
tree5e9be1ce96f93ae2fc7d7d430a0363d4cd387bc6 /fs/bcachefs/trace.h
parent29cea6f4834b36f6a51832e08218e03b60002a9a (diff)
bcachefs: bucket_alloc_state
This refactoring puts our various allocation path counters into a dedicated struct - the upcoming nocow patch is going to add another counter. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r--fs/bcachefs/trace.h29
1 files changed, 10 insertions, 19 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h
index 24d089507a21..b5f44c4e80d1 100644
--- a/fs/bcachefs/trace.h
+++ b/fs/bcachefs/trace.h
@@ -518,15 +518,12 @@ DECLARE_EVENT_CLASS(bucket_alloc,
u64 avail,
u64 copygc_wait_amount,
s64 copygc_waiting_for,
- u64 seen,
- u64 open,
- u64 need_journal_commit,
- u64 nouse,
+ struct bucket_alloc_state *s,
bool nonblocking,
const char *err),
TP_ARGS(ca, alloc_reserve, user, bucket, free, avail,
copygc_wait_amount, copygc_waiting_for,
- seen, open, need_journal_commit, nouse, nonblocking, err),
+ s, nonblocking, err),
TP_STRUCT__entry(
__field(dev_t, dev )
@@ -554,10 +551,10 @@ DECLARE_EVENT_CLASS(bucket_alloc,
__entry->avail = avail;
__entry->copygc_wait_amount = copygc_wait_amount;
__entry->copygc_waiting_for = copygc_waiting_for;
- __entry->seen = seen;
- __entry->open = open;
- __entry->need_journal_commit = need_journal_commit;
- __entry->nouse = nouse;
+ __entry->seen = s->buckets_seen;
+ __entry->open = s->skipped_open;
+ __entry->need_journal_commit = s->skipped_need_journal_commit;
+ __entry->nouse = s->skipped_nouse;
__entry->nonblocking = nonblocking;
strlcpy(__entry->err, err, sizeof(__entry->err));
),
@@ -587,15 +584,12 @@ DEFINE_EVENT(bucket_alloc, bucket_alloc,
u64 avail,
u64 copygc_wait_amount,
s64 copygc_waiting_for,
- u64 seen,
- u64 open,
- u64 need_journal_commit,
- u64 nouse,
+ struct bucket_alloc_state *s,
bool nonblocking,
const char *err),
TP_ARGS(ca, alloc_reserve, user, bucket, free, avail,
copygc_wait_amount, copygc_waiting_for,
- seen, open, need_journal_commit, nouse, nonblocking, err)
+ s, nonblocking, err)
);
DEFINE_EVENT(bucket_alloc, bucket_alloc_fail,
@@ -606,15 +600,12 @@ DEFINE_EVENT(bucket_alloc, bucket_alloc_fail,
u64 avail,
u64 copygc_wait_amount,
s64 copygc_waiting_for,
- u64 seen,
- u64 open,
- u64 need_journal_commit,
- u64 nouse,
+ struct bucket_alloc_state *s,
bool nonblocking,
const char *err),
TP_ARGS(ca, alloc_reserve, user, bucket, free, avail,
copygc_wait_amount, copygc_waiting_for,
- seen, open, need_journal_commit, nouse, nonblocking, err)
+ s, nonblocking, err)
);
TRACE_EVENT(discard_buckets,