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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 88F3BC4338F for ; Tue, 3 Aug 2021 08:07:52 +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 5711860F11 for ; Tue, 3 Aug 2021 08:07:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5711860F11 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W5ghq9F9dbxPpSiLNEj/55T16HysdabxcGbDT7hOq/4=; b=Ej3b/SZZ5S79Kh YHHF3sjJxBE+f6vsBX1XddiyBHRR1SV92ObGJ0J5SYLvwhbrgOoxEjfVwohUA3FVDEhjwtPtJbKFS 9D9r2krJDLgUehTNGskWsCUATshbU8MJ/A975l7+QbpPpUhQ8FGSK89LvtZSw0yZzU8+427QqTZk6 B35KmtCmiS6xwfkSZyKV09XdRjJU4KOO1+BZ/DsSzlaXG2xh/5DqSEaBdEj100IhvAUKwaQRXrdRv xWXw9GmrsMJl8GtU0mhcH2Fj/9HN4cWfRg26EIEHprTTuxtNNmYD6ZprGv/uenEzqZEQQ0LUYRhiq sdZsU2+hZYuGwSKWuzHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mApRb-001YRw-DW; Tue, 03 Aug 2021 08:06:35 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mApRW-001YQa-M0 for linux-arm-kernel@lists.infradead.org; Tue, 03 Aug 2021 08:06:32 +0000 Received: by mail-wr1-x433.google.com with SMTP id n12so24305176wrr.2 for ; Tue, 03 Aug 2021 01:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iPbQVJkJzSXcaXx9HbEOsAieS9ipsFl/K2G+c6GXkNI=; b=NLhiIT5ZqvIp6hesu5f82dogfMtWpOiJTml48Z7xZMQKMJIMqzXTFQNS+MfS0bsZBQ TKP2ykFdeWmIHne9ufVz2KNi8RnrbaCA5CbIunIFErf91SCM6IEkk4BxYXQQ5UKajW/8 Mh/+SsI1O5U6acCO2Z/3Vzc4ABLCiAztlJ/wf/aXZ4h9BjAR8SuOT2QN/bbf1LZXCXsD Vy+Dq0PiXbIgxnONTTVSIXgXr+MngMY2BP/W4EoCVpWxse9shAdQT4P2+3Hb/70SHdOs ByTmigwGDH9nyJu0rHgC83ifszmgJHWUeYA7bioBHNYwS0hBgyxyc5fqQPC6j5LF3UHG 7yzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iPbQVJkJzSXcaXx9HbEOsAieS9ipsFl/K2G+c6GXkNI=; b=kbO1rTVtoH9VWjohgiOqUoRgc2WZExkNJuAS/MgWnTX4ccx1u4EQCWXseTV4sR5Icd a2XKmINUU7RXUIICfnl4kekZAhvfO51wrkqCOTDkMCUaDI/5vJVLWJ7zO2c0LoSnDseX GIuyJ8yy9NAKTZRpU/EVwlAj833k+rBWbHp9UX6ISjAxrHK6InsPhEErLMeljKUxfppk vBYlYlMU+0RTeuf5U7n0li4smS6JcIgjwnP6hOh11BXBN+K6autnwbJo39yqQx7q4PRP 93KRZoKb0mGux5aYdVHMnF2It5/gZ/Ysz2UirKQadv/Y5aR6D+t4LHtwCEfGcHEC82qh yoEQ== X-Gm-Message-State: AOAM531khUi9MlOZOZiQB/69YrG0EKGAQJButt/TwYCPoVwMDKLBi0Z5 Qrik28nRO3w6CwBELm6cNVeOAmBNn4B8ev+4VEpIOw== X-Google-Smtp-Source: ABdhPJyN4PO+BxU1EjejPtiIX6WBg4h+HCVRraj7kpE7SS4FXwATcvwBaJlFjf7LHdc6rMAy6B3va9ZQhTFEcr8JpBY= X-Received: by 2002:a5d:4a4f:: with SMTP id v15mr20967610wrs.178.1627977988620; Tue, 03 Aug 2021 01:06:28 -0700 (PDT) MIME-Version: 1.0 References: <20210729155805.2830-1-james.clark@arm.com> <20210729155805.2830-7-james.clark@arm.com> <20210802170307.GA3050918@p14s> In-Reply-To: <20210802170307.GA3050918@p14s> From: Mike Leach Date: Tue, 3 Aug 2021 09:06:17 +0100 Message-ID: Subject: Re: [RFC PATCH 6/6] perf cs-etm: Add warnings for missing DSOs To: Mathieu Poirier Cc: Arnaldo Carvalho de Melo , James Clark , Coresight ML , linux-perf-users@vger.kernel.org, Leo Yan , "Suzuki K. Poulose" , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , Linux Kernel Mailing List , linux-arm-kernel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210803_010630_782667_E6C46211 X-CRM114-Status: GOOD ( 33.54 ) 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 HI James, On Mon, 2 Aug 2021 at 18:03, Mathieu Poirier wrote: > > On Mon, Aug 02, 2021 at 11:51:58AM -0300, Arnaldo Carvalho de Melo wrote: > > 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. > > > The decoder actually outputs a OCSD_GEN_TRC_ELEM_ADDR_NACC packet if binary memory data is missing. These packets are currently ignored by perf / cs-etm-decoder.c. I think this per DSO warning is fine, but perhaps at some point add in handling for OCSD_GEN_TRC_ELEM_ADDR_NACC - which perhaps is only active when dumping trace packets. Regards Mike > > > 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? > > > > I have a substantial backlog of patches to go through and I will be away for the > next two weeks. As such it will be some time before I get to review this set. > > Regards, > Mathieu > > > 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 -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel