Commit c032ef64 authored by Steven Rostedt's avatar Steven Rostedt

tracing: add latency output format option

With the removal of the latency_trace file, we lost the ability
to see some of the finer details in a trace. Like the state of
interrupts enabled, the preempt count, need resched, and if we
are in an interrupt handler, softirq handler or not.

This patch simply creates an option to bring back the old format.
This also removes the warning about an unused variable that held
the latency_trace file operations.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
parent e74da523
...@@ -299,6 +299,7 @@ static const char *trace_options[] = { ...@@ -299,6 +299,7 @@ static const char *trace_options[] = {
"sym-userobj", "sym-userobj",
"printk-msg-only", "printk-msg-only",
"context-info", "context-info",
"latency-format",
NULL NULL
}; };
...@@ -1829,26 +1830,12 @@ static int tracing_open(struct inode *inode, struct file *file) ...@@ -1829,26 +1830,12 @@ static int tracing_open(struct inode *inode, struct file *file)
iter = __tracing_open(inode, file); iter = __tracing_open(inode, file);
if (IS_ERR(iter)) if (IS_ERR(iter))
ret = PTR_ERR(iter); ret = PTR_ERR(iter);
else if (trace_flags & TRACE_ITER_LATENCY_FMT)
return ret;
}
static int tracing_lt_open(struct inode *inode, struct file *file)
{
struct trace_iterator *iter;
int ret = 0;
iter = __tracing_open(inode, file);
if (IS_ERR(iter))
ret = PTR_ERR(iter);
else
iter->iter_flags |= TRACE_FILE_LAT_FMT; iter->iter_flags |= TRACE_FILE_LAT_FMT;
return ret; return ret;
} }
static void * static void *
t_next(struct seq_file *m, void *v, loff_t *pos) t_next(struct seq_file *m, void *v, loff_t *pos)
{ {
...@@ -1927,13 +1914,6 @@ static struct file_operations tracing_fops = { ...@@ -1927,13 +1914,6 @@ static struct file_operations tracing_fops = {
.release = tracing_release, .release = tracing_release,
}; };
static struct file_operations tracing_lt_fops = {
.open = tracing_lt_open,
.read = seq_read,
.llseek = seq_lseek,
.release = tracing_release,
};
static struct file_operations show_traces_fops = { static struct file_operations show_traces_fops = {
.open = show_traces_open, .open = show_traces_open,
.read = seq_read, .read = seq_read,
......
...@@ -651,7 +651,8 @@ enum trace_iterator_flags { ...@@ -651,7 +651,8 @@ enum trace_iterator_flags {
TRACE_ITER_USERSTACKTRACE = 0x4000, TRACE_ITER_USERSTACKTRACE = 0x4000,
TRACE_ITER_SYM_USEROBJ = 0x8000, TRACE_ITER_SYM_USEROBJ = 0x8000,
TRACE_ITER_PRINTK_MSGONLY = 0x10000, TRACE_ITER_PRINTK_MSGONLY = 0x10000,
TRACE_ITER_CONTEXT_INFO = 0x20000 /* Print pid/cpu/time */ TRACE_ITER_CONTEXT_INFO = 0x20000, /* Print pid/cpu/time */
TRACE_ITER_LATENCY_FMT = 0x40000,
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment