[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B202763.10604@am.sony.com>
Date: Wed, 9 Dec 2009 14:40:35 -0800
From: Tim Bird <tim.bird@...sony.com>
To: linux kernel <linux-kernel@...r.kernel.org>
CC: Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>
Subject: [PATCH 1/4] ftrace - expose tracing_thresh and global_trace
Make tracing_thresh and global_trace available for
function_duration tracer.
Signed-off-by: Tim Bird <tim.bird@...sony.com>
---
kernel/trace/trace.c | 7 ++++---
kernel/trace/trace.h | 5 ++++-
2 files changed, 8 insertions(+), 4 deletions(-)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -165,7 +165,7 @@ unsigned long long ns2usecs(cycle_t nsec
* pages for the buffer for that CPU. Each CPU has the same number
* of pages allocated for its buffer.
*/
-static struct trace_array global_trace;
+struct trace_array global_trace;
static DEFINE_PER_CPU(struct trace_array_cpu, global_trace_cpu);
@@ -503,9 +503,10 @@ static ssize_t trace_seq_to_buffer(struc
static raw_spinlock_t ftrace_max_lock =
(raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
+unsigned long __read_mostly tracing_thresh;
+
#ifdef CONFIG_TRACER_MAX_TRACE
unsigned long __read_mostly tracing_max_latency;
-unsigned long __read_mostly tracing_thresh;
/*
* Copy the new maximum trace into the separate maximum-trace
@@ -4177,9 +4178,9 @@ static __init int tracer_init_debugfs(vo
trace_create_file("tracing_max_latency", 0644, d_tracer,
&tracing_max_latency, &tracing_max_lat_fops);
+#endif
trace_create_file("tracing_thresh", 0644, d_tracer,
&tracing_thresh, &tracing_max_lat_fops);
-#endif
trace_create_file("README", 0444, d_tracer,
NULL, &tracing_readme_fops);
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -157,6 +157,8 @@ struct trace_array {
struct trace_array_cpu *data[NR_CPUS];
};
+extern struct trace_array global_trace;
+
#define FTRACE_CMP_TYPE(var, type) \
__builtin_types_compatible_p(typeof(var), type *)
@@ -366,9 +368,10 @@ int is_tracing_stopped(void);
extern unsigned long nsecs_to_usecs(unsigned long nsecs);
+extern unsigned long tracing_thresh;
+
#ifdef CONFIG_TRACER_MAX_TRACE
extern unsigned long tracing_max_latency;
-extern unsigned long tracing_thresh;
void update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu);
void update_max_tr_single(struct trace_array *tr,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists