summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-05-12 21:21:02 +0200
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 22:02:13 +0200
commit6c6c27969a4c6024e6c8838829546c02aaddca18 (patch)
tree95158673881e53373ec4e7d92ff0c0e0f34be30f /kernel/trace/trace.h
parentftrace: use raw_smp_processor_id for mcount functions (diff)
downloadlinux-6c6c27969a4c6024e6c8838829546c02aaddca18.tar.xz
linux-6c6c27969a4c6024e6c8838829546c02aaddca18.zip
ftrace: add readpos to struct trace_seq; add trace_seq_to_user()
Refactor code from tracing_read_pipe() and create trace_seq_to_user(). Moved trace_seq_reset() call before iter->trace->read() call so that when all leftover data is returned, trace_seq is reset automatically. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to '')
-rw-r--r--kernel/trace/trace.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index ee53d706066f..8845033ab49d 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -155,6 +155,7 @@ struct tracer {
struct trace_seq {
unsigned char buffer[PAGE_SIZE];
unsigned int len;
+ unsigned int readpos;
};
/*
@@ -301,6 +302,8 @@ extern int trace_selftest_startup_sched_switch(struct tracer *trace,
extern void *head_page(struct trace_array_cpu *data);
extern int trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
+extern ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
+ size_t cnt);
extern long ns2usecs(cycle_t nsec);
extern unsigned long trace_flags;