: Another latency histogram cleanup
PATCH 1/1 : Another latency histogram cleanup
Hi, Ingo
This is another latency histogram cleanup, changes include:
- Remove some definitons to include/linux/latency_hist.h from kenerl/latency.c and kernel/latency_hist.c
- Eliminate most #ifedf from check_critical_timing() and check_wakup_timing()
diffstat:
include/linux/latency_hist.h | 32 ++++++++++++++++++++ kernel/latency.c | 67 ++++++++++++++----------------------------- kernel/latency_hist.c | 12 +------ 3 files changed, 57 insertions(+), 54 deletions(-)
include/linux/latency_hist.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* kernel/latency_hist.h +* +* Add support for histograms of preemption-off latency and +* interrupt-off latency and wakeup latency, it depends on +* Real-Time Preemption Support. +* +* Copyright (C) 2005 MontaVista Software, Inc. +* Yi Yang <[email protected]> +* +*/ +#ifndef _LINUX_LATENCY_HIST_H_ +#define _LINUX_LATENCY_HIST_H_ + +enum { +INTERRUPT_LATENCY =0 , +PREEMPT_LATENCY , +WAKEUP_LATENCY +}; + +#define MAX_ENTRY_NUM 10240 +#define LATENCY_TYPE_NUM 3 + +#ifdef CONFIG_LATENCY_HIST +extern void latency_hist (int latency_type,int cpu,unsigned long latency); +#define latency_hist_flag 1 +#else +#define latency_hist (a,b,c) do {} while(0) +#define latency_hist_flag 0 +#endif /* CONFIG_LATENCY_HIST */ + +#endif /* ifndef _LINUX_LATENCY_HIST_H_ */
kernel/latency.c renamed from kernel/latency.c.orig +23 -44
152 lines not on this page · raw message
kernel/latency_hist.c renamed from kernel/latency_hist.c.orig +2 -10
@@ -5,7 +5,7 @@* interrupt-off latency and wakeup latency, it depends on * Real-Time Preemption Support. * -* Copyright (C) 2005, 2007 MontaVista Software, Inc. +* Copyright (C) 2005 MontaVista Software, Inc. * Yi Yang <[email protected]> * */
@@ -14,11 +14,9 @@#include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/percpu.h> +#include <linux/latency_hist.h> #include <asm/atomic.h> -#define MAX_ENTRY_NUM 10240 -#define LATENCY_TYPE_NUM 3 - typedef struct hist_data_struct { atomic_t hist_mode; /* 0 log, 1 don't log */ unsigned long min_lat;
@@ -30,12 +28,6 @@ typedef struct hist_data_struct {unsigned long long hist_array[MAX_ENTRY_NUM ]; } hist_data_t; -enum { -INTERRUPT_LATENCY =0 , -PREEMPT_LATENCY , -WAKEUP_LATENCY -}; -static struct proc_dir_entry * latency_hist_root =NULL ;static char * latency_hist_proc_dir_root ="latency_hist" ;
Ingo Molnar
AppliedQuoted 6 lines · yangyi
Hi, Ingo
This is another latency histogram cleanup, changes include:
- Remove some definitons to
include/linux/latency_hist.hfromkenerl/latency.candkernel/latency_hist.c
- Eliminate most #ifedf fromcheck_critical_timing()andcheck_wakup_timing()
thanks, applied.
Ingo