Loading include/linux/latencytop.h +0 −3 Original line number Diff line number Diff line Loading @@ -38,9 +38,6 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter) void clear_tsk_latency_tracing(struct task_struct *p); int sysctl_latencytop(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); #else static inline void Loading kernel/latencytop.c +29 −12 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ #include <linux/sched/stat.h> #include <linux/list.h> #include <linux/stacktrace.h> #include <linux/sysctl.h> static DEFINE_RAW_SPINLOCK(latency_lock); Loading @@ -63,6 +64,31 @@ static struct latency_record latency_record[MAXLR]; int latencytop_enabled; #ifdef CONFIG_SYSCTL static int sysctl_latencytop(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int err; err = proc_dointvec(table, write, buffer, lenp, ppos); if (latencytop_enabled) force_schedstat_enabled(); return err; } static struct ctl_table latencytop_sysctl[] = { { .procname = "latencytop", .data = &latencytop_enabled, .maxlen = sizeof(int), .mode = 0644, .proc_handler = sysctl_latencytop, }, {} }; #endif void clear_tsk_latency_tracing(struct task_struct *p) { unsigned long flags; Loading Loading @@ -266,18 +292,9 @@ static const struct proc_ops lstats_proc_ops = { static int __init init_lstats_procfs(void) { proc_create("latency_stats", 0644, NULL, &lstats_proc_ops); #ifdef CONFIG_SYSCTL register_sysctl_init("kernel", latencytop_sysctl); #endif return 0; } int sysctl_latencytop(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int err; err = proc_dointvec(table, write, buffer, lenp, ppos); if (latencytop_enabled) force_schedstat_enabled(); return err; } device_initcall(init_lstats_procfs); kernel/sysctl.c +0 −10 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ #include <linux/kexec.h> #include <linux/mount.h> #include <linux/userfaultfd_k.h> #include <linux/latencytop.h> #include <linux/pid.h> #include "../lib/kstrtox.h" Loading Loading @@ -1623,15 +1622,6 @@ static struct ctl_table kern_table[] = { .extra1 = SYSCTL_NEG_ONE, .extra2 = SYSCTL_ONE, }, #endif #ifdef CONFIG_LATENCYTOP { .procname = "latencytop", .data = &latencytop_enabled, .maxlen = sizeof(int), .mode = 0644, .proc_handler = sysctl_latencytop, }, #endif { .procname = "print-fatal-signals", Loading Loading
include/linux/latencytop.h +0 −3 Original line number Diff line number Diff line Loading @@ -38,9 +38,6 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter) void clear_tsk_latency_tracing(struct task_struct *p); int sysctl_latencytop(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); #else static inline void Loading
kernel/latencytop.c +29 −12 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ #include <linux/sched/stat.h> #include <linux/list.h> #include <linux/stacktrace.h> #include <linux/sysctl.h> static DEFINE_RAW_SPINLOCK(latency_lock); Loading @@ -63,6 +64,31 @@ static struct latency_record latency_record[MAXLR]; int latencytop_enabled; #ifdef CONFIG_SYSCTL static int sysctl_latencytop(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int err; err = proc_dointvec(table, write, buffer, lenp, ppos); if (latencytop_enabled) force_schedstat_enabled(); return err; } static struct ctl_table latencytop_sysctl[] = { { .procname = "latencytop", .data = &latencytop_enabled, .maxlen = sizeof(int), .mode = 0644, .proc_handler = sysctl_latencytop, }, {} }; #endif void clear_tsk_latency_tracing(struct task_struct *p) { unsigned long flags; Loading Loading @@ -266,18 +292,9 @@ static const struct proc_ops lstats_proc_ops = { static int __init init_lstats_procfs(void) { proc_create("latency_stats", 0644, NULL, &lstats_proc_ops); #ifdef CONFIG_SYSCTL register_sysctl_init("kernel", latencytop_sysctl); #endif return 0; } int sysctl_latencytop(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { int err; err = proc_dointvec(table, write, buffer, lenp, ppos); if (latencytop_enabled) force_schedstat_enabled(); return err; } device_initcall(init_lstats_procfs);
kernel/sysctl.c +0 −10 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ #include <linux/kexec.h> #include <linux/mount.h> #include <linux/userfaultfd_k.h> #include <linux/latencytop.h> #include <linux/pid.h> #include "../lib/kstrtox.h" Loading Loading @@ -1623,15 +1622,6 @@ static struct ctl_table kern_table[] = { .extra1 = SYSCTL_NEG_ONE, .extra2 = SYSCTL_ONE, }, #endif #ifdef CONFIG_LATENCYTOP { .procname = "latencytop", .data = &latencytop_enabled, .maxlen = sizeof(int), .mode = 0644, .proc_handler = sysctl_latencytop, }, #endif { .procname = "print-fatal-signals", Loading