From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, adrian.hunter@intel.com,
linux-kernel@vger.kernel.org, mail@milianw.de, paulus@samba.org,
tglx@linutronix.de, a.p.zijlstra@chello.nl, dsahern@gmail.com,
fweisbec@gmail.com, mingo@kernel.org,
cjashfor@linux.vnet.ibm.com, namhyung@kernel.org,
acme@redhat.com, jolsa@kernel.org
Subject: [tip:perf/urgent] perf kvm stat live: Use perf_evlist__add_pollfd return fd position
Date: Wed, 15 Oct 2014 03:01:34 -0700 [thread overview]
Message-ID: <tip-0cae013cf4450ea0ecb62241a2f3e7565db09f93@git.kernel.org> (raw)
In-Reply-To: <1412179229-19466-4-git-send-email-jolsa@kernel.org>
Commit-ID: 0cae013cf4450ea0ecb62241a2f3e7565db09f93
Gitweb: http://git.kernel.org/tip/0cae013cf4450ea0ecb62241a2f3e7565db09f93
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Wed, 1 Oct 2014 18:00:28 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 3 Oct 2014 09:39:48 -0300
perf kvm stat live: Use perf_evlist__add_pollfd return fd position
With the interface changed in following commit:
2171a9256862 tools lib fd array: Allow associating an integer cookie with each entry
the perf_evlist__add_pollfd function now returns the fd position in the
pollfd array.
Hence we no longer need to count the fd position, because we get it as
the return value.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Milian Wolff <mail@milianw.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1412179229-19466-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-kvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 663d6ed..dc7d704 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -933,10 +933,10 @@ static int kvm_events_live_report(struct perf_kvm_stat *kvm)
nr_fds++;
- if (perf_evlist__add_pollfd(kvm->evlist, fileno(stdin)) < 0)
+ nr_stdin = perf_evlist__add_pollfd(kvm->evlist, fileno(stdin));
+ if (nr_stdin < 0)
goto out;
- nr_stdin = nr_fds;
nr_fds++;
if (fd_set_nonblock(fileno(stdin)) != 0)
goto out;
next prev parent reply other threads:[~2014-10-15 10:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 16:00 [PATCH 1/5] perf tools: Do not set O_NONBLOCK flag for perf event fd Jiri Olsa
2014-10-01 16:00 ` [PATCH 2/5] perf tools: Move callchain_param to util object in to fix python test Jiri Olsa
[not found] ` <20141002145949.GK2799@kernel.org>
2014-10-02 15:08 ` Jiri Olsa
2014-10-02 15:13 ` Arnaldo Carvalho de Melo
2014-10-15 10:02 ` [tip:perf/urgent] perf callchain: " tip-bot for Jiri Olsa
2014-10-01 16:00 ` [PATCH 3/5] perf kvm stat live: Fix perf_evlist__add_pollfd error handling Jiri Olsa
2014-10-15 10:01 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2014-10-01 16:00 ` [PATCH 4/5] perf kvm stat live: Use perf_evlist__add_pollfd return fd position Jiri Olsa
2014-10-15 10:01 ` tip-bot for Jiri Olsa [this message]
2014-10-01 16:00 ` [PATCH 5/5] perf kvm stat live: Use fdarray object instead pollfd Jiri Olsa
2014-10-15 10:01 ` [tip:perf/urgent] perf kvm stat live: Use fdarray object instead of pollfd 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=tip-0cae013cf4450ea0ecb62241a2f3e7565db09f93@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mail@milianw.de \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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.