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=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 7BBCAC432BE for ; Mon, 2 Aug 2021 14:52:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62BAE60F9E for ; Mon, 2 Aug 2021 14:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234319AbhHBOwL (ORCPT ); Mon, 2 Aug 2021 10:52:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:51908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233925AbhHBOwK (ORCPT ); Mon, 2 Aug 2021 10:52:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0B45E60F70; Mon, 2 Aug 2021 14:52:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627915921; bh=6t51VO9yCjRtkFGlvwCg/xuFX5HR4ZRg5q15g2jcCKw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jmhwzY2WNEivRJ2JEN0fyJxqDv4j+d2EC8B19QZN6u1vj/o5cL1KVY+/HS5LSB3fd wugLh1HC71glvGjuOume0HoTAuLyjVY7NdXuGdF9j9QwQ/nv1AN6VCcOYVbyJA8XVj obDBnCoxyjunn6wW4x8hF46W1nCKS24P7slC+tWX2KIs4Ipb28wNo1n5ekta+kqKeR Fd9Si5v+IfIhfEdFeexGYx6WjPIDvhgZt1BIxb33mBo1c/knqyOG4CmeGkuyQ8h3Ij nKmIupR9JD7kDUOve/1Tg8f0zmu4heC4rpzDhkyv6VPr56tcFvQOyxrnNISkuup51J +GnbaITXO1IIQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 80BA1403F2; Mon, 2 Aug 2021 11:51:58 -0300 (-03) Date: Mon, 2 Aug 2021 11:51:58 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: mathieu.poirier@linaro.org, coresight@lists.linaro.org, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 6/6] perf cs-etm: Add warnings for missing DSOs Message-ID: References: <20210729155805.2830-1-james.clark@arm.com> <20210729155805.2830-7-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210729155805.2830-7-james.clark@arm.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 29, 2021 at 04:58:05PM +0100, James Clark escreveu: > Currently decode will silently fail if no binary data is available for > the decode. This is made worse if only partial data is available because > the decode will appear to work, but any trace from that missing DSO will > silently not be generated. > > Add a UI popup once if there is any data missing, and then warn in the > bottom left for each individual DSO that's missing. Looks ok to me (the last 3 patches in this series, the rest I applied already), can I get some Acked-by/Reviewed-by from the CoreSight people? Thanks, - Arnaldo > Signed-off-by: James Clark > --- > tools/perf/util/cs-etm.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > index 32ad92d3e454..e6851260d059 100644 > --- a/tools/perf/util/cs-etm.c > +++ b/tools/perf/util/cs-etm.c > @@ -746,8 +746,16 @@ static u32 cs_etm__mem_access(struct cs_etm_queue *etmq, u8 trace_chan_id, > > len = dso__data_read_offset(al.map->dso, machine, offset, buffer, size); > > - if (len <= 0) > + if (len <= 0) { > + ui__warning_once("CS ETM Trace: Missing DSO. Use 'perf archive' to export data from the traced system.\n"); > + if (!al.map->dso->auxtrace_warned) { > + pr_err("CS ETM Trace: Debug data not found for address %#"PRIx64" in %s\n", > + address, > + al.map->dso->long_name ? al.map->dso->long_name : "Unknown"); > + al.map->dso->auxtrace_warned = true; > + } > return 0; > + } > > return len; > } > -- > 2.28.0 > -- - Arnaldo 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=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 7BE60C4338F for ; Mon, 2 Aug 2021 14:55:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D04460FC1 for ; Mon, 2 Aug 2021 14:55:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4D04460FC1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/PC2/fhB4Zg/HwHMObj+Y4FIT2tBtv0tscx+ChIdoCM=; b=qORP2ois/gUzpJ uLjcPmCLLtnbsYc89Z3b+ojkKcSJZbOo4UIv+ec1BMKlk9aH/x0T9gj+Qia5buv5Fv0ihh2e+0KYH gmozhlmpt8YgSWeY9ckStAIf+GFiv203WPN3rIYXCTSp/sh3Z5XZzhPoy0wERKFYMtGoHalxv1C8q Byl0RXgymkwoD7zQODgra5P51ZBYOhzo5gC1w9QT5heBfy99dE5QyJ7e97WuefWX4w+LXKapCP5qe Yq6UNksvM1NoRslkTZ8lFwrA3cPVaiGaf7VrniIr9RSTCMvoquyAJ2Og2U6/a9avDPWpQ4a0/3cad rlGlyKxEh+BxB8r0NWOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAZJX-00GlOO-To; Mon, 02 Aug 2021 14:53:12 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAZJR-00GlNQ-UE for linux-arm-kernel@bombadil.infradead.org; Mon, 02 Aug 2021 14:53:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=msgQ0dr4COZUxnmKLhaNysMP/nNJRDXg26KLyXEl2fY=; b=efIq4oUflJbazX2qOpOSOxK4o3 xLm9NqLOm0c6m9hN0cozFOMEJJLAttGEzp6/r0TMER9BhMfbEgsetptynuTrIQmvpML9rNYGSel6x QNIOJnblsRHiWBZ4/IitlwtqFHNvKHRLIZr5CeU5HW73oDVhv5di9g6UaAtMFPtmRW31cyeg4U6eL 6dxk5YGYJMRyK9YA5qJq977eIVJTcVkfpAyNkphlVgqYES5DVJwz9hO/hxAm/lPcWSPT1YRbshU9z P3gOoorCAag5JHhw01RcXM5UlwuuQJnfrZvGJhdl/nqucdL3731hkKbY+Nz7FLy63dPI+uqA4lgx3 Xvi917eA==; Received: from [177.35.17.230] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAZIP-003aJw-AG for linux-arm-kernel@lists.infradead.org; Mon, 02 Aug 2021 14:52:29 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 80BA1403F2; Mon, 2 Aug 2021 11:51:58 -0300 (-03) Date: Mon, 2 Aug 2021 11:51:58 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: mathieu.poirier@linaro.org, coresight@lists.linaro.org, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 6/6] perf cs-etm: Add warnings for missing DSOs Message-ID: References: <20210729155805.2830-1-james.clark@arm.com> <20210729155805.2830-7-james.clark@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210729155805.2830-7-james.clark@arm.com> X-Url: http://acmel.wordpress.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Thu, Jul 29, 2021 at 04:58:05PM +0100, James Clark escreveu: > Currently decode will silently fail if no binary data is available for > the decode. This is made worse if only partial data is available because > the decode will appear to work, but any trace from that missing DSO will > silently not be generated. > > Add a UI popup once if there is any data missing, and then warn in the > bottom left for each individual DSO that's missing. Looks ok to me (the last 3 patches in this series, the rest I applied already), can I get some Acked-by/Reviewed-by from the CoreSight people? Thanks, - Arnaldo > Signed-off-by: James Clark > --- > tools/perf/util/cs-etm.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > index 32ad92d3e454..e6851260d059 100644 > --- a/tools/perf/util/cs-etm.c > +++ b/tools/perf/util/cs-etm.c > @@ -746,8 +746,16 @@ static u32 cs_etm__mem_access(struct cs_etm_queue *etmq, u8 trace_chan_id, > > len = dso__data_read_offset(al.map->dso, machine, offset, buffer, size); > > - if (len <= 0) > + if (len <= 0) { > + ui__warning_once("CS ETM Trace: Missing DSO. Use 'perf archive' to export data from the traced system.\n"); > + if (!al.map->dso->auxtrace_warned) { > + pr_err("CS ETM Trace: Debug data not found for address %#"PRIx64" in %s\n", > + address, > + al.map->dso->long_name ? al.map->dso->long_name : "Unknown"); > + al.map->dso->auxtrace_warned = true; > + } > return 0; > + } > > return len; > } > -- > 2.28.0 > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel