Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6219274pxv; Thu, 29 Jul 2021 09:07:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwhtP7C8U1ZvANfhkjcgueDL9oSxZqjcCLY+byB9Gypfz1zXdUvsgKg1lBXYf/IUJTFlF9 X-Received: by 2002:a05:6402:111a:: with SMTP id u26mr6732660edv.260.1627574879380; Thu, 29 Jul 2021 09:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627574879; cv=none; d=google.com; s=arc-20160816; b=03eziZ3hxQ1mJsIFevZnCC9uhUtNgd0jXbV1YfPi2f8id+NqyotdRzdjj23BiajH9g HOIwjKF7TSSLt1Ul3ahJG9AkMQ3y6YFXDOAb1ZSFdcpLRo7UGEfjE5bQC9kIrnO+VjeA 62vYVO0xvLHRgIXyyUPa3odsmuSNGAqcLGIZEAlIyrWdt6QW8IV3jMiMD8eJ1xQVGPr4 pK2fjV0Scy9yLBI+fkWaN5X8Dl85PLEDoOZn7asm9q+/zQKg8H/XwiVjx2GhJKSNkKd1 VQLPGM12qp/705CMZdTZgqCaOIhkoB4wWv2Yx6wM3mmZYGjpaU/a1LVLSejmQD2muG/h bp8w== 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=5K+Ju4Ylc6OZILTRd2Aj+UyIkoIjY1uGyRvWvxcIOP4=; b=qrm9gR/CHjSiAaCbGov1wwkb4w08DWV6iVQ9g7XPb+kq3p+IwfTcNfCLu7w7b0AQR8 6nmjd4pE2UsZbwx68pQu74rA//Bp4QgxEmeXZsoOFrHRgjFhZudZX+/I3b3YVOYmG491 +bPYfQ3Yyf5P09u5O0fcBhDZ7wAoA4YhKdW+joZGfDKMzda2tubQzZza1qlrOD/ocq41 CSV8K79no7epCFm/FlVpfk9SAmmAm/aPxaS5ux1QP6yy6X+hGExOnIWhndxVvo/FY5bp IOU+R4r3SL1yM4iv3kzt39kLSTJW1P0b4T+2gtN/Fy1pjYfn+uNdT354dKCp2MlsDMCC OotA== 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 mm29si3107686ejb.380.2021.07.29.09.07.15; Thu, 29 Jul 2021 09:07:59 -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 S231522AbhG2QBQ (ORCPT + 99 others); Thu, 29 Jul 2021 12:01:16 -0400 Received: from foss.arm.com ([217.140.110.172]:51444 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238455AbhG2P7T (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 4530E113E; Thu, 29 Jul 2021 08:59:01 -0700 (PDT) Received: from e121896.arm.com (unknown [10.57.40.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E0EB63F73D; Thu, 29 Jul 2021 08:58:58 -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 5/6] perf cs-etm: Improve Coresight zero timestamp warning Date: Thu, 29 Jul 2021 16:58:04 +0100 Message-Id: <20210729155805.2830-6-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 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 --- 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