Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2121851ybh; Fri, 17 Jul 2020 09:46:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnMQJ200i0qUriM6kgfYIQipZpMLfYGZ+qyUn/gb62qOEQj0OPOEKE3QII2VB7e0A2vZBe X-Received: by 2002:a17:906:46cd:: with SMTP id k13mr9255514ejs.312.1595004387839; Fri, 17 Jul 2020 09:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595004387; cv=none; d=google.com; s=arc-20160816; b=DYAwqw2qvHaPACWwnF7MwKS8wm/yzzB6hZx81NEu7rAwhmpguvuKOI0Ef+Q6dQPzeo KZ78Qc6/yCRkVot4/qNFrNeVaDL2a2H2n3xutL3GZhjRlOVAhjbCA1OKXLT+9hW9DnUo hJZVUeeqQOxt8bHgeEnotjt2YiCWYubgVSjRwObMm2FuZj+egNk3AVFK4Dmq5isxvxZa jL8ZWOMCY70LDBSBNa1JW0NXkkdern0TTrH6A3FopRMdQJhxRzWvi5u5V/Y829mWJ+F/ ZRwlZ3tsWaGvBFK1URsOe5W5RN/06di/T76hYCBk1J8yxh1TTvCrj415hEbmfAZlj+Fj J0NA== 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=h0xQ4lgz1S0SHa02Xk0kbGLgeXaXfaJhHTIjBg+FTN0=; b=UJj7AZqO5+QwDbweW1yv0FUxqmtVUJl+gVJcyVNEEBG3270hjS0BMm95f2c2plPpz0 kREbh5UhGOqajh3VDTjpiFDaUhaz9nFu8XlkTvYtvQXxEkt0rUfBC/PZJwx0BIPQ7n9i TAuuq4g+x53r10NtJPAfCYlILqnLcDc2jC+3zrnq8bKIu43sGk4OM+aXOGKEIeoa+ulM ua/KOH383ay202q2lICU8a/JX8p/u92xgYZNCa/gM/Lss+6BQ+FTluwqo1DZsL6ifShq BwHqExgWt+TbgXjxEs0KZrk8LCUNRsR4NowHqrVqsReKNYn+TTX4XolMEgihMSXP8RfN s08Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E6RAlCz9; 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 gj23si5935541ejb.21.2020.07.17.09.46.05; Fri, 17 Jul 2020 09:46:27 -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=E6RAlCz9; 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 S1726627AbgGQQoz (ORCPT + 99 others); Fri, 17 Jul 2020 12:44:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:33816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbgGQQoz (ORCPT ); Fri, 17 Jul 2020 12:44:55 -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 AA8B72067D; Fri, 17 Jul 2020 16:44:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595004294; bh=mPWcubb+1OOeRzCC8UaJsYvbCOgciE/eu3GRXnDMqn4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E6RAlCz9b+Ikt9EraXleXTwMUVyhK00b2BBD5ALr+iMoIYV53B34WuB8VKq6DFXad ZPXsKEzSTLAyLHubdD/H5Jaky24B5gXj6AmsXwAW8pMAXlSO9sSbIoccfpwWEhYglY PDSmIYTEkuADK47QgPZsut6sBttMgxzxwAX2HK3I= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id C8B9740482; Fri, 17 Jul 2020 13:44:52 -0300 (-03) Date: Fri, 17 Jul 2020 13:44:52 -0300 From: Arnaldo Carvalho de Melo To: Changbin Du Cc: Arnaldo Carvalho de Melo , 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: <20200717164452.GD712240@kernel.org> References: <20200711124035.6513-1-changbin.du@gmail.com> <20200711124035.6513-4-changbin.du@gmail.com> <20200716153630.GD374956@kernel.org> <20200717132650.i32oovllal22b35i@mail.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200717132650.i32oovllal22b35i@mail.google.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 Fri, Jul 17, 2020 at 09:26:50PM +0800, Changbin Du escreveu: > On Thu, Jul 16, 2020 at 12:36:30PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Sat, Jul 11, 2020 at 08:40:21PM +0800, Changbin Du escreveu: > > > +++ 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? > I got it wrong. Currently ftrace only can filter by pid. If the pid is not > the main thread it won't work. > So this patch makes no sense. will drop this. I think you could alternatively keep it but inform the user that this target, available to other perf commands, isn't available for ftrace as it doesn't support it, this way when the user goes from: perf trace|top|record|script|report --tid 1234 to: perf ftrace --tid 1234 He gets a message like: ERROR: 'ftrace' doesn't support the --tid target, try with --pid And that would be more useful, provides an explanation as why that target can't be used and suggests an alternative. - Arnaldo