Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2433349pxy; Tue, 3 Aug 2021 06:28:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5aTATjQJ0t7wzkMUuGMZXD5IsWHuThCkAajDJUVI/MB/jPmp2LxDgZuSR9gRLsydcV5Wz X-Received: by 2002:a50:ef0d:: with SMTP id m13mr25398986eds.98.1627997284043; Tue, 03 Aug 2021 06:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627997284; cv=none; d=google.com; s=arc-20160816; b=pdIOcNBZihQZ7hmeLthl7iKFVbkswk8I1r4BjRgjEgsASPwwNNAG7K8XTVPs0/hbq1 ipUeijphDhzcmwD/CqDOkrSHp/qceZOWkZRVTfIcGJ4gEreipVuUeATUO4m5+tlM19DE 8W2kYd9w22VeTWP9M28OhPyi4plmUlrVtHs0j7lmNNj9Lj57myhW7kRT52bF/5ALssyt YIDpMLTGEIdcDSF+ZysGZDvCd8wPkgtOGu+hKXQ5jzugUEJ1GbC/g99iZO2pTKjzfMWa U6/Qo/I6mJEOJU2aHzo21UyFaSALP3/2uoXAhIVUDC7OO8Dt4W4wilpou/eZkIXbxCDH jVPQ== 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=EkH1ydZLiUxC1K/DvYw7qyt81sQTeic+RHJevpwQIr4=; b=tlvfc4/KtXVrS5/eHC9IQbnMNd/8bECvCm3pHJ2WQmnSeYlIonaXWJY9oi9hH7OYne rOPEozPGaYz3DcHkcuUzvj10i1IENL40SPIW9ckR8d3jm5Hwk/FtMqSapL0blwzz08E4 tids/auuHRRHy0CWBNoZ+OaPGVQTn6FvAyGZv8O+/zXY6d94kBMspaL9vLLgkzeuDiXZ Zd51Ddol8Aunupwl08+VLuIoQpmefE+hw51YfSSCJLfKPQKjsHzOLBGGm6kcbikTuH+k lZKWXASNI18RRveXpDhMOMYHAR0EauqNG8R+Tnww53Zq+zRqduuikw8Qzz0yLifnzNZ7 bqxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mLrIqT8Z; 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 pj24si8522880ejb.143.2021.08.03.06.27.39; Tue, 03 Aug 2021 06:28:04 -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=mLrIqT8Z; 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 S236313AbhHCNZz (ORCPT + 99 others); Tue, 3 Aug 2021 09:25:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:35972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236257AbhHCNZy (ORCPT ); Tue, 3 Aug 2021 09:25:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5190260724; Tue, 3 Aug 2021 13:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627997143; bh=DBOV+sLiodjz3XvPMCJ9WYSqkgPQ9eyjU6qlmV9sTnk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mLrIqT8ZSitrWbItGqotK8VV4e7xnJcRWjHrWbOpRdfAw7cX/fbVc3sfzvDydHBSZ kCvXnidOB66jp12gzN83usgAsim1dDd0yID9S+bEyOQHSmymGJ/u77J+0dy79woVTQ ye6xytHFABNP0OJJDka1z9HcJgmXDKK9eKq4iF7B1rLkZDD9Lxrb2gZd6MSPfbfRo9 FLJs7Xay/uR8u19qeHNBxfyGTMrXt08wuDa0TkvCrp3fbPlaMyBc1wt8OLhJlGBw6o qkHpAB+o0uecU6Y6MhzT2rdrTAC0wPlTI86eTQ7MvjU4Bb5+VLVgc6xHit8ZpK+6Se 0R5Qdc4QdH3Vw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 0593F403F2; Tue, 3 Aug 2021 10:25:40 -0300 (-03) Date: Tue, 3 Aug 2021 10:25:39 -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 5/6] perf cs-etm: Improve Coresight zero timestamp warning Message-ID: References: <20210729155805.2830-1-james.clark@arm.com> <20210729155805.2830-6-james.clark@arm.com> <20210802151710.GB148327@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210802151710.GB148327@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:17:10PM +0800, Leo Yan escreveu: > On Thu, Jul 29, 2021 at 04:58:04PM +0100, James Clark wrote: > > Only show the warning if the user hasn't already set timeless mode and > > improve the text because there was ambiguity around the meaning of '...' > > > > Change the warning to a UI warning instead of printing straight to > > stderr because this corrupts the UI when perf report TUI is used. The UI > > warning function also handles printing to stderr when in perf script > > mode. > > > > Suggested-by: Leo Yan > > Signed-off-by: James Clark > > Reviewed-by: Leo Yan Thanks, applied. - Arnaldo > > --- > > tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > > index 3e1a05bc82cc..5084bd2ca6eb 100644 > > --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > > +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > > @@ -324,8 +324,11 @@ cs_etm_decoder__do_hard_timestamp(struct cs_etm_queue *etmq, > > * underflow. > > */ > > packet_queue->cs_timestamp = 0; > > - WARN_ONCE(true, "Zero Coresight timestamp found at Idx:%" OCSD_TRC_IDX_STR > > - ". Decoding may be improved with --itrace=Z...\n", indx); > > + if (!cs_etm__etmq_is_timeless(etmq)) > > + pr_warning_once("Zero Coresight timestamp found at Idx:%" OCSD_TRC_IDX_STR > > + ". Decoding may be improved by prepending 'Z' to your current --itrace arguments.\n", > > + indx); > > + > > } else if (packet_queue->instr_count > elem->timestamp) { > > /* > > * Sanity check that the elem->timestamp - packet_queue->instr_count would not > > -- > > 2.28.0 > > -- - Arnaldo