Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp998036ybt; Fri, 19 Jun 2020 21:04:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyQoanUTJM//WBaKSJXxYetkXakde1sblsj8mrgLZxIW5M+AAcKS/JYwX0f5m1HVIH5cWt X-Received: by 2002:a17:906:cd05:: with SMTP id oz5mr6846101ejb.335.1592625876909; Fri, 19 Jun 2020 21:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592625876; cv=none; d=google.com; s=arc-20160816; b=BM+Lfp5gib6qZkpeTK7g+FT4rwYDRX7zUqcH/cQk3M8WcDDkZzCY7gN1T/zu1NKsJM fUD+fWeongvxSUSYjN6Dnu5XvH47fdVxQymLq00huFvcsU8gCsEXedDJuEe5O0VmKZxz sOOAoJH8dhet0Ps5cPXnCwBC1cNaRUTmeBqpzaQ5e1Q1LPbbge86m5jGuFMGqamd1VBc 81p/EVfkzrmtPBbbRIMb0KwpxE/UOAVn7JwRV3A5wv1JYEAdQxLDg87lrfcucfB9gjGl PGzFhgZRIe2rgA/TgKuruF7jaH6oKSsOisw7EDrt0gfb0u9b5ECj29lmRxYwW8DogZbc 9DTg== 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=9b21QfIT+KNTTjR5Y5Z2sM7keUWBNIyxBUJ3JlW4kX0=; b=EfbeO+Z3tnwfl6C/bRtSc0vdc8Tak3YE45+9R5vfIJ1HYbSosQ9Q6ykUoB3bgdWEjW wyrctuPyfAvzzs26bcdWqhxYJXDexXPwkbe12m8LddWnJ6J3VQv0C3cT12fZ+qDhU3Pl 3BrTJJNr8S2quu2YBKK7t6ZDKb1zxWC1AXDES58Kz2etgfBtCJEdjnocKSyGeWAKeApD PbDFclnyPQzwuuJI72Vb3/FDphklhPmqoNoZGl7/AjMLLO5Woduxa2JjGli5bCQI5JvN mOwnK5oSXPHYvXYm825BLG6TN/6AZ40bHM2MRv2eBCtiGbfPMhK2H8XxpNs9ezjubr60 H9lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fFuccyTx; 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 gj15si4865482ejb.622.2020.06.19.21.04.14; Fri, 19 Jun 2020 21:04:36 -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=fFuccyTx; 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 S2395106AbgFSQlm (ORCPT + 99 others); Fri, 19 Jun 2020 12:41:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:36314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388623AbgFSOo7 (ORCPT ); Fri, 19 Jun 2020 10:44:59 -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 B1F2F21582; Fri, 19 Jun 2020 14:44:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592577899; bh=1EGo6dp6P7Euax+ODdE7aQKekr9Q2moweFFFDU2X0gE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fFuccyTxl4TZzaqqrdjtCZjflwW0tp65n5eDAvJz2tNROZBs97utBkiIzcFq6gphS Vqy4duSA+vbP1TMIOA7OB/VSs52xd1elXTXaJfQYBBgj9rlQSiffitDWfuQr9SJjeu /L9oFAqppygA/UufqsCwzyIOxzLXC/p8PVbVaD5Y= 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.9 127/128] perf probe: Do not show the skipped events Date: Fri, 19 Jun 2020 16:33:41 +0200 Message-Id: <20200619141626.787465057@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141620.148019466@linuxfoundation.org> References: <20200619141620.148019466@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 @@ -344,6 +344,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,