From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758733Ab2EJRVF (ORCPT ); Thu, 10 May 2012 13:21:05 -0400 Received: from merlin.infradead.org ([205.233.59.134]:55873 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756648Ab2EJRR5 (ORCPT ); Thu, 10 May 2012 13:17:57 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , David Ahern , Frederic Weisbecker , Mike Galbraith , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Stephane Eranian Subject: [PATCH 09/16] perf top: Default to system wide using perf_target methods Date: Thu, 10 May 2012 14:17:38 -0300 Message-Id: <1336670265-20401-10-git-send-email-acme@infradead.org> X-Mailer: git-send-email 1.7.9.2.358.g22243 In-Reply-To: <1336670265-20401-1-git-send-email-acme@infradead.org> References: <1336670265-20401-1-git-send-email-acme@infradead.org> Content-Type: text/plain; charset="UTF-8" X-SRS-Rewrite: SMTP reverse-path rewritten from by canuck.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo Additionally we were not checking if a cpu list had been provided by the user. Fix that. Reported-by: David Ahern Reported-by: Namhyung Kim 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-ao3zrouylwmt7h9ikj0krubi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-top.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index e4ca827..c53cdab 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1270,8 +1270,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) goto out_delete_evlist; } - if (top.target.tid == 0 && top.target.pid == 0 && - top.target.uid_str == NULL) + if (perf_target__none(&top.target)) top.target.system_wide = true; if (perf_evlist__create_maps(top.evlist, &top.target) < 0) -- 1.7.9.2.358.g22243