aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-04 20:34:24 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-03-04 20:34:24 -0500
commitc032ef64d680717e4e8ce3da65da6419a35f8a2c (patch)
treef6d77c0033e9a33f22adac66d939338c55f06525 /kernel
parente74da5235cec6cb71eb338c987f876ecc793138b (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')
-rw-r--r--kernel/trace/trace.c24
-rw-r--r--kernel/trace/trace.h3
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
1836static 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
1852static void * 1839static void *
1853t_next(struct seq_file *m, void *v, loff_t *pos) 1840t_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
1930static 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
1937static struct file_operations show_traces_fops = { 1917static 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/*