diff options
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 67 |
1 files changed, 52 insertions, 15 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index 89207fd7b617..caf59b977e2f 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -471,37 +471,74 @@ TRACE_EVENT(invalidate, ); DECLARE_EVENT_CLASS(bucket_alloc, - TP_PROTO(struct bch_dev *ca, const char *alloc_reserve), - TP_ARGS(ca, alloc_reserve), + TP_PROTO(struct bch_dev *ca, const char *alloc_reserve, + u64 avail, + u64 seen, + u64 open, + u64 need_journal_commit, + u64 nouse, + bool nonblocking, + int ret), + TP_ARGS(ca, alloc_reserve, avail, seen, open, need_journal_commit, nouse, nonblocking, ret), TP_STRUCT__entry( - __field(dev_t, dev ) - __array(char, reserve, 16 ) + __field(dev_t, dev ) + __array(char, reserve, 16 ) + __field(u64, avail ) + __field(u64, seen ) + __field(u64, open ) + __field(u64, need_journal_commit ) + __field(u64, nouse ) + __field(bool, nonblocking ) + __field(int, ret ) ), TP_fast_assign( __entry->dev = ca->dev; strlcpy(__entry->reserve, alloc_reserve, sizeof(__entry->reserve)); + __entry->avail = avail; + __entry->seen = seen; + __entry->open = open; + __entry->need_journal_commit = need_journal_commit; + __entry->nouse = nouse; + __entry->nonblocking = nonblocking; + __entry->ret = ret; ), - TP_printk("%d,%d reserve %s", + TP_printk("%d,%d reserve %s avail %llu seen %llu open %llu need_journal_commit %llu nouse %llu nonblocking %u ret %i", MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->reserve) + __entry->reserve, + __entry->avail, + __entry->seen, + __entry->open, + __entry->need_journal_commit, + __entry->nouse, + __entry->nonblocking, + __entry->ret) ); DEFINE_EVENT(bucket_alloc, bucket_alloc, - TP_PROTO(struct bch_dev *ca, const char *alloc_reserve), - TP_ARGS(ca, alloc_reserve) + TP_PROTO(struct bch_dev *ca, const char *alloc_reserve, + u64 avail, + u64 seen, + u64 open, + u64 need_journal_commit, + u64 nouse, + bool nonblocking, + int ret), + TP_ARGS(ca, alloc_reserve, avail, seen, open, need_journal_commit, nouse, nonblocking, ret) ); DEFINE_EVENT(bucket_alloc, bucket_alloc_fail, - TP_PROTO(struct bch_dev *ca, const char *alloc_reserve), - TP_ARGS(ca, alloc_reserve) -); - -DEFINE_EVENT(bucket_alloc, open_bucket_alloc_fail, - TP_PROTO(struct bch_dev *ca, const char *alloc_reserve), - TP_ARGS(ca, alloc_reserve) + TP_PROTO(struct bch_dev *ca, const char *alloc_reserve, + u64 avail, + u64 seen, + u64 open, + u64 need_journal_commit, + u64 nouse, + bool nonblocking, + int ret), + TP_ARGS(ca, alloc_reserve, avail, seen, open, need_journal_commit, nouse, nonblocking, ret) ); /* Moving IO */ |