Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1307499ybh; Thu, 16 Jul 2020 08:37:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRSzO7lRt8TFJ0gQTTeXGkVZMJ5WLmQ5gffZEiGPxcGiX3cbfyuIoO9TC5SQ4q2BztTrph X-Received: by 2002:a17:906:35ce:: with SMTP id p14mr1887457ejb.514.1594913853281; Thu, 16 Jul 2020 08:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594913853; cv=none; d=google.com; s=arc-20160816; b=jA1bOYmCMQyoElMAU4UpPH4ZOEoXVqaVlolU09ETgAsF/igjijxCcocEtzMlwcdjri 4rOAGrvsqpL0sA/F3jaemEBNz6Y3+CqLIu6L9VCDmmpuq2fcMCB0xnfyYh2fYmNhAmSo qf0Qvw1VIKZVOl0UFB6BgrigAow5zyseDx3nehPMBuzZBpyCt/XZOTyOvysghZCN7Sih gGuvMMc75kG8OECd3eUeg2+65zbzZZ4WWrc2r/zyxuxWBbSYUaGHeiPFRM/GSJ+HqizB 7I9izDi5QMv93t/XEWpxmEJcDNTvyyqVqYt5GPgEvM+lHmyZqml2zzdoEf48XOFwHfE5 x/3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+1FQuoKwxp+eEjcGvleOKo0lHkFSOfHf1q+W1wp3nFs=; b=03pGSKwK7aG0h3l1Eo9bKP9t4oC7VcKn+d6MU/cBAysrVBGSnxwE8+y/XKR2jDYQjV VOiwMZYEkfi9nRU0hrs+yfU8HcFQk8tGMFyVGrMZ/89HV8Q6KhjLMTfiV4rypq3rVUei ymUng1CUEjLVE7F+RniKZ3+mYGw5dgPDCeSCAO4cdRYxXTXMdzVvvndHRz8C9RuMJ+9k YCYxcdqcA01rh1pdIKk57SNN7mPynfjPAVDMm7GHVp5o0KmX9qEn0UJA9Dq0t09h1Bxx bCrwrUQpwHUeBFJvzGcvl/ki2Vb0LgOmVSZsex9fg/pb++f6rq9P/qdHfpTJz0O7uKPm sMEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hp2R5CmN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si3330475edn.528.2020.07.16.08.37.09; Thu, 16 Jul 2020 08:37:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hp2R5CmN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729034AbgGPPgd (ORCPT + 99 others); Thu, 16 Jul 2020 11:36:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:49392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729008AbgGPPgd (ORCPT ); Thu, 16 Jul 2020 11:36:33 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7B4E62076A; Thu, 16 Jul 2020 15:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594913792; bh=TXWQ7PJ4FaO3GvnSM/6Ywjc/SETPXxQPqMa7IlASHw8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hp2R5CmNy++pACit8wvHR6pZ//aK/fdFMkyktXRfWOV3uNMem15k/ttJIpmJrCx9S C02ZBq4MY98OAELZwxgA2qHVe4p0jOxFRDZN70z36H8pAu/pRU3A3CRAgPglpy4PBk iWYhSLyWRNLh6gBiDPxGbnYrEfvXruGHSRKV+CXs= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 73612403C7; Thu, 16 Jul 2020 12:36:30 -0300 (-03) Date: Thu, 16 Jul 2020 12:36:30 -0300 From: Arnaldo Carvalho de Melo To: Changbin Du Cc: Jiri Olsa , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Steven Rostedt , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 03/17] perf ftrace: add option -t/--tid to filter by thread id Message-ID: <20200716153630.GD374956@kernel.org> References: <20200711124035.6513-1-changbin.du@gmail.com> <20200711124035.6513-4-changbin.du@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200711124035.6513-4-changbin.du@gmail.com> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, Jul 11, 2020 at 08:40:21PM +0800, Changbin Du escreveu: > This allows us to trace single thread instead of the whole process. > > Signed-off-by: Changbin Du > --- > tools/perf/Documentation/perf-ftrace.txt | 4 ++++ > tools/perf/builtin-ftrace.c | 2 ++ > 2 files changed, 6 insertions(+) > > diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools/perf/Documentation/perf-ftrace.txt > index d79560dea19f..e204bf6d50d8 100644 > --- a/tools/perf/Documentation/perf-ftrace.txt > +++ b/tools/perf/Documentation/perf-ftrace.txt > @@ -38,6 +38,10 @@ OPTIONS > --pid=:: > Trace on existing process id (comma separated list). > > +-t:: > +--tid=:: > + Trace on existing thread id (comma separated list). > + Humm, I just tried: [root@five ~]# yes > /dev/null & [1] 18265 [root@five ~]# perf ftrace --tid 18265 ^C[root@five ~]# After waiting for a while, nothing, what am I doing wrong? - Arnaldo > -a:: > --all-cpus:: > Force system-wide collection. Scripts run without a > diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c > index 244cc8e6bd60..1188b82c6541 100644 > --- a/tools/perf/builtin-ftrace.c > +++ b/tools/perf/builtin-ftrace.c > @@ -515,6 +515,8 @@ int cmd_ftrace(int argc, const char **argv) > "Show available functions to filter"), > OPT_STRING('p', "pid", &ftrace.target.pid, "pid", > "trace on existing process id"), > + OPT_STRING('t', "tid", &ftrace.target.tid, "tid", > + "trace on existing thread id (exclusive to --pid)"), > OPT_INCR('v', "verbose", &verbose, > "be more verbose"), > OPT_BOOLEAN('a', "all-cpus", &ftrace.target.system_wide, > -- > 2.25.1 > -- - Arnaldo