perf/core: Add return value for perf_event_read()
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Fri, 4 Sep 2015 03:07:50 +0000 (20:07 -0700)
committerIngo Molnar <mingo@kernel.org>
Sun, 13 Sep 2015 09:27:28 +0000 (11:27 +0200)
commit7d88962e230c8342080e7e2fe9dd5be43dc13b79
tree6a74bd3eff85ef018877b85de360f0ede033db7c
parentfa8c269353d560b7c28119ad7617029f92e40b15
perf/core: Add return value for perf_event_read()

When we implement the ability to read several counters at once (using
the PERF_PMU_TXN_READ transaction interface), perf_event_read() can
fail when the 'group' parameter is true (eg: trying to read too many
events at once).

For now, have perf_event_read() return an integer. Ignore the return
value when the 'group' parameter is false.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/1441336073-22750-8-git-send-email-sukadev@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c