diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-04-23 07:10:08 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:21 +0300 |
commit | ba5c65576b9d46a05ce2c709c88886f11432a204 (patch) | |
tree | c4f6175e69405ba298ab368449713446eb0ce32c /fs/bcachefs/trace.h | |
parent | 69eb5390afd287e73f781c26526796b45a77f9d1 (diff) | |
download | linux-ba5c65576b9d46a05ce2c709c88886f11432a204.tar.xz |
bcachefs: Add actual tracepoints for transaction restarts
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index 1aa6ac05d50e..2864a72938ce 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -499,6 +499,78 @@ TRACE_EVENT(copygc, __entry->buckets_moved, __entry->buckets_not_moved) ); +DECLARE_EVENT_CLASS(transaction_restart, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip), + + TP_STRUCT__entry( + __array(char, name, 16) + __field(unsigned long, ip ) + ), + + TP_fast_assign( + memcpy(__entry->name, c->name, 16); + __entry->ip = ip; + ), + + TP_printk("%pS", (void *) __entry->ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_btree_node_reused, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_would_deadlock, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_iters_realloced, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_mem_realloced, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_journal_res_get, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_journal_preres_get, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_mark_replicas, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_fault_inject, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_btree_node_split, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_traverse, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + +DEFINE_EVENT(transaction_restart, trans_restart_atomic, + TP_PROTO(struct bch_fs *c, unsigned long ip), + TP_ARGS(c, ip) +); + #endif /* _TRACE_BCACHEFS_H */ /* This part must be outside protection */ |