From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932544AbcLLKf6 (ORCPT ); Mon, 12 Dec 2016 05:35:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52270 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932478AbcLLKf4 (ORCPT ); Mon, 12 Dec 2016 05:35:56 -0500 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: David Ahern , Namhyung Kim , Peter Zijlstra , lkml , Ingo Molnar Subject: [PATCH 5/5] perf record: Force ignore_missing_thread for uid option Date: Mon, 12 Dec 2016 11:35:43 +0100 Message-Id: <1481538943-21874-6-git-send-email-jolsa@kernel.org> In-Reply-To: <1481538943-21874-1-git-send-email-jolsa@kernel.org> References: <1481538943-21874-1-git-send-email-jolsa@kernel.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 12 Dec 2016 10:35:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-vjykwntox3u5tlqctjk280ko@git.kernel.org --- 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 fa26865364b6..74d6a035133a 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); -- 2.7.4