diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-04-12 07:29:13 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-04-12 09:22:19 +0200 |
commit | ef0eb2e6447f562bae2bcf503afcd85d68e843cc (patch) | |
tree | c6c89a26511e564efe85c1e69132aedd439c932d /tools/perf/util/evsel.c | |
parent | 1c4f8ad81c7f13314e4357550be9d5be3754fed9 (diff) | |
parent | 986a5bc028a84d487c354a529730b48682d1fb41 (diff) |
Merge tag 'perf-core-for-mingo-4.12-20170411' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
perf/core improvements and fixes:
User visible changes:
- Support s390 jump instructions in perf annotate (Christian Borntraeger)
- When failing to setup multiple events (e.g. '-e irq_vectors:*'), state
which one caused the failure (Yao Jin)
- Various fixes for pipe mode, where the output of 'perf record' is
written to stdout instead of to a perf.data file, fixing workloads
such as: (David Carrillo-Cisneros)
$ perf record -o - noploop | perf inject -b > perf.data
$ perf record -o - noploop | perf annotate
Infrastructure changes:
- Simplify ltrim() implementation (Arnaldo Carvalho de Melo)
- Use ltrim() and rtrim() in places where ad-hoc equivalents were being
used (Taeung Song)
Conflicts:
tools/perf/util/annotate.c
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 9dc7e2d6e48a..8f5d86bd3501 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -2457,11 +2457,17 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target, int err, char *msg, size_t size) { char sbuf[STRERR_BUFSIZE]; + int printed = 0; switch (err) { case EPERM: case EACCES: - return scnprintf(msg, size, + if (err == EPERM) + printed = scnprintf(msg, size, + "No permission to enable %s event.\n\n", + perf_evsel__name(evsel)); + + return scnprintf(msg + printed, size - printed, "You may not have permission to collect %sstats.\n\n" "Consider tweaking /proc/sys/kernel/perf_event_paranoid,\n" "which controls use of the performance events system by\n" |