From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: a.p.zijlstra@chello.nl, hpa@zytor.com, namhyung@kernel.org,
tglx@linutronix.de, mingo@kernel.org, jolsa@kernel.org,
acme@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com
Subject: [tip:perf/urgent] perf record: Force ignore_missing_thread for uid option
Date: Tue, 20 Dec 2016 11:25:08 -0800 [thread overview]
Message-ID: <tip-23dc4f1586159470aac707caae526824dd077e25@git.kernel.org> (raw)
In-Reply-To: <1481538943-21874-6-git-send-email-jolsa@kernel.org>
Commit-ID: 23dc4f1586159470aac707caae526824dd077e25
Gitweb: http://git.kernel.org/tip/23dc4f1586159470aac707caae526824dd077e25
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 12 Dec 2016 11:35:43 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 15 Dec 2016 16:25:46 -0300
perf record: Force ignore_missing_thread for uid option
Enable perf_evsel::ignore_missing_thread for -u option to ignore
complete failure if any of the user's processes die between its
enumeration and time we open the event.
Committer notes:
While doing a 'make -j4 allmodconfig' we sometimes get into the race:
Before:
# perf record -u acme
Error:
The sys_perf_event_open() syscall returned with 3 (No such process) for event (cycles:ppp).
/bin/dmesg may provide additional information.
No CONFIG_PERF_EVENTS=y kernel support configured?
#
After:
[root@jouet ~]# perf record -u acme
WARNING: Ignored open failure for pid 9888
WARNING: Ignored open failure for pid 18059
[root@jouet ~]#
Which is an improvement, with the races not preventing the remaining threads
for the specified user from being monitored, but the message probably needs
further clarification.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1481538943-21874-6-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-record.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index fa26865..74d6a03 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1687,6 +1687,9 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
goto out;
}
+ /* Enable ignoring missing threads when -u option is defined. */
+ rec->opts.ignore_missing_thread = rec->opts.target.uid != UINT_MAX;
+
err = -ENOMEM;
if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
usage_with_options(record_usage, record_options);
prev parent reply other threads:[~2016-12-20 19:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 10:35 [PATCH 0/5] perf record: Allow to ignore missing pid Jiri Olsa
2016-12-12 10:35 ` [PATCH 1/5] perf mem: Fix --all-user/--all-kernel options Jiri Olsa
2016-12-12 13:43 ` Arnaldo Carvalho de Melo
2016-12-12 13:44 ` Jiri Olsa
2016-12-20 19:23 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2016-12-12 10:35 ` [PATCH 2/5] perf tools: Use variable instead of repeating lengthy FD macro Jiri Olsa
2016-12-20 19:23 ` [tip:perf/urgent] perf evsel: " tip-bot for Jiri Olsa
2016-12-12 10:35 ` [PATCH 3/5] perf tools: Add thread_map__remove function Jiri Olsa
2016-12-12 20:08 ` Arnaldo Carvalho de Melo
2016-12-12 20:21 ` Arnaldo Carvalho de Melo
2016-12-20 19:24 ` [tip:perf/urgent] perf thread_map: " tip-bot for Jiri Olsa
2016-12-12 10:35 ` [PATCH 4/5] perf tools: Allow to ignore missing pid Jiri Olsa
2016-12-12 14:32 ` Arnaldo Carvalho de Melo
2016-12-12 14:33 ` Arnaldo Carvalho de Melo
2016-12-12 14:53 ` Jiri Olsa
2016-12-12 15:21 ` Arnaldo Carvalho de Melo
2016-12-12 15:38 ` Jiri Olsa
2016-12-12 19:30 ` Arnaldo Carvalho de Melo
2016-12-12 16:58 ` Namhyung Kim
2016-12-13 7:46 ` [PATCHv2 " Jiri Olsa
2016-12-20 19:24 ` [tip:perf/urgent] perf evsel: " tip-bot for Jiri Olsa
2016-12-12 10:35 ` [PATCH 5/5] perf record: Force ignore_missing_thread for uid option Jiri Olsa
2016-12-20 19:25 ` tip-bot for Jiri Olsa [this message]
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-23dc4f1586159470aac707caae526824dd077e25@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).