Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
eb54e81f
Commit
eb54e81f
authored
Nov 12, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Improve btree_path_dowgrade tracepoint
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
cb52d23e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
fs/bcachefs/btree_locking.c
fs/bcachefs/btree_locking.c
+2
-2
fs/bcachefs/trace.h
fs/bcachefs/trace.h
+19
-4
No files found.
fs/bcachefs/btree_locking.c
View file @
eb54e81f
...
...
@@ -665,7 +665,7 @@ void __bch2_btree_path_downgrade(struct btree_trans *trans,
struct
btree_path
*
path
,
unsigned
new_locks_want
)
{
unsigned
l
;
unsigned
l
,
old_locks_want
=
path
->
locks_want
;
if
(
trans
->
restarted
)
return
;
...
...
@@ -690,7 +690,7 @@ void __bch2_btree_path_downgrade(struct btree_trans *trans,
bch2_btree_path_verify_locks
(
path
);
path
->
downgrade_seq
++
;
trace_path_downgrade
(
trans
,
_RET_IP_
,
path
);
trace_path_downgrade
(
trans
,
_RET_IP_
,
path
,
old_locks_want
);
}
/* Btree transaction locking: */
...
...
fs/bcachefs/trace.h
View file @
eb54e81f
...
...
@@ -1252,22 +1252,37 @@ TRACE_EVENT(trans_restart_key_cache_key_realloced,
TRACE_EVENT
(
path_downgrade
,
TP_PROTO
(
struct
btree_trans
*
trans
,
unsigned
long
caller_ip
,
struct
btree_path
*
path
),
TP_ARGS
(
trans
,
caller_ip
,
path
),
struct
btree_path
*
path
,
unsigned
old_locks_want
),
TP_ARGS
(
trans
,
caller_ip
,
path
,
old_locks_want
),
TP_STRUCT__entry
(
__array
(
char
,
trans_fn
,
32
)
__field
(
unsigned
long
,
caller_ip
)
__field
(
unsigned
,
old_locks_want
)
__field
(
unsigned
,
new_locks_want
)
__field
(
unsigned
,
btree
)
TRACE_BPOS_entries
(
pos
)
),
TP_fast_assign
(
strscpy
(
__entry
->
trans_fn
,
trans
->
fn
,
sizeof
(
__entry
->
trans_fn
));
__entry
->
caller_ip
=
caller_ip
;
__entry
->
old_locks_want
=
old_locks_want
;
__entry
->
new_locks_want
=
path
->
locks_want
;
__entry
->
btree
=
path
->
btree_id
;
TRACE_BPOS_assign
(
pos
,
path
->
pos
);
),
TP_printk
(
"%s %pS"
,
TP_printk
(
"%s %pS
locks_want %u -> %u %s %llu:%llu:%u
"
,
__entry
->
trans_fn
,
(
void
*
)
__entry
->
caller_ip
)
(
void
*
)
__entry
->
caller_ip
,
__entry
->
old_locks_want
,
__entry
->
new_locks_want
,
bch2_btree_id_str
(
__entry
->
btree
),
__entry
->
pos_inode
,
__entry
->
pos_offset
,
__entry
->
pos_snapshot
)
);
DEFINE_EVENT
(
transaction_event
,
trans_restart_write_buffer_flush
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment