aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-11-04 05:54:15 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-04 05:59:45 -0500
commita2e71271535fde493c32803b1f34789f97efcb5e (patch)
tree90d7139bea2f49e947f27af92614fa6eca50b64d /kernel/trace
parent6d7aa9d721c8c640066142fd9534afcdf68d7f9d (diff)
parentb419148e567728f6af0c3b01965c1cc141e3e13a (diff)
Merge commit 'v2.6.32-rc6' into perf/core
Conflicts: tools/perf/Makefile Merge reason: Resolve the conflict, merge to upstream and merge in perf fixes so we can add a dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ftrace.c2
-rw-r--r--kernel/trace/ring_buffer.c12
-rw-r--r--kernel/trace/trace.c8
-rw-r--r--kernel/trace/trace_output.c5
4 files changed, 15 insertions, 12 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index b10c0d90a6f..1ed514fe3a3 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -751,7 +751,7 @@ ftrace_profile_write(struct file *filp, const char __user *ubuf,
751 out: 751 out:
752 mutex_unlock(&ftrace_profile_lock); 752 mutex_unlock(&ftrace_profile_lock);
753 753
754 filp->f_pos += cnt; 754 *ppos += cnt;
755 755
756 return cnt; 756 return cnt;
757} 757}
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index e43c928356e..63446f12e47 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -486,7 +486,7 @@ struct ring_buffer_iter {
486/* Up this if you want to test the TIME_EXTENTS and normalization */ 486/* Up this if you want to test the TIME_EXTENTS and normalization */
487#define DEBUG_SHIFT 0 487#define DEBUG_SHIFT 0
488 488
489static inline u64 rb_time_stamp(struct ring_buffer *buffer, int cpu) 489static inline u64 rb_time_stamp(struct ring_buffer *buffer)
490{ 490{
491 /* shift to debug/test normalization and TIME_EXTENTS */ 491 /* shift to debug/test normalization and TIME_EXTENTS */
492 return buffer->clock() << DEBUG_SHIFT; 492 return buffer->clock() << DEBUG_SHIFT;
@@ -497,7 +497,7 @@ u64 ring_buffer_time_stamp(struct ring_buffer *buffer, int cpu)
497 u64 time; 497 u64 time;
498 498
499 preempt_disable_notrace(); 499 preempt_disable_notrace();
500 time = rb_time_stamp(buffer, cpu); 500 time = rb_time_stamp(buffer);
501 preempt_enable_no_resched_notrace(); 501 preempt_enable_no_resched_notrace();
502 502
503 return time; 503 return time;
@@ -602,7 +602,7 @@ static struct list_head *rb_list_head(struct list_head *list)
602} 602}
603 603
604/* 604/*
605 * rb_is_head_page - test if the give page is the head page 605 * rb_is_head_page - test if the given page is the head page
606 * 606 *
607 * Because the reader may move the head_page pointer, we can 607 * Because the reader may move the head_page pointer, we can
608 * not trust what the head page is (it may be pointing to 608 * not trust what the head page is (it may be pointing to
@@ -1871,7 +1871,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
1871 * Nested commits always have zero deltas, so 1871 * Nested commits always have zero deltas, so
1872 * just reread the time stamp 1872 * just reread the time stamp
1873 */ 1873 */
1874 *ts = rb_time_stamp(buffer, cpu_buffer->cpu); 1874 *ts = rb_time_stamp(buffer);
1875 next_page->page->time_stamp = *ts; 1875 next_page->page->time_stamp = *ts;
1876 } 1876 }
1877 1877
@@ -2114,7 +2114,7 @@ rb_reserve_next_event(struct ring_buffer *buffer,
2114 if (RB_WARN_ON(cpu_buffer, ++nr_loops > 1000)) 2114 if (RB_WARN_ON(cpu_buffer, ++nr_loops > 1000))
2115 goto out_fail; 2115 goto out_fail;
2116 2116
2117 ts = rb_time_stamp(cpu_buffer->buffer, cpu_buffer->cpu); 2117 ts = rb_time_stamp(cpu_buffer->buffer);
2118 2118
2119 /* 2119 /*
2120 * Only the first commit can update the timestamp. 2120 * Only the first commit can update the timestamp.
@@ -2684,7 +2684,7 @@ unsigned long ring_buffer_entries(struct ring_buffer *buffer)
2684EXPORT_SYMBOL_GPL(ring_buffer_entries); 2684EXPORT_SYMBOL_GPL(ring_buffer_entries);
2685 2685
2686/** 2686/**
2687 * ring_buffer_overrun_cpu - get the number of overruns in buffer 2687 * ring_buffer_overruns - get the number of overruns in buffer
2688 * @buffer: The ring buffer 2688 * @buffer: The ring buffer
2689 * 2689 *
2690 * Returns the total number of overruns in the ring buffer 2690 * Returns the total number of overruns in the ring buffer
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 026e715a0c7..9d3067a62d4 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2440,7 +2440,7 @@ tracing_trace_options_write(struct file *filp, const char __user *ubuf,
2440 return ret; 2440 return ret;
2441 } 2441 }
2442 2442
2443 filp->f_pos += cnt; 2443 *ppos += cnt;
2444 2444
2445 return cnt; 2445 return cnt;
2446} 2446}
@@ -2582,7 +2582,7 @@ tracing_ctrl_write(struct file *filp, const char __user *ubuf,
2582 } 2582 }
2583 mutex_unlock(&trace_types_lock); 2583 mutex_unlock(&trace_types_lock);
2584 2584
2585 filp->f_pos += cnt; 2585 *ppos += cnt;
2586 2586
2587 return cnt; 2587 return cnt;
2588} 2588}
@@ -2764,7 +2764,7 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf,
2764 if (err) 2764 if (err)
2765 return err; 2765 return err;
2766 2766
2767 filp->f_pos += ret; 2767 *ppos += ret;
2768 2768
2769 return ret; 2769 return ret;
2770} 2770}
@@ -3299,7 +3299,7 @@ tracing_entries_write(struct file *filp, const char __user *ubuf,
3299 } 3299 }
3300 } 3300 }
3301 3301
3302 filp->f_pos += cnt; 3302 *ppos += cnt;
3303 3303
3304 /* If check pages failed, return ENOMEM */ 3304 /* If check pages failed, return ENOMEM */
3305 if (tracing_disabled) 3305 if (tracing_disabled)
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index ed17565826b..b6c12c6a1bc 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -69,6 +69,9 @@ enum print_line_t trace_print_printk_msg_only(struct trace_iterator *iter)
69 * @s: trace sequence descriptor 69 * @s: trace sequence descriptor
70 * @fmt: printf format string 70 * @fmt: printf format string
71 * 71 *
72 * It returns 0 if the trace oversizes the buffer's free
73 * space, 1 otherwise.
74 *
72 * The tracer may use either sequence operations or its own 75 * The tracer may use either sequence operations or its own
73 * copy to user routines. To simplify formating of a trace 76 * copy to user routines. To simplify formating of a trace
74 * trace_seq_printf is used to store strings into a special 77 * trace_seq_printf is used to store strings into a special
@@ -95,7 +98,7 @@ trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
95 98
96 s->len += ret; 99 s->len += ret;
97 100
98 return len; 101 return 1;
99} 102}
100EXPORT_SYMBOL_GPL(trace_seq_printf); 103EXPORT_SYMBOL_GPL(trace_seq_printf);
101 104