All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] perf record: Fix poll return value propagation
Date: Tue, 03 Jun 2014 12:21:43 +0900	[thread overview]
Message-ID: <87ppiqd6ew.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1401732126-19465-1-git-send-email-jolsa@kernel.org> (Jiri Olsa's message of "Mon, 2 Jun 2014 20:02:06 +0200")

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

  parent reply	other threads:[~2014-06-03  3:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 18:02 [PATCH] perf record: Fix poll return value propagation Jiri Olsa
2014-06-02 19:18 ` Arnaldo Carvalho de Melo
2014-06-03  3:21 ` Namhyung Kim [this message]
2014-06-05 14:32 ` [tip:perf/core] " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppiqd6ew.fsf@sejong.aot.lge.com \
    --to=namhyung@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.