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.4 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 63F11C19F38 for ; Wed, 1 Sep 2021 15:57:53 +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 339FB61075 for ; Wed, 1 Sep 2021 15:57:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 339FB61075 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=gx6r+54EntU4puTTp+en4HEmudjAr4OEOLryhf6RahI=; b=a6Bmg75G3PSlYx yBYs687nCfS4e0p5Na0ZTwYpfHUcRF4NJIMQQ8hsdI+pXcMFH1d2amSLyUuRD6UKXm2ldfCHRJown mEr3YAgmaQ+amkPQldNRYSFutrC1t/ag/I1cyttzCdvESjZQyQGhvkCbUnR5pr/yaV9diH5GWghw2 aVgBSpidQgbvQgC0dMsMa5/wU7BSwpprxFjYNpT4lCom8+6bSHmOygmU5XXPseMifxDHwzZq+c/Ql RkTVUo6f70g9fWVZaxKbr+JYHIEoRFxZYuNn4iiglr9Q/ybXo15EYFJIGy2qIX6RAA3tu/AweRcs2 GmeKiL/XUNcfQX72GkpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLSaK-006Qzn-US; Wed, 01 Sep 2021 15:55:33 +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 1mLSaJ-006Qzd-Dm for linux-arm-kernel@bombadil.infradead.org; Wed, 01 Sep 2021 15:55:31 +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=c2w2I4MqDMbMheIgSaB2a6yd7Od6PCKNJSTHLEZUVvw=; b=mh9aw3/+SacITYMYyVD46BVlUZ mVsI+jywvUhAAU2wUd2YzWM47zNdU9vj4G/8L3J8Bf7LREU/TMQdsNFUvO681tBEGATjf6vid7LBn Vo8rKti4RfJadvjNCfsUwm4IzIo9248XlV/475yZbMA8ZUCzA25ZTHEZ5CAwdLTDw5IRL7iWOOLNV J7tkGGA219D1EFOUt9jZiGVhduTRrINzOHo80VgrSYNWBPUDg1b0hHJb5iTqiESAfsJ963gdeebqV NqTSWNNIWx1y8Hp/Vz0eiUTH2UVLYk6cmFfRnqQGwYYLR5AtmZgqp9KmGav8g9L/8HoKmdH6XDSE/ VvXGxPIw==; Received: from [179.97.37.151] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLSZR-002VVf-Ns for linux-arm-kernel@lists.infradead.org; Wed, 01 Sep 2021 15:54:45 +0000 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-Disposition: inline In-Reply-To: <20210824083615.GF204566@leoy-ThinkPad-X240s> 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel