Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759880Ab2EKGjO (ORCPT ); Fri, 11 May 2012 02:39:14 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57225 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756530Ab2EKGjK (ORCPT ); Fri, 11 May 2012 02:39:10 -0400 Date: Thu, 10 May 2012 23:38:49 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: linux-kernel@vger.kernel.org, eranian@google.com, paulus@samba.org, acme@redhat.com, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, efault@gmx.de, namhyung@gmail.com, fweisbec@gmail.com, dsahern@gmail.com, tglx@linutronix.de Reply-To: mingo@kernel.org, hpa@zytor.com, acme@redhat.com, paulus@samba.org, eranian@google.com, linux-kernel@vger.kernel.org, efault@gmx.de, peterz@infradead.org, namhyung@gmail.com, fweisbec@gmail.com, dsahern@gmail.com, tglx@linutronix.de To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf top: Set target.system_wide Git-Commit-ID: 10b47d54154ce711e4c4438aff10f0215b2ab8eb X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Thu, 10 May 2012 23:38:55 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2050 Lines: 52 Commit-ID: 10b47d54154ce711e4c4438aff10f0215b2ab8eb Gitweb: http://git.kernel.org/tip/10b47d54154ce711e4c4438aff10f0215b2ab8eb Author: Arnaldo Carvalho de Melo AuthorDate: Mon, 7 May 2012 16:33:56 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 7 May 2012 16:46:03 -0300 perf top: Set target.system_wide Check if neither of --pid, --tid or --uid was specified and if so, set system_wide appropriately. Namhyung's patch would make using any of the above target specifiers emit a warning in perf_target__validate, since it would see target.system_wide set and one of the others as well. So set system_wide after validation. Suggested-by: David Ahern Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-6e4zrji1uw0rinfyoitl0wi4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-top.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 2a0ec09..e40f86e 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1258,6 +1258,10 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) if (top.target.uid_str != NULL && top.target.uid == UINT_MAX - 1) goto out_delete_evlist; + if (top.target.tid == 0 && top.target.pid == 0 && + top.target.uid_str == NULL) + top.target.system_wide = true; + if (perf_evlist__create_maps(top.evlist, &top.target) < 0) usage_with_options(top_usage, options); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/