Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp995053ybt; Fri, 19 Jun 2020 20:58:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuRCrgIi+/E19U4yz9aBf6bJVjo5XHEKkBoCBnEsJmA99H8NijK7JhtJlvu5wztjL4adw/ X-Received: by 2002:a17:906:ae85:: with SMTP id md5mr6465264ejb.213.1592625514953; Fri, 19 Jun 2020 20:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592625514; cv=none; d=google.com; s=arc-20160816; b=XAnpendSlzY679XRMlugmFJ4zssdK9N6IPoIF0i3dISi6E4K9B3DZ1+bbclAluCBEg hYE6RpzpSOJsZgBLtJhczhb8WBwCtX1VATW3IjdQBfEDBAxx+2jEldqUNWFsYwHvEo7B JAUDmusu/aDomlE09Sr9/tpRaaSSFvEPU707Quwe3xKWoxpaoAc0C3C3gETmo3SixVGI qb7ycdbylmqG7ycqCwndrjFyxkldzK6ACzbxiGRhqli8g7yLEUfE2xPvOuGxxwX6tZrs nARtg7JPtINV655dCyRiFva0RdtxxkNHRmYj6hCHIGF19/H+MbsOdKnBwR9+5lq3S5ey Qljw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U1pDAZ1B2uOWPnrUaMdwHIr58n8RH8MfOQsc6lVVveM=; b=LbjeFwLiPugK4ijN78TNNs4RA/L38iGeHcNgZtV43IKzLiFKZyOCoPpCKW8ER4i6LY 4LeCgvf9x9dRjH+CxjsKXUE7Ch0J4kAi7a6u4us2vwhq0CrB9/Purw1J3emTQpH1sABq Q7OT32+RUcqVzV+IB/kAOWNJawatPKtEToHxnfps4NgNpltRK/qXm6qHjl75zy/luAQ0 LHmyNDGNXlzpLdm+V6g1MNGozgPM+/1fCULEVXGGXj8vDgCt/cUtOoRrFCChxWE/TwqJ twbggHcUP4QEjNcjzUh9u5SoFvQmGCU8VbGp/XsWd3FUXhqrQDwA08AJlNPN2DXpEDXI 2VHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ttUXntdE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do5si6941185ejc.105.2020.06.19.20.58.13; Fri, 19 Jun 2020 20:58:34 -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=ttUXntdE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395036AbgFSQbZ (ORCPT + 99 others); Fri, 19 Jun 2020 12:31:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:47158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389644AbgFSOw5 (ORCPT ); Fri, 19 Jun 2020 10:52:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 4308D21852; Fri, 19 Jun 2020 14:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578376; bh=VWd75qwe8Tw9/e6o2TotNGK1ySb4QoeLd+Hl9mcG2XU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ttUXntdEou9tAShuWaVZBILzqfJV2gg0clGASBFtx0jTrJmeCoXEv5mwsooOgA+lI 3cDXblgnKnahLLpStyAQS6NnWv9KUxcjxYhr1U3RYhjWNakq0xpwjJf8Z8kPKZ3/Yo XBRg36+fJquToiGJ63kIPiLjeO5YnXwoMlubAJK4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masami Hiramatsu , Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim Subject: [PATCH 4.14 188/190] perf probe: Do not show the skipped events Date: Fri, 19 Jun 2020 16:33:53 +0200 Message-Id: <20200619141643.253762879@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141633.446429600@linuxfoundation.org> References: <20200619141633.446429600@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masami Hiramatsu commit f41ebe9defacddeae96a872a33f0f22ced0bfcef upstream. 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, # ./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 Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/158763968263.30755.12800484151476026340.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/builtin-probe.c | 3 +++ 1 file changed, 3 insertions(+) --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -377,6 +377,9 @@ static int perf_add_probe_events(struct 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,