lkml.org 
[lkml]   [2014]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] perf record: Fix poll return value propagation
Date
On Mon,  2 Jun 2014 20:02:06 +0200, Jiri Olsa wrote:
> If the perf record command is interrupted in record__mmap_read_all
> function, the 'done' is set and err has the latest poll return
> value, which is most likely positive number (= number of pollfds
> ready to read).
>
> This 'positive err' is then propagated to the exit code, resulting
> in not finishing the perf.data header properly, causing following
> error in report:
>
> # perf record -F 50000 -a
>
> ---
> make the system real busy, so there's more chance
> to interrupt perf in event writing code
> ---
>
> ^C[ perf record: Woken up 16 times to write data ]
> [ perf record: Captured and wrote 30.292 MB perf.data (~1323468 samples) ]
>
> # perf report --stdio > /dev/null
> WARNING: The perf.data file's data size field is 0 which is unexpected.
> Was the 'perf record' command properly terminated?
>
> Fixing this by checking for positive poll return value
> and setting err to 0.

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


\
 
 \ /
  Last update: 2014-06-03 06:01    [W:0.052 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site