From 8561241dfebca9ce9e7fd1e40cff70491ebaf08b Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Fri, 2 Dec 2011 09:38:33 +1100 Subject: [PATCH] --- yaml --- r: 276552 b: refs/heads/master c: 38f6ae1e1b0d5e8b0a95f88c1eee2c5e8b001631 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/ftrace_event.h | 2 -- trunk/kernel/events/core.c | 4 ++-- trunk/kernel/jump_label.c | 3 +-- trunk/kernel/lockdep.c | 8 +------- trunk/kernel/trace/ftrace.c | 5 ++--- trunk/kernel/trace/trace_events.c | 1 + trunk/kernel/trace/trace_events_filter.c | 7 +------ trunk/tools/perf/builtin-stat.c | 3 ++- trunk/tools/perf/util/trace-event-parse.c | 2 -- 10 files changed, 11 insertions(+), 26 deletions(-) diff --git a/[refs] b/[refs] index 783ef5cc2043..c3b793ccacd8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 86b47c25494b824da655b95f6fdb4fdb3f17aa77 +refs/heads/master: 38f6ae1e1b0d5e8b0a95f88c1eee2c5e8b001631 diff --git a/trunk/include/linux/ftrace_event.h b/trunk/include/linux/ftrace_event.h index c3da42dd22ba..96efa6794ea5 100644 --- a/trunk/include/linux/ftrace_event.h +++ b/trunk/include/linux/ftrace_event.h @@ -172,7 +172,6 @@ enum { TRACE_EVENT_FL_FILTERED_BIT, TRACE_EVENT_FL_RECORDED_CMD_BIT, TRACE_EVENT_FL_CAP_ANY_BIT, - TRACE_EVENT_FL_NO_SET_FILTER_BIT, }; enum { @@ -180,7 +179,6 @@ enum { TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT), - TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT), }; struct ftrace_event_call { diff --git a/trunk/kernel/events/core.c b/trunk/kernel/events/core.c index d3b9df5962c2..600c1629b64d 100644 --- a/trunk/kernel/events/core.c +++ b/trunk/kernel/events/core.c @@ -2174,11 +2174,11 @@ static void perf_event_context_sched_in(struct perf_event_context *ctx, */ cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE); + perf_event_sched_in(cpuctx, ctx, task); + if (ctx->nr_events) cpuctx->task_ctx = ctx; - perf_event_sched_in(cpuctx, cpuctx->task_ctx, task); - perf_pmu_enable(ctx->pmu); perf_ctx_unlock(cpuctx, ctx); diff --git a/trunk/kernel/jump_label.c b/trunk/kernel/jump_label.c index 66ff7109f697..bbdfe2a462a0 100644 --- a/trunk/kernel/jump_label.c +++ b/trunk/kernel/jump_label.c @@ -66,9 +66,8 @@ void jump_label_inc(struct jump_label_key *key) return; jump_label_lock(); - if (atomic_read(&key->enabled) == 0) + if (atomic_add_return(1, &key->enabled) == 1) jump_label_update(key, JUMP_LABEL_ENABLE); - atomic_inc(&key->enabled); jump_label_unlock(); } diff --git a/trunk/kernel/lockdep.c b/trunk/kernel/lockdep.c index b2e08c932d91..e69434b070da 100644 --- a/trunk/kernel/lockdep.c +++ b/trunk/kernel/lockdep.c @@ -44,7 +44,6 @@ #include #include #include -#include #include @@ -2949,12 +2948,7 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, void lockdep_init_map(struct lockdep_map *lock, const char *name, struct lock_class_key *key, int subclass) { - int i; - - kmemcheck_mark_initialized(lock, sizeof(*lock)); - - for (i = 0; i < NR_LOCKDEP_CACHING_CLASSES; i++) - lock->class_cache[i] = NULL; + memset(lock, 0, sizeof(*lock)); #ifdef CONFIG_LOCK_STAT lock->cpu = raw_smp_processor_id(); diff --git a/trunk/kernel/trace/ftrace.c b/trunk/kernel/trace/ftrace.c index b1e8943fed1d..900b409543db 100644 --- a/trunk/kernel/trace/ftrace.c +++ b/trunk/kernel/trace/ftrace.c @@ -152,6 +152,7 @@ void clear_ftrace_function(void) ftrace_pid_function = ftrace_stub; } +#undef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST #ifndef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST /* * For those archs that do not test ftrace_trace_stop in their @@ -1211,9 +1212,7 @@ ftrace_hash_move(struct ftrace_ops *ops, int enable, if (!src->count) { free_ftrace_hash_rcu(*dst); rcu_assign_pointer(*dst, EMPTY_HASH); - /* still need to update the function records */ - ret = 0; - goto out; + return 0; } /* diff --git a/trunk/kernel/trace/trace_events.c b/trunk/kernel/trace/trace_events.c index c212a7f934ec..581876f9f387 100644 --- a/trunk/kernel/trace/trace_events.c +++ b/trunk/kernel/trace/trace_events.c @@ -1078,6 +1078,7 @@ event_subsystem_dir(const char *name, struct dentry *d_events) /* First see if we did not already create this dir */ list_for_each_entry(system, &event_subsystems, list) { if (strcmp(system->name, name) == 0) { + __get_system(system); system->nr_events++; return system->entry; } diff --git a/trunk/kernel/trace/trace_events_filter.c b/trunk/kernel/trace/trace_events_filter.c index 95dc31efd6dd..d6e7926dcd26 100644 --- a/trunk/kernel/trace/trace_events_filter.c +++ b/trunk/kernel/trace/trace_events_filter.c @@ -1649,9 +1649,7 @@ static int replace_system_preds(struct event_subsystem *system, */ err = replace_preds(call, NULL, ps, filter_string, true); if (err) - call->flags |= TRACE_EVENT_FL_NO_SET_FILTER; - else - call->flags &= ~TRACE_EVENT_FL_NO_SET_FILTER; + goto fail; } list_for_each_entry(call, &ftrace_events, list) { @@ -1660,9 +1658,6 @@ static int replace_system_preds(struct event_subsystem *system, if (strcmp(call->class->system, system->name) != 0) continue; - if (call->flags & TRACE_EVENT_FL_NO_SET_FILTER) - continue; - filter_item = kzalloc(sizeof(*filter_item), GFP_KERNEL); if (!filter_item) goto fail_mem; diff --git a/trunk/tools/perf/builtin-stat.c b/trunk/tools/perf/builtin-stat.c index 7d98676808d8..955930e0a5c3 100644 --- a/trunk/tools/perf/builtin-stat.c +++ b/trunk/tools/perf/builtin-stat.c @@ -463,7 +463,8 @@ static int run_perf_stat(int argc __used, const char **argv) list_for_each_entry(counter, &evsel_list->entries, node) { if (create_perf_stat_counter(counter, first) < 0) { - if (errno == EINVAL || errno == ENOSYS || errno == ENOENT) { + if (errno == EINVAL || errno == ENOSYS || + errno == ENOENT || errno == EOPNOTSUPP) { if (verbose) ui__warning("%s event is not supported by the kernel.\n", event_name(counter)); diff --git a/trunk/tools/perf/util/trace-event-parse.c b/trunk/tools/perf/util/trace-event-parse.c index 6c164dc9ee95..0a7ed5b5e281 100644 --- a/trunk/tools/perf/util/trace-event-parse.c +++ b/trunk/tools/perf/util/trace-event-parse.c @@ -1537,8 +1537,6 @@ process_flags(struct event *event, struct print_arg *arg, char **tok) field = malloc_or_die(sizeof(*field)); type = process_arg(event, field, &token); - while (type == EVENT_OP) - type = process_op(event, field, &token); if (test_type_token(type, token, EVENT_DELIM, ",")) goto out_free;