[PATCH v2 1/3] kernel : process fork/exit: export symbol for fork/exit tracing functions
Wei Chin Tsai
Wei-chin.Tsai at mediatek.com
Tue Jun 13 20:20:33 PDT 2023
In ths Patch, we export symbols for two functions of
"sched_process_fork" and "sched_process_exit" for
process statistics. During the system running,
some process will run in a second and then terminate.
We hope that we can capture those processes' jiffies
information for system performance analysis.
Signed-off-by: Wei Chin Tsai <Wei-chin.Tsai at mediatek.com>
---
kernel/exit.c | 2 ++
kernel/fork.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/kernel/exit.c b/kernel/exit.c
index edb50b4c9972..410a3de14e09 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -81,6 +81,8 @@
*/
static unsigned int oops_limit = 10000;
+EXPORT_TRACEPOINT_SYMBOL_GPL(sched_process_exit);
+
#ifdef CONFIG_SYSCTL
static struct ctl_table kern_exit_table[] = {
{
diff --git a/kernel/fork.c b/kernel/fork.c
index f81985dcc4bd..8fba356fb7c2 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -142,6 +142,8 @@ DEFINE_PER_CPU(unsigned long, process_counts) = 0;
__cacheline_aligned DEFINE_RWLOCK(tasklist_lock); /* outer */
+EXPORT_TRACEPOINT_SYMBOL_GPL(sched_process_fork);
+
#ifdef CONFIG_PROVE_RCU
int lockdep_tasklist_lock_is_held(void)
{
--
2.18.0
More information about the Linux-mediatek
mailing list