summaryrefslogtreecommitdiff
path: root/kernel/rcu
diff options
context:
space:
mode:
authorUladzislau Rezki (Sony) <urezki@gmail.com>2020-01-20 17:42:26 +0300
committerPaul E. McKenney <paulmck@kernel.org>2020-02-21 02:58:51 +0300
commit613707929b304737e6eb841588772f1994f6702b (patch)
tree431d2395b3751573d5b315d016c70daa5500d9a6 /kernel/rcu
parent34c881745549e78f31ec65f319457c82aacc53bd (diff)
downloadlinux-613707929b304737e6eb841588772f1994f6702b.tar.xz
rcu: Add a trace event for kfree_rcu() use of kfree_bulk()
The event is given three parameters, first one is the name of RCU flavour, second one is the number of elements in array for free and last one is an address of the array holding pointers to be freed by the kfree_bulk() function. To enable the trace event your kernel has to be build with CONFIG_RCU_TRACE=y, after that it is possible to track the events using ftrace subsystem. Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 51a3aa884a7c..909f97efb1ed 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2792,6 +2792,9 @@ static void kfree_rcu_work(struct work_struct *work)
debug_rcu_head_unqueue_bulk(bhead->head_free_debug);
rcu_lock_acquire(&rcu_callback_map);
+ trace_rcu_invoke_kfree_bulk_callback(rcu_state.name,
+ bhead->nr_records, bhead->records);
+
kfree_bulk(bhead->nr_records, bhead->records);
rcu_lock_release(&rcu_callback_map);