Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp879633pxb; Wed, 1 Sep 2021 11:58:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfekbCE3hkephoktAwgToCNc+WqAVDKNw/apSMfjmslPQ2iTvJZQo5+aqp6WVSavo0VkCN X-Received: by 2002:a17:906:7d83:: with SMTP id v3mr1052972ejo.216.1630522681984; Wed, 01 Sep 2021 11:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522681; cv=none; d=google.com; s=arc-20160816; b=YyYyDBJZJgNHzzZ+qu1Xfc+lHt5BqU0PnMLQgCsJAyx5bATPyvxA9NYo2JrRAlX7+C LS3jH777FWPwNNtW9te/PFm/8senD0H4SS9ofXLJhgJhWHwNDixY8tLPET3sD4jGkswn +RXbY6ZvB8uGOT9i9SdPXUNIzhOO1aSu+sfF/RN2U/SJnssaHTEyuqZoWmrRl+VNTKFT I6IZW7xy3yg5W87tmJXursSgkIlggqh1Ed6L3/RLa2VSzfm5zTzd34EwNQDwYFxOchd+ cZiRqEnPuUdReMFfGnmXT/8+R1ZIs//aaBj5/YCFi2ZIX17QMmBi2Do6Ej0E1EcDRfzb BWSA== 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=c2w2I4MqDMbMheIgSaB2a6yd7Od6PCKNJSTHLEZUVvw=; b=hqqFF0wZ64I6tP/uFR77Wk8v8XjGXvHngY09uYKxw7cn8SHPEAONBhhmmK3dHz0zfo s9h7Y7drAvnu7zCHZrTa6tT2g/kbpZ3+Xn0ZuZ+ZMg2SZQ3Epbwk81wshN+ypuJIiO9W 5qqC3J5k5TkF76jKfnpP7KPSeFDiXWA8+mHYfFYdI+P+iURx330ZhNXT+ZEdP8UE7NQR aC6wal60CLhb2G3XWdt0f6TcSFnEhNbcGgvuZatXDYDa9u06Kn+lEDzmEmv43/dgfY7q Hy7GPOEQlgWft3SpEWpAw3m3la25sZm/0y+XsQ49B6X8MQHAxXto7aPFEXo0b9bx1iq3 kJeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=thftqGNB; 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 n4si324916edb.423.2021.09.01.11.57.38; Wed, 01 Sep 2021 11:58:01 -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=thftqGNB; 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 S1343916AbhIAPzg (ORCPT + 99 others); Wed, 1 Sep 2021 11:55:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:36878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244935AbhIAPzf (ORCPT ); Wed, 1 Sep 2021 11:55:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E948361075; Wed, 1 Sep 2021 15:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630511678; bh=/4wn19eKOOwryeccB2/BNC/IzR5o0qm/E+ohvyEmRO8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=thftqGNBdiUWbRlW+UIfbUC/d/fD7K17RIGz8nV9JtHqvkNlTokryn3ICyPjretd7 tX2N9rKKEG31ywzbUMEu0PaKaUDpCPnn/IaDqykZ6U3yzclLXuwMUZBtUbaOZhqsuZ t1e7C5rgz8QVAMOwHleg/kxYpfOil1GoINYoI3hInmdMIX7lR8KtA8LLNWI2lvCMcj j1KL0ITY239lrrmEJ0a91F5RYgrGAHSezredDq4BczqxxoB0dlT1bIjv3PJRQ8ltN4 Tc9+tMdZI6k8GomXDrfPf5sPn4vPWD9MMDGMoZy0Ir2x9H729savbajoQjYSPyC2kw A3ASNUHkwPGuw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A2DE24007E; Wed, 1 Sep 2021 12:54:34 -0300 (-03) Date: Wed, 1 Sep 2021 12:54:34 -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, mike.leach@linaro.org, suzuki.poulose@arm.com, John Garry , Will Deacon , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 9/9] perf cs-etm: Show a warning for an unknown magic number Message-ID: References: <20210806134109.1182235-1-james.clark@arm.com> <20210806134109.1182235-10-james.clark@arm.com> <20210824083615.GF204566@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210824083615.GF204566@leoy-ThinkPad-X240s> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Aug 24, 2021 at 04:36:15PM +0800, Leo Yan escreveu: > On Fri, Aug 06, 2021 at 02:41:09PM +0100, James Clark wrote: > > Currently perf reports "Cannot allocate memory" which isn't very helpful > > for a potentially user facing issue. If we add a new magic number in > > the future, perf will be able to report unrecognised magic numbers. > > > > Signed-off-by: James Clark > > Reviewed-by: Leo Yan Applies cleanly to my tree, test building it now, holler if there is something that prevents it from being merged. - Arnaldo > > --- > > tools/perf/util/cs-etm.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > > index 788ad5a099f6..5b276bdb96a6 100644 > > --- a/tools/perf/util/cs-etm.c > > +++ b/tools/perf/util/cs-etm.c > > @@ -2973,6 +2973,11 @@ int cs_etm__process_auxtrace_info(union perf_event *event, > > > > /* ETE shares first part of metadata with ETMv4 */ > > trcidr_idx = CS_ETMV4_TRCTRACEIDR; > > + } else { > > + ui__error("CS ETM Trace: Unrecognised magic number %#"PRIx64". File could be from a newer version of perf.\n", > > + ptr[i]); > > + err = -EINVAL; > > + goto err_free_metadata; > > } > > > > if (!metadata[j]) { > > -- > > 2.28.0 > > -- - Arnaldo