diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-11-17 04:16:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-17 04:17:47 -0500 |
commit | a7b63425a41cd6a8d50f76fef0660c5110f97e91 (patch) | |
tree | be17ee121f1c8814d8d39c9f3e0205d9397fab54 /kernel/trace | |
parent | 35039eb6b199749943547c8572be6604edf00229 (diff) | |
parent | 3726cc75e581c157202da93bb2333cce25c15c98 (diff) |
Merge branch 'perf/core' into perf/probes
Resolved merge conflict in tools/perf/Makefile
Merge reason: we want to queue up a dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 8 | ||||
-rw-r--r-- | kernel/trace/ring_buffer.c | 14 | ||||
-rw-r--r-- | kernel/trace/trace.c | 8 | ||||
-rw-r--r-- | kernel/trace/trace_events_filter.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_output.c | 5 |
5 files changed, 21 insertions, 16 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index b10c0d90a6ff..7cb6f1922598 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 | } |
@@ -2199,15 +2199,15 @@ ftrace_regex_write(struct file *file, const char __user *ubuf, | |||
2199 | ret = ftrace_process_regex(parser->buffer, | 2199 | ret = ftrace_process_regex(parser->buffer, |
2200 | parser->idx, enable); | 2200 | parser->idx, enable); |
2201 | if (ret) | 2201 | if (ret) |
2202 | goto out; | 2202 | goto out_unlock; |
2203 | 2203 | ||
2204 | trace_parser_clear(parser); | 2204 | trace_parser_clear(parser); |
2205 | } | 2205 | } |
2206 | 2206 | ||
2207 | ret = read; | 2207 | ret = read; |
2208 | 2208 | out_unlock: | |
2209 | mutex_unlock(&ftrace_regex_lock); | 2209 | mutex_unlock(&ftrace_regex_lock); |
2210 | out: | 2210 | |
2211 | return ret; | 2211 | return ret; |
2212 | } | 2212 | } |
2213 | 2213 | ||
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index e43c928356ee..db223fe8887f 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 | ||
489 | static inline u64 rb_time_stamp(struct ring_buffer *buffer, int cpu) | 489 | static 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 |
@@ -1196,6 +1196,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned nr_pages) | |||
1196 | atomic_inc(&cpu_buffer->record_disabled); | 1196 | atomic_inc(&cpu_buffer->record_disabled); |
1197 | synchronize_sched(); | 1197 | synchronize_sched(); |
1198 | 1198 | ||
1199 | spin_lock_irq(&cpu_buffer->reader_lock); | ||
1199 | rb_head_page_deactivate(cpu_buffer); | 1200 | rb_head_page_deactivate(cpu_buffer); |
1200 | 1201 | ||
1201 | for (i = 0; i < nr_pages; i++) { | 1202 | for (i = 0; i < nr_pages; i++) { |
@@ -1210,6 +1211,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned nr_pages) | |||
1210 | return; | 1211 | return; |
1211 | 1212 | ||
1212 | rb_reset_cpu(cpu_buffer); | 1213 | rb_reset_cpu(cpu_buffer); |
1214 | spin_unlock_irq(&cpu_buffer->reader_lock); | ||
1213 | 1215 | ||
1214 | rb_check_pages(cpu_buffer); | 1216 | rb_check_pages(cpu_buffer); |
1215 | 1217 | ||
@@ -1871,7 +1873,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer, | |||
1871 | * Nested commits always have zero deltas, so | 1873 | * Nested commits always have zero deltas, so |
1872 | * just reread the time stamp | 1874 | * just reread the time stamp |
1873 | */ | 1875 | */ |
1874 | *ts = rb_time_stamp(buffer, cpu_buffer->cpu); | 1876 | *ts = rb_time_stamp(buffer); |
1875 | next_page->page->time_stamp = *ts; | 1877 | next_page->page->time_stamp = *ts; |
1876 | } | 1878 | } |
1877 | 1879 | ||
@@ -2114,7 +2116,7 @@ rb_reserve_next_event(struct ring_buffer *buffer, | |||
2114 | if (RB_WARN_ON(cpu_buffer, ++nr_loops > 1000)) | 2116 | if (RB_WARN_ON(cpu_buffer, ++nr_loops > 1000)) |
2115 | goto out_fail; | 2117 | goto out_fail; |
2116 | 2118 | ||
2117 | ts = rb_time_stamp(cpu_buffer->buffer, cpu_buffer->cpu); | 2119 | ts = rb_time_stamp(cpu_buffer->buffer); |
2118 | 2120 | ||
2119 | /* | 2121 | /* |
2120 | * Only the first commit can update the timestamp. | 2122 | * Only the first commit can update the timestamp. |
@@ -2684,7 +2686,7 @@ unsigned long ring_buffer_entries(struct ring_buffer *buffer) | |||
2684 | EXPORT_SYMBOL_GPL(ring_buffer_entries); | 2686 | EXPORT_SYMBOL_GPL(ring_buffer_entries); |
2685 | 2687 | ||
2686 | /** | 2688 | /** |
2687 | * ring_buffer_overrun_cpu - get the number of overruns in buffer | 2689 | * ring_buffer_overruns - get the number of overruns in buffer |
2688 | * @buffer: The ring buffer | 2690 | * @buffer: The ring buffer |
2689 | * | 2691 | * |
2690 | * Returns the total number of overruns in the ring buffer | 2692 | * Returns the total number of overruns in the ring buffer |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 026e715a0c7a..9d3067a62d43 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_events_filter.c b/kernel/trace/trace_events_filter.c index 21d34757b955..50504cb228de 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
@@ -1230,12 +1230,12 @@ static int replace_system_preds(struct event_subsystem *system, | |||
1230 | struct filter_parse_state *ps, | 1230 | struct filter_parse_state *ps, |
1231 | char *filter_string) | 1231 | char *filter_string) |
1232 | { | 1232 | { |
1233 | struct event_filter *filter = system->filter; | ||
1234 | struct ftrace_event_call *call; | 1233 | struct ftrace_event_call *call; |
1235 | bool fail = true; | 1234 | bool fail = true; |
1236 | int err; | 1235 | int err; |
1237 | 1236 | ||
1238 | list_for_each_entry(call, &ftrace_events, list) { | 1237 | list_for_each_entry(call, &ftrace_events, list) { |
1238 | struct event_filter *filter = call->filter; | ||
1239 | 1239 | ||
1240 | if (!call->define_fields) | 1240 | if (!call->define_fields) |
1241 | continue; | 1241 | continue; |
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index ed17565826b0..b6c12c6a1bcd 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 | } |
100 | EXPORT_SYMBOL_GPL(trace_seq_printf); | 103 | EXPORT_SYMBOL_GPL(trace_seq_printf); |
101 | 104 | ||