aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-08-11 08:19:09 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-11 08:19:09 -0400
commit89034bc2c7b839702c00a704e79d112737f98be0 (patch)
treee65b1f3d4c751baa840efc81bc4734f089379eb3 /kernel/trace/trace.c
parentfb82ad719831db58e9baa4c67015aae3fe27e7e3 (diff)
parent85dfd81dc57e8183a277ddd7a56aa65c96f3f487 (diff)
Merge branch 'linus' into tracing/core
Conflicts: kernel/trace/trace_events_filter.c We use the tracing/core version. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 0cfd1a62def1..e793cda91dd3 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -848,6 +848,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
848 ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | 848 ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) |
849 (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0); 849 (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0);
850} 850}
851EXPORT_SYMBOL_GPL(tracing_generic_entry_update);
851 852
852struct ring_buffer_event *trace_buffer_lock_reserve(struct trace_array *tr, 853struct ring_buffer_event *trace_buffer_lock_reserve(struct trace_array *tr,
853 int type, 854 int type,
@@ -1857,7 +1858,7 @@ static int tracing_open(struct inode *inode, struct file *file)
1857 1858
1858 /* If this file was open for write, then erase contents */ 1859 /* If this file was open for write, then erase contents */
1859 if ((file->f_mode & FMODE_WRITE) && 1860 if ((file->f_mode & FMODE_WRITE) &&
1860 !(file->f_flags & O_APPEND)) { 1861 (file->f_flags & O_TRUNC)) {
1861 long cpu = (long) inode->i_private; 1862 long cpu = (long) inode->i_private;
1862 1863
1863 if (cpu == TRACE_PIPE_ALL_CPU) 1864 if (cpu == TRACE_PIPE_ALL_CPU)
@@ -2911,7 +2912,8 @@ tracing_fill_pipe_page(size_t rem, struct trace_iterator *iter)
2911 break; 2912 break;
2912 } 2913 }
2913 2914
2914 trace_consume(iter); 2915 if (ret != TRACE_TYPE_NO_CONSUME)
2916 trace_consume(iter);
2915 rem -= count; 2917 rem -= count;
2916 if (!find_next_entry_inc(iter)) { 2918 if (!find_next_entry_inc(iter)) {
2917 rem = 0; 2919 rem = 0;
@@ -4056,8 +4058,11 @@ static void __ftrace_dump(bool disable_tracing)
4056 iter.pos = -1; 4058 iter.pos = -1;
4057 4059
4058 if (find_next_entry_inc(&iter) != NULL) { 4060 if (find_next_entry_inc(&iter) != NULL) {
4059 print_trace_line(&iter); 4061 int ret;
4060 trace_consume(&iter); 4062
4063 ret = print_trace_line(&iter);
4064 if (ret != TRACE_TYPE_NO_CONSUME)
4065 trace_consume(&iter);
4061 } 4066 }
4062 4067
4063 trace_printk_seq(&iter.seq); 4068 trace_printk_seq(&iter.seq);