From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756503AbdIHN2F (ORCPT ); Fri, 8 Sep 2017 09:28:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:34936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756414AbdIHN2E (ORCPT ); Fri, 8 Sep 2017 09:28:04 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBBEB21B67 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Fri, 8 Sep 2017 10:28:02 -0300 From: Arnaldo Carvalho de Melo To: David Ahern Cc: namhyung@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf sched timehist: Add pid and tid options Message-ID: <20170908132802.GB26336@kernel.org> References: <1504288152-19690-1-git-send-email-dsahern@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Sep 07, 2017 at 09:07:24AM -0600, David Ahern escreveu: > Hi Arnaldo: > > are you ok with this change? Yes, it is already merged in my perf/core branch. - Arnaldo > On 9/1/17 11:49 AM, David Ahern wrote: > > Add options to only show event for specific pid(s) and tid(s). > > > > Signed-off-by: David Ahern > > --- > > tools/perf/Documentation/perf-sched.txt | 8 ++++++++ > > tools/perf/builtin-sched.c | 4 ++++ > > 2 files changed, 12 insertions(+) > > > > diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt > > index a092a2499e8f..55b67338548e 100644 > > --- a/tools/perf/Documentation/perf-sched.txt > > +++ b/tools/perf/Documentation/perf-sched.txt > > @@ -106,6 +106,14 @@ OPTIONS for 'perf sched timehist' > > --max-stack:: > > Maximum number of functions to display in backtrace, default 5. > > > > +-p=:: > > +--pid=:: > > + Only show events for given process ID (comma separated list). > > + > > +-t=:: > > +--tid=:: > > + Only show events for given thread ID (comma separated list). > > + > > -s:: > > --summary:: > > Show only a summary of scheduling by thread with min, max, and average > > diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c > > index 322b4def8411..b7e8812ee80c 100644 > > --- a/tools/perf/builtin-sched.c > > +++ b/tools/perf/builtin-sched.c > > @@ -3363,6 +3363,10 @@ int cmd_sched(int argc, const char **argv) > > OPT_STRING(0, "time", &sched.time_str, "str", > > "Time span for analysis (start,stop)"), > > OPT_BOOLEAN(0, "state", &sched.show_state, "Show task state when sched-out"), > > + OPT_STRING('p', "pid", &symbol_conf.pid_list_str, "pid[,pid...]", > > + "analyze events only for given process id(s)"), > > + OPT_STRING('t', "tid", &symbol_conf.tid_list_str, "tid[,tid...]", > > + "analyze events only for given thread id(s)"), > > OPT_PARENT(sched_options) > > }; > > > >