diff options
-rw-r--r-- | kernel/trace/trace.c | 24 | ||||
-rw-r--r-- | kernel/trace/trace.h | 3 |
2 files changed, 4 insertions, 23 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, |
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 561bb5c5d988..12cd119cca32 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -651,7 +651,8 @@ enum trace_iterator_flags { | |||
651 | TRACE_ITER_USERSTACKTRACE = 0x4000, | 651 | TRACE_ITER_USERSTACKTRACE = 0x4000, |
652 | TRACE_ITER_SYM_USEROBJ = 0x8000, | 652 | TRACE_ITER_SYM_USEROBJ = 0x8000, |
653 | TRACE_ITER_PRINTK_MSGONLY = 0x10000, | 653 | TRACE_ITER_PRINTK_MSGONLY = 0x10000, |
654 | TRACE_ITER_CONTEXT_INFO = 0x20000 /* Print pid/cpu/time */ | 654 | TRACE_ITER_CONTEXT_INFO = 0x20000, /* Print pid/cpu/time */ |
655 | TRACE_ITER_LATENCY_FMT = 0x40000, | ||
655 | }; | 656 | }; |
656 | 657 | ||
657 | /* | 658 | /* |