[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1385725510-20118-1-git-send-email-jolsa@redhat.com>
Date: Fri, 29 Nov 2013 12:45:04 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Jiri Olsa <jolsa@...hat.com>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Namhyung Kim <namhyung@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
David Ahern <dsahern@...il.com>,
Andi Kleen <andi@...stfloor.org>
Subject: [RFC 0/6] perf tools: Add perf_evlist errno
hi,
Andi reported wrong error message for :S modifier
on kernel without event ID ioctl support.
The reason was that the ioctl failed, but the error was
printed like the mmap would:
$ perf.old record -e '{cycles,cache-misses}:S' ls
failed to mmap with 25 (Inappropriate ioctl for device)
ls: Terminated
I experimentally added sort of 'libc errno' interface for
perf_evlist to be able to get proper error message, like:
$ perf record -e '{cycles,cache-misses}:S' ls
Cannot read event group on this kernel.
Please consider kernel update (v3.12+).
ls: Terminated
I'm not sure about this approach. Maybe it'd be better be more
global..? So before throwing this out, sending it as RFC ;-)
thanks for ideas,
jirka
Signed-off-by: Jiri Olsa <jolsa@...hat.com>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Andi Kleen <andi@...stfloor.org>
---
Jiri Olsa (6):
perf tools: Add perf_evlist error string interface
perf tools: Add PERF_EVLIST__ERRNO_MMAP internal error
perf tools: Add PERF_EVLIST__ERRNO_OPEN internal error
perf tools: Add PERF_EVLIST__ERRNO_IOCTL_ID_GROUP internal error
perf tools: Add PERF_EVLIST__ERRNO_NEWTP internal error
perf tools: Use perf_evlist__strerror in kvm/record/top/trace commands
tools/perf/builtin-kvm.c | 2 +-
tools/perf/builtin-record.c | 13 +------
tools/perf/builtin-top.c | 3 +-
tools/perf/builtin-trace.c | 34 ++++++++---------
tools/perf/util/evlist.c | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
tools/perf/util/evlist.h | 23 +++++++++++-
6 files changed, 181 insertions(+), 99 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists