mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
perf: Do not check PERF_EVENT_STATE_EXIT on syscall read path
Revert PERF_EVENT_STATE_EXIT check on read syscall path. It breaks standard way to read counter, which is to open the counter, wait for the monitored process to die and read the counter. Reported-by: Stephane Eranian <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> Acked-by: Stephane Eranian <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: David Ahern <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
a08b6769d4
commit
c88f209613
1 changed files with 1 additions and 2 deletions
|
|
@ -3601,8 +3601,7 @@ perf_read_hw(struct perf_event *event, char __user *buf, size_t count)
|
|||
* error state (i.e. because it was pinned but it couldn't be
|
||||
* scheduled on to the CPU at some point).
|
||||
*/
|
||||
if ((event->state == PERF_EVENT_STATE_ERROR) ||
|
||||
(event->state == PERF_EVENT_STATE_EXIT))
|
||||
if (event->state == PERF_EVENT_STATE_ERROR)
|
||||
return 0;
|
||||
|
||||
if (count < event->read_size)
|
||||
|
|
|
|||
Loading…
Reference in a new issue