Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Linux-Kernel
linux-evl
Commits
7b0812b3
Commit
7b0812b3
authored
Feb 07, 2021
by
Philippe Gerum
Browse files
evl/wait: display waitqueue name in trace
Signed-off-by:
Philippe Gerum
<
rpm@xenomai.org
>
parent
382242af
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/evl/wait.h
View file @
7b0812b3
...
...
@@ -22,6 +22,7 @@ struct evl_wait_channel {
int
(
*
follow_depend
)(
struct
evl_wait_channel
*
wchan
,
struct
evl_thread
*
originator
);
struct
list_head
wait_list
;
const
char
*
name
;
};
struct
evl_wait_queue
{
...
...
@@ -39,6 +40,7 @@ struct evl_wait_queue {
.reorder_wait = evl_reorder_wait, \
.follow_depend = evl_follow_wait_depend, \
.wait_list = LIST_HEAD_INIT((__name).wchan.wait_list), \
.name = #__name, \
}, \
}
...
...
include/trace/events/evl.h
View file @
7b0812b3
...
...
@@ -18,13 +18,12 @@
#include <linux/tracepoint.h>
#include <linux/trace_seq.h>
#include <evl/timer.h>
#include <evl/wait.h>
struct
evl_rq
;
struct
evl_thread
;
struct
evl_sched_attrs
;
struct
evl_init_thread_attr
;
struct
evl_wait_channel
;
struct
evl_wait_queue
;
struct
evl_mutex
;
struct
evl_clock
;
...
...
@@ -72,14 +71,14 @@ DECLARE_EVENT_CLASS(wq_event,
TP_ARGS
(
wq
),
TP_STRUCT__entry
(
__
field
(
struct
evl_wait_queue
*
,
wq
)
__
string
(
name
,
wq
->
wchan
.
name
)
),
TP_fast_assign
(
__
entry
->
wq
=
wq
;
__
assign_str
(
name
,
wq
->
wchan
.
name
)
;
),
TP_printk
(
"wq=%
p
"
,
__
entry
->
wq
)
TP_printk
(
"wq=%
s
"
,
__
get_str
(
name
)
)
);
DECLARE_EVENT_CLASS
(
mutex_event
,
...
...
@@ -705,6 +704,11 @@ DEFINE_EVENT(wq_event, evl_flush_wait,
TP_ARGS
(
wq
)
);
DEFINE_EVENT
(
wq_event
,
evl_finish_wait
,
TP_PROTO
(
struct
evl_wait_queue
*
wq
),
TP_ARGS
(
wq
)
);
DEFINE_EVENT
(
mutex_event
,
evl_mutex_trylock
,
TP_PROTO
(
struct
evl_mutex
*
mutex
),
TP_ARGS
(
mutex
)
...
...
kernel/evl/wait.c
View file @
7b0812b3
...
...
@@ -21,6 +21,7 @@ void __evl_init_wait(struct evl_wait_queue *wq,
raw_spin_lock_init
(
&
wq
->
lock
);
wq
->
wchan
.
reorder_wait
=
evl_reorder_wait
;
wq
->
wchan
.
follow_depend
=
evl_follow_wait_depend
;
wq
->
wchan
.
name
=
name
;
INIT_LIST_HEAD
(
&
wq
->
wchan
.
wait_list
);
lockdep_set_class_and_name
(
&
wq
->
lock
,
key
,
name
);
}
...
...
@@ -147,6 +148,8 @@ int evl_wait_schedule(struct evl_wait_queue *wq)
evl_schedule
();
trace_evl_finish_wait
(
wq
);
/*
* Upon return from schedule, we may or may not have been
* unlinked from the wait channel, depending on whether we
...
...
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