From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4007C55192 for ; Thu, 23 Apr 2020 23:33:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 92C282087E for ; Thu, 23 Apr 2020 23:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587684790; bh=eOH8otZNBa35EahXHMyUuKwMSkdWrQwp8Sr98YxOspw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=JtVpnp+5LSF8qwtHrXunn6NqCCKMiFtGrN+U6U5R4Ehj1lJtJAwr+1au+a7IXys3s ujug+BPFK7etIhbt90TdDH2Y6C9JC5VfOqyWed+JjnEipURLpnbV50mmKvMGLxXR0G XR8dI5tn4Fukxi45EPW9f4M1jeGtfDQhy1JcxjDc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728141AbgDWXdK (ORCPT ); Thu, 23 Apr 2020 19:33:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:37364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbgDWXdJ (ORCPT ); Thu, 23 Apr 2020 19:33:09 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 AF58120736; Thu, 23 Apr 2020 23:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587684789; bh=eOH8otZNBa35EahXHMyUuKwMSkdWrQwp8Sr98YxOspw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qlb/v6AnJJnQsYbkp4vlbhpaoOVQfoei+UqBfVMMSmK8ugUvdfKzoycXG+Jfn7A74 hE3e4s2653BuRPYTyRkWMydupaiKX7tzOAHGb6pmRPQXxEcTyTeZclLq3Y62WBsT8U HpxMgrP8h8ynCzxAMUVoVtykjUd5VoOLQOMKW0MQ= Date: Fri, 24 Apr 2020 08:33:05 +0900 From: Masami Hiramatsu To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Linux Kernel Mailing List , stable@vger.kernel.org Subject: Re: [PATCH 3/3] perf-probe: Do not show the skipped events Message-Id: <20200424083305.6bff9456650308ab7a4ab750@kernel.org> In-Reply-To: <20200423140139.GG19437@kernel.org> References: <158763965400.30755.14484569071233923742.stgit@devnote2> <158763968263.30755.12800484151476026340.stgit@devnote2> <20200423140139.GG19437@kernel.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Apr 2020 11:01:39 -0300 Arnaldo Carvalho de Melo wrote: > Em Thu, Apr 23, 2020 at 08:01:22PM +0900, Masami Hiramatsu escreveu: > > When a probe point is expanded to several places (like inlined) and > > if some of them are skipped because of blacklisted or __init function, > > those trace_events has no event name. It must be skipped while showing > > results. > > > > Without this fix, you can see "(null):(null)" on the list, > > =========== > > Ok, you broke the patch in two, I think its better to combine both, ok? No, if an inlined function is embedded in blacklisted areas, it also shows same "(null):(null)" without [2/3]. Reordering the patches is OK, but this is still an independent fix. Thank you, > > - Arnaldo > > > # ./perf probe request_resource > > reserve_setup is out of .text, skip it. > > Added new events: > > (null):(null) (on request_resource) > > probe:request_resource (on request_resource) > > > > You can now use it in all perf tools, such as: > > > > perf record -e probe:request_resource -aR sleep 1 > > > > =========== > > > > With this fix, it is ignored. > > =========== > > # ./perf probe request_resource > > reserve_setup is out of .text, skip it. > > Added new events: > > probe:request_resource (on request_resource) > > > > You can now use it in all perf tools, such as: > > > > perf record -e probe:request_resource -aR sleep 1 > > > > =========== > > > > Fixes: 5a51fcd1f30c ("perf probe: Skip kernel symbols which is out of .text") > > Signed-off-by: Masami Hiramatsu > > Cc: stable@vger.kernel.org > > --- > > tools/perf/builtin-probe.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c > > index 70548df2abb9..6b1507566770 100644 > > --- a/tools/perf/builtin-probe.c > > +++ b/tools/perf/builtin-probe.c > > @@ -364,6 +364,9 @@ static int perf_add_probe_events(struct perf_probe_event *pevs, int npevs) > > > > for (k = 0; k < pev->ntevs; k++) { > > struct probe_trace_event *tev = &pev->tevs[k]; > > + /* Skipped events have no event name */ > > + if (!tev->event) > > + continue; > > > > /* We use tev's name for showing new events */ > > show_perf_probe_event(tev->group, tev->event, pev, > > > > -- > > - Arnaldo -- Masami Hiramatsu