Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6215418pxv; Thu, 29 Jul 2021 09:03:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/bfHwrFWZJ0+JVzVi/2KnIFHoSzGLcikB4Sd4500Ft1SEd0/+Fpr5CVsdmfL5nh6JOy1g X-Received: by 2002:a05:6402:5:: with SMTP id d5mr6662353edu.359.1627574618935; Thu, 29 Jul 2021 09:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627574618; cv=none; d=google.com; s=arc-20160816; b=KBY367C4liBbNIf51dcMSCT4j8mcr+wipptWggJejM6jfWWwV8pKyKM5Yn98J5by/N T0oD5RBzzLVsv3HhFf9GiZQRP07SFCSEaf0603k9TdB7RWOFR7EpiVkyEJbpU7nPPWJQ V32nwA9ID9TcVXEjkwOWECCPnFjHq2YRUAlFjyJYjYLCJPLUnOZ0idBKkBsQv70uqKmP TK5jJHFB3W2DfKAyxWFgMkkfo+i/Ss6RpwqjRAdjgPGtnvCl4vUAL6PJ8TsuQt7dgTuj rIyalbjqv2yMlSsRPr5dB7+ZFNGAY77rvcOBR3MK/rmjikiegTTFbseU8581QKjrUfxs gYgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Z2gm08iwYPid2of6FXXbitHVLsImJAAri4mdkfmy76o=; b=kfhoF6SA6x766PDyHvqa8FLQYXL+3Nc0K5opFKdrR0ImJEaoxJD7cclc3lGb/yPt32 4O405SJsVWrmxRv+XbShfPa5YbcGeWjId4suLlmP3niX8Xy6R+l7Ou7C3noKo2oRhPIp EfzCdtoZMfCWADwTVvyna6c0bn2thDl0A9N4WhVXHYJoLu7HsXGx5IqS7yqc8wArLmxZ zQpBm3wTDdb3rBHryv1CkdX0zJTTcRq3b+m1yiVk5kn7+HGl/NHyvgTxNtXBYloRJtCX mqUQcpVSW9DtQHTO+AmeXT2q7UvrKyzVMn7IFh0oXznddheQC0vcoPqS5A1XvirYuXoS AerA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e22si3133202edq.549.2021.07.29.09.03.14; Thu, 29 Jul 2021 09:03:38 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234022AbhG2QBG (ORCPT + 99 others); Thu, 29 Jul 2021 12:01:06 -0400 Received: from foss.arm.com ([217.140.110.172]:51442 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238454AbhG2P7T (ORCPT ); Thu, 29 Jul 2021 11:59:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8A08911D4; Thu, 29 Jul 2021 08:59:04 -0700 (PDT) Received: from e121896.arm.com (unknown [10.57.40.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 30FA73F73D; Thu, 29 Jul 2021 08:59:02 -0700 (PDT) From: James Clark To: acme@kernel.org, mathieu.poirier@linaro.org, coresight@lists.linaro.org, linux-perf-users@vger.kernel.org Cc: leo.yan@linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, James Clark , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 6/6] perf cs-etm: Add warnings for missing DSOs Date: Thu, 29 Jul 2021 16:58:05 +0100 Message-Id: <20210729155805.2830-7-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210729155805.2830-1-james.clark@arm.com> References: <20210729155805.2830-1-james.clark@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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