Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2432199pxy; Tue, 3 Aug 2021 06:26:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKCC6nfinaeDIfYHGj7aj3SiwKrCBi/ISfjolMKbbsH6WJ2FaBMIby9IDk8KkGjC5buPHD X-Received: by 2002:a17:906:dfe8:: with SMTP id lc8mr21217908ejc.347.1627997187708; Tue, 03 Aug 2021 06:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627997187; cv=none; d=google.com; s=arc-20160816; b=xtm0Ysa8uyiuOM57NSYqw2mKFOcjOgyBlWw/TRc5XBupAIBFN155cuZgZwkdwXbyUt tvOW9dO2ffysHaU4FNjacysC23POuMRrY4iEYoOTj3xkaNsT9mPvJcna3jIJHqrtQL1h qxjo7XvCY1qDejoqhBAQK1vML+FnkZ1kWK6/PV6X7VczeYVj2iu6loR7KhOhHR0trAIi IGC7+Lbjv7yVJ3zGSGUvwUS64nG32FOzYukCzLngZuUCbI5jsZ50SfNhoS2uk9StLKXC jlRqH4imb+qk/3F/8MWsNXKm8S+8GvD3bpqbgGvx4G4KW/FngqgbiO2L15BL32sjK3ad LG6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ftCqUjTqzSACfqUwpluu//LlESOSDcrxXvHSfn6+DpE=; b=AsvUTWb6bKzgczDC/BvYYkC+XclTkAnaZ4L235NTvpbXSq6jl1cQiV0W963vaSc2Sr AdHjjWZaV4znfFDXsfnOAN/6ZzH449jCpiEzz7OR7uv5FlWA3xnrsp/oDxuLlMMBP1zN eu89Z8wsDu4QQVwavwJ/pf5flCM/QvuxywHNi/SA8sMIRRyoHbxUHsDUWUplXwE25TeR +98jj9uUVWGAvJNCGLoRkZbMdc7fD1NUZU1nktcokAOYot6Hb+vAt5L59If43wnUShWN vJ/Z5B6gDsTwrA/IAFnLbOJ0SFEhOIswRGKLJJfc+cme0iulyu7NpeIAWRDwJyV5xl0V FX5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oJoyztAa; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si15728855edi.63.2021.08.03.06.26.02; Tue, 03 Aug 2021 06:26:27 -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=k20201202 header.b=oJoyztAa; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236245AbhHCNYY (ORCPT + 99 others); Tue, 3 Aug 2021 09:24:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:35752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236228AbhHCNYX (ORCPT ); Tue, 3 Aug 2021 09:24:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2A4BC60EB9; Tue, 3 Aug 2021 13:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627997052; bh=o3dWD+NtSdOsjF8zTizWlT8Zz2qjfP7d2UK7eV2zcx4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oJoyztAawT1ekxaSi4QoOSf8H2WrU+IKOIlgDS8KtFz3nQ4oUmlWnfqwAcGPOIgRm ixCJbu5S8Xqhh4OAXzLmtnVDiWessoBrsi/L5dQVGv6ki9aYpoPOXy4zSuJA8snbk5 1lLsiIhsj4Ew57bxMAqaPeM+AyyFVYMFZVC3X+9Ajk+W5GErX4ZQhm2Bim2mWdWZdM nhIIz68trv6MAYiVrzQ29JYwY+7/YqP5rQF8L14L3Gd1ITp/PQnA2nN9yuCFvCJX7u 0zC5DlaLeW8MvuXieoV82mrA7aAhyYQx3G1t8tWe8C9UQ8Q3qL0rA5WZYzaHdFYYsC 9dEX8IN7OVnOg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 2F5E9403F2; Tue, 3 Aug 2021 10:24:09 -0300 (-03) Date: Tue, 3 Aug 2021 10:24:09 -0300 From: Arnaldo Carvalho de Melo To: Leo Yan Cc: James Clark , mathieu.poirier@linaro.org, coresight@lists.linaro.org, linux-perf-users@vger.kernel.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> <20210802154145.GC148327@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210802154145.GC148327@leoy-ThinkPad-X240s> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Aug 02, 2021 at 11:41:45PM +0800, Leo Yan escreveu: > On Thu, Jul 29, 2021 at 04:58:05PM +0100, James Clark wrote: > > 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; > > + } > > This is very useful. > > Just one comment: in particularly if the perf fails to find the kernel > symbols, the user needs to enable config "CONFIG_PROC_KCORE=y" or > specify option "-k /path/to/vmlinux". In this case, using 'perf > archive' is not helpful. So I think the UI warning can be imporved > like: > > ui__warning_once("CS ETM Trace: Missing DSO. Use 'perf archive' to export data from the traced system.\n" > " Enable CONFIG_PROC_KCORE or use option '-k /path/to/vmlinux' for kernel symbols\n"); one can also use debuginfod-client, which, as time passes, probably will be the main way of finding DSOs now that we have build-ids in PERF_RECORD_MMAP2 and debuginfod servers such as: export DEBUGINFOD_URLS=https://debuginfod.fedoraproject.org/ https://fedoraproject.org/wiki/Debuginfod > With this improvement, the patch looks good to me: > > Reviewed-by: Leo Yan Does this apply to the other 5 patches in this series? - Arnaldo > > return 0; > > + } > > > > return len; > > } > > -- > > 2.28.0 > > -- - Arnaldo