Commit 975e32c2 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Do no try to schedule task events if there are none
  lockdep, kmemcheck: Annotate ->lock in lockdep_init_map()
  perf header: Use event_name() to get an event name
  perf stat: Failure with "Operation not supported"
parents 031af165 167e33c3
...@@ -2174,11 +2174,11 @@ static void perf_event_context_sched_in(struct perf_event_context *ctx, ...@@ -2174,11 +2174,11 @@ static void perf_event_context_sched_in(struct perf_event_context *ctx,
*/ */
cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE); cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE);
perf_event_sched_in(cpuctx, ctx, task);
if (ctx->nr_events) if (ctx->nr_events)
cpuctx->task_ctx = ctx; cpuctx->task_ctx = ctx;
perf_event_sched_in(cpuctx, cpuctx->task_ctx, task);
perf_pmu_enable(ctx->pmu); perf_pmu_enable(ctx->pmu);
perf_ctx_unlock(cpuctx, ctx); perf_ctx_unlock(cpuctx, ctx);
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <linux/stringify.h> #include <linux/stringify.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/kmemcheck.h>
#include <asm/sections.h> #include <asm/sections.h>
...@@ -2948,7 +2949,12 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, ...@@ -2948,7 +2949,12 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
void lockdep_init_map(struct lockdep_map *lock, const char *name, void lockdep_init_map(struct lockdep_map *lock, const char *name,
struct lock_class_key *key, int subclass) struct lock_class_key *key, int subclass)
{ {
memset(lock, 0, sizeof(*lock)); int i;
kmemcheck_mark_initialized(lock, sizeof(*lock));
for (i = 0; i < NR_LOCKDEP_CACHING_CLASSES; i++)
lock->class_cache[i] = NULL;
#ifdef CONFIG_LOCK_STAT #ifdef CONFIG_LOCK_STAT
lock->cpu = raw_smp_processor_id(); lock->cpu = raw_smp_processor_id();
......
...@@ -463,7 +463,8 @@ static int run_perf_stat(int argc __used, const char **argv) ...@@ -463,7 +463,8 @@ static int run_perf_stat(int argc __used, const char **argv)
list_for_each_entry(counter, &evsel_list->entries, node) { list_for_each_entry(counter, &evsel_list->entries, node) {
if (create_perf_stat_counter(counter, first) < 0) { 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) if (verbose)
ui__warning("%s event is not supported by the kernel.\n", ui__warning("%s event is not supported by the kernel.\n",
event_name(counter)); event_name(counter));
......
...@@ -388,7 +388,7 @@ static int write_event_desc(int fd, struct perf_header *h __used, ...@@ -388,7 +388,7 @@ static int write_event_desc(int fd, struct perf_header *h __used,
/* /*
* write event string as passed on cmdline * write event string as passed on cmdline
*/ */
ret = do_write_string(fd, attr->name); ret = do_write_string(fd, event_name(attr));
if (ret < 0) if (ret < 0)
return ret; return ret;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment