diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-04 20:34:24 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-04 20:34:24 -0500 |
commit | c032ef64d680717e4e8ce3da65da6419a35f8a2c (patch) | |
tree | f6d77c0033e9a33f22adac66d939338c55f06525 /kernel/trace/trace.c | |
parent | e74da5235cec6cb71eb338c987f876ecc793138b (diff) |
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: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2e53e6f09440..55fcbb567950 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -299,6 +299,7 @@ static const char *trace_options[] = { | |||
299 | "sym-userobj", | 299 | "sym-userobj", |
300 | "printk-msg-only", | 300 | "printk-msg-only", |
301 | "context-info", | 301 | "context-info", |
302 | "latency-format", | ||
302 | NULL | 303 | NULL |
303 | }; | 304 | }; |
304 | 305 | ||
@@ -1829,26 +1830,12 @@ static int tracing_open(struct inode *inode, struct file *file) | |||
1829 | iter = __tracing_open(inode, file); | 1830 | iter = __tracing_open(inode, file); |
1830 | if (IS_ERR(iter)) | 1831 | if (IS_ERR(iter)) |
1831 | ret = PTR_ERR(iter); | 1832 | ret = PTR_ERR(iter); |
1832 | 1833 | else if (trace_flags & TRACE_ITER_LATENCY_FMT) | |
1833 | return ret; | ||
1834 | } | ||
1835 | |||
1836 | static int tracing_lt_open(struct inode *inode, struct file *file) | ||
1837 | { | ||
1838 | struct trace_iterator *iter; | ||
1839 | int ret = 0; | ||
1840 | |||
1841 | iter = __tracing_open(inode, file); | ||
1842 | |||
1843 | if (IS_ERR(iter)) | ||
1844 | ret = PTR_ERR(iter); | ||
1845 | else | ||
1846 | iter->iter_flags |= TRACE_FILE_LAT_FMT; | 1834 | iter->iter_flags |= TRACE_FILE_LAT_FMT; |
1847 | 1835 | ||
1848 | return ret; | 1836 | return ret; |
1849 | } | 1837 | } |
1850 | 1838 | ||
1851 | |||
1852 | static void * | 1839 | static void * |
1853 | t_next(struct seq_file *m, void *v, loff_t *pos) | 1840 | t_next(struct seq_file *m, void *v, loff_t *pos) |
1854 | { | 1841 | { |
@@ -1927,13 +1914,6 @@ static struct file_operations tracing_fops = { | |||
1927 | .release = tracing_release, | 1914 | .release = tracing_release, |
1928 | }; | 1915 | }; |
1929 | 1916 | ||
1930 | static struct file_operations tracing_lt_fops = { | ||
1931 | .open = tracing_lt_open, | ||
1932 | .read = seq_read, | ||
1933 | .llseek = seq_lseek, | ||
1934 | .release = tracing_release, | ||
1935 | }; | ||
1936 | |||
1937 | static struct file_operations show_traces_fops = { | 1917 | static struct file_operations show_traces_fops = { |
1938 | .open = show_traces_open, | 1918 | .open = show_traces_open, |
1939 | .read = seq_read, | 1919 | .read = seq_read, |