diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-04-29 23:56:17 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:02 +0300 |
commit | 3dea728ce64bdd3c8c5e98cb7b8a148d52c8f0d4 (patch) | |
tree | 0c7d81bf261ccae560adbd7c1a0a4a2b78e21f88 /fs/bcachefs/trace.h | |
parent | d36cdb045aa7029f8495d18760da6c944ab95cb3 (diff) | |
download | linux-3dea728ce64bdd3c8c5e98cb7b8a148d52c8f0d4.tar.xz |
bcachefs: New tracepoint for bch2_trans_get_iter()
Trying to debug an issue where after traverse_all() we shouldn't have to
traverse any iterators... yet we are
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index c6d98f4c50e7..7e518f7618d4 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -528,6 +528,62 @@ TRACE_EVENT(copygc, __entry->buckets_moved, __entry->buckets_not_moved) ); +TRACE_EVENT(trans_get_iter, + TP_PROTO(unsigned long caller, unsigned long ip, + enum btree_id btree_id, + struct bpos *pos_want, + unsigned locks_want, + struct bpos *pos_found, + unsigned locks_found, + unsigned uptodate), + TP_ARGS(caller, ip, btree_id, + pos_want, locks_want, + pos_found, locks_found, + uptodate), + + TP_STRUCT__entry( + __field(unsigned long, caller ) + __field(unsigned long, ip ) + __field(u8, btree_id ) + __field(u8, uptodate ) + __field(u8, locks_want ) + __field(u8, locks_found ) + __field(u64, pos_want_inode ) + __field(u64, pos_want_offset ) + __field(u32, pos_want_snapshot ) + __field(u64, pos_found_inode ) + __field(u64, pos_found_offset ) + __field(u32, pos_found_snapshot ) + ), + + TP_fast_assign( + __entry->caller = caller; + __entry->ip = ip; + __entry->btree_id = btree_id; + __entry->uptodate = uptodate; + __entry->pos_want_inode = pos_want->inode; + __entry->pos_want_offset = pos_want->offset; + __entry->pos_want_snapshot = pos_want->snapshot; + __entry->pos_found_inode = pos_found->inode; + __entry->pos_found_offset = pos_found->offset; + __entry->pos_found_snapshot = pos_found->snapshot; + ), + + TP_printk("%ps %pS btree %u uptodate %u want %llu:%llu:%u locks %u found %llu:%llu:%u locks %u", + (void *) __entry->caller, + (void *) __entry->ip, + __entry->btree_id, + __entry->uptodate, + __entry->pos_want_inode, + __entry->pos_want_offset, + __entry->pos_want_snapshot, + __entry->locks_want, + __entry->pos_found_inode, + __entry->pos_found_offset, + __entry->pos_found_snapshot, + __entry->locks_found) +); + TRACE_EVENT(transaction_restart_ip, TP_PROTO(unsigned long caller, unsigned long ip), TP_ARGS(caller, ip), |