aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/events/core.c4
-rw-r--r--kernel/lockdep.c8
-rw-r--r--tools/perf/builtin-stat.c3
-rw-r--r--tools/perf/util/header.c2
4 files changed, 12 insertions, 5 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 600c1629b64d..d3b9df5962c2 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2174,11 +2174,11 @@ static void perf_event_context_sched_in(struct perf_event_context *ctx,
2174 */ 2174 */
2175 cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE); 2175 cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE);
2176 2176
2177 perf_event_sched_in(cpuctx, ctx, task);
2178
2179 if (ctx->nr_events) 2177 if (ctx->nr_events)
2180 cpuctx->task_ctx = ctx; 2178 cpuctx->task_ctx = ctx;
2181 2179
2180 perf_event_sched_in(cpuctx, cpuctx->task_ctx, task);
2181
2182 perf_pmu_enable(ctx->pmu); 2182 perf_pmu_enable(ctx->pmu);
2183 perf_ctx_unlock(cpuctx, ctx); 2183 perf_ctx_unlock(cpuctx, ctx);
2184 2184
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index e69434b070da..b2e08c932d91 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -44,6 +44,7 @@
44#include <linux/stringify.h> 44#include <linux/stringify.h>
45#include <linux/bitops.h> 45#include <linux/bitops.h>
46#include <linux/gfp.h> 46#include <linux/gfp.h>
47#include <linux/kmemcheck.h>
47 48
48#include <asm/sections.h> 49#include <asm/sections.h>
49 50
@@ -2948,7 +2949,12 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
2948void lockdep_init_map(struct lockdep_map *lock, const char *name, 2949void lockdep_init_map(struct lockdep_map *lock, const char *name,
2949 struct lock_class_key *key, int subclass) 2950 struct lock_class_key *key, int subclass)
2950{ 2951{
2951 memset(lock, 0, sizeof(*lock)); 2952 int i;
2953
2954 kmemcheck_mark_initialized(lock, sizeof(*lock));
2955
2956 for (i = 0; i < NR_LOCKDEP_CACHING_CLASSES; i++)
2957 lock->class_cache[i] = NULL;
2952 2958
2953#ifdef CONFIG_LOCK_STAT 2959#ifdef CONFIG_LOCK_STAT
2954 lock->cpu = raw_smp_processor_id(); 2960 lock->cpu = raw_smp_processor_id();
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 7d98676808d8..955930e0a5c3 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -463,7 +463,8 @@ static int run_perf_stat(int argc __used, const char **argv)
463 463
464 list_for_each_entry(counter, &evsel_list->entries, node) { 464 list_for_each_entry(counter, &evsel_list->entries, node) {
465 if (create_perf_stat_counter(counter, first) < 0) { 465 if (create_perf_stat_counter(counter, first) < 0) {
466 if (errno == EINVAL || errno == ENOSYS || errno == ENOENT) { 466 if (errno == EINVAL || errno == ENOSYS ||
467 errno == ENOENT || errno == EOPNOTSUPP) {
467 if (verbose) 468 if (verbose)
468 ui__warning("%s event is not supported by the kernel.\n", 469 ui__warning("%s event is not supported by the kernel.\n",
469 event_name(counter)); 470 event_name(counter));
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index bcd05d05b4f0..33c17a2b2a81 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -388,7 +388,7 @@ static int write_event_desc(int fd, struct perf_header *h __used,
388 /* 388 /*
389 * write event string as passed on cmdline 389 * write event string as passed on cmdline
390 */ 390 */
391 ret = do_write_string(fd, attr->name); 391 ret = do_write_string(fd, event_name(attr));
392 if (ret < 0) 392 if (ret < 0)
393 return ret; 393 return ret;
394 /* 394 /*