Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2422957rdf; Mon, 6 Nov 2023 13:53:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvBN2pX8UB1wWl/LH/vemfUI5bq4LuvyxuPnK8xDOpuDQXbxjYmBDbmmJ7Q6SKZ274yw/c X-Received: by 2002:a05:6a21:4995:b0:180:e069:57fd with SMTP id ax21-20020a056a21499500b00180e06957fdmr18650547pzc.36.1699307588039; Mon, 06 Nov 2023 13:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699307588; cv=none; d=google.com; s=arc-20160816; b=AAlNVGMgXmyu9soYg1UDLLLbE75TFkg97DaaPLixsGaUZARTk2sKwlF88LU1kOAhp8 c4stChvFQQa1a+NmpJPcLujFYniuCP7eQ5wL0pLSZaLzNDR8iPG3jZfBVYUwvboKtf2D y1XRM6e2UjmWFT1PaEiAhHJwIf6SJNd8D1/nw0/u9Jt35leEqmmq695yNwp810saJWMp lrVsTbYw9zBms90p1JWYZk6u6Ie5XNTBo85KCI8ZK8G3y92cWahRjLlzaBWOk5uomGO7 gdw/Y/wFe9LSKGWAIJTkx8gbRruqo22YV9RnGZMv6HK6gTDRpcXlm0x7TVcWeDEDmljz wMsg== 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=+ROEliEPLuuyHYIUsWLzzGOkt6vgw9XZKzovkAm36lE=; fh=SSAYs08sRl1TjIiLbFl5iTILsTgj2FxtphgW0UyZmWQ=; b=IoZje6UfHMcw+RXj4DtmVlHoFOZZXNc4Q1pIjNVa2nEfiklJXjNmtioe1bCCXswiOW NopD4yBpzya5OMIKivChr8lHshlCaEFgaS078eAUc5XtzWacXvJvoLS6FRms690oBopf abMsmtSYm+NIpKnVdd3euq8zQsMU1++b+a62gsl8BOk5cGXl987uu77YJ9IKVa5z+sG7 jHgWHvlC5l8Z+NPX0EsNArUqsyfW9f8GacHqFu5LNptOtL8LyU6fw+/YsoJZ08ONQ4fr /7gLNRZ6GTj1VSHrincbeTA5j+H0iLiR7vVfUNhqyji3XJQ7AKVYBIaj6Bipih35fcKX fcwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GJylrAxp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c10-20020a056a000aca00b006bd2e896465si8947030pfl.199.2023.11.06.13.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 13:53:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GJylrAxp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5A519803207A; Mon, 6 Nov 2023 13:53:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233132AbjKFVw6 (ORCPT + 99 others); Mon, 6 Nov 2023 16:52:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233201AbjKFVw5 (ORCPT ); Mon, 6 Nov 2023 16:52:57 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66B0510C6 for ; Mon, 6 Nov 2023 13:52:54 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C771FC433C8; Mon, 6 Nov 2023 21:52:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699307574; bh=PsotStaK9ZAaZtI+skUP3rL8VxWaOePc9RUMFsnrGS4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GJylrAxpy0sU4J8JhAemtAOyYhOTnWa2/iAUE2uovc3xI/eZpmi4pD0YZAcjvGiTt 5ClRpcsbZgJpDzH2RVPWe8ETq70HjvLBBZur/saSsxSiBjHRvBQ6SCUttOnpz1uKD+ NH2zkmeXusQPH8z+c4nUdNJ/h72XjBUdQZd3vk0StWadNwNnMjEN/yls2WldcDWDsX tX7+SEWoqmQS4/jtDBkCKRnbU6mCbmTXsyqf5ezbApx9hHkNwBi8rtEOuEDbNyNeXd UXI5LzpNKObwj7/4tyuGIVcgtfKEdxgV/LohsXcl0KRiv9fTa9IaZOVSxqYObkOESC iv5DdmuOlkUCw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 269264035D; Mon, 6 Nov 2023 18:52:51 -0300 (-03) Date: Mon, 6 Nov 2023 18:52:51 -0300 From: Arnaldo Carvalho de Melo To: Adrian Hunter Cc: Leo Yan , James Clark , Suzuki K Poulose , Mike Leach , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] perf auxtrace: Add 'T' itrace option for timestamp trace Message-ID: References: <20231014074513.1668000-1-leo.yan@linaro.org> <20231014074513.1668000-2-leo.yan@linaro.org> <8a2ea58f-f835-4d1a-8bd6-3a63b3b0db94@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8a2ea58f-f835-4d1a-8bd6-3a63b3b0db94@intel.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 13:53:05 -0800 (PST) Em Thu, Oct 19, 2023 at 01:47:15PM +0300, Adrian Hunter escreveu: > On 14/10/23 10:45, Leo Yan wrote: > > An AUX trace can contain timestamp, but in some situations, the hardware > > trace module (e.g. Arm CoreSight) cannot decide the traced timestamp is > > the same source with CPU's time, thus the decoder can not use the > > timestamp trace for samples. > > > > This patch introduces 'T' itrace option. If users know the platforms > > "If users know" <- how would users know? Could the kernel > or tools also figure it out? Adrian, I'm trying to go all the outstanding patches, do you still have any issues with this series? - Arnaldo > > they are working on have the same time counter with CPUs, users can > > use this new option to tell a decoder for using timestamp trace as > > kernel time. > > > > Signed-off-by: Leo Yan > > --- > > tools/perf/Documentation/itrace.txt | 1 + > > tools/perf/util/auxtrace.c | 3 +++ > > tools/perf/util/auxtrace.h | 3 +++ > > 3 files changed, 7 insertions(+) > > > > diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt > > index a97f95825b14..19cc179be9a7 100644 > > --- a/tools/perf/Documentation/itrace.txt > > +++ b/tools/perf/Documentation/itrace.txt > > @@ -25,6 +25,7 @@ > > q quicker (less detailed) decoding > > A approximate IPC > > Z prefer to ignore timestamps (so-called "timeless" decoding) > > + T use the timestamp trace as kernel time > > > > The default is all events i.e. the same as --itrace=iybxwpe, > > except for perf script where it is --itrace=ce > > diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c > > index a0368202a746..f528c4364d23 100644 > > --- a/tools/perf/util/auxtrace.c > > +++ b/tools/perf/util/auxtrace.c > > @@ -1638,6 +1638,9 @@ int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts, > > case 'Z': > > synth_opts->timeless_decoding = true; > > break; > > + case 'T': > > + synth_opts->use_timestamp = true; > > + break; > > case ' ': > > case ',': > > break; > > diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h > > index 29eb82dff574..55702215a82d 100644 > > --- a/tools/perf/util/auxtrace.h > > +++ b/tools/perf/util/auxtrace.h > > @@ -99,6 +99,7 @@ enum itrace_period_type { > > * @remote_access: whether to synthesize remote access events > > * @mem: whether to synthesize memory events > > * @timeless_decoding: prefer "timeless" decoding i.e. ignore timestamps > > + * @use_timestamp: use the timestamp trace as kernel time > > * @vm_time_correlation: perform VM Time Correlation > > * @vm_tm_corr_dry_run: VM Time Correlation dry-run > > * @vm_tm_corr_args: VM Time Correlation implementation-specific arguments > > @@ -146,6 +147,7 @@ struct itrace_synth_opts { > > bool remote_access; > > bool mem; > > bool timeless_decoding; > > + bool use_timestamp; > > bool vm_time_correlation; > > bool vm_tm_corr_dry_run; > > char *vm_tm_corr_args; > > @@ -678,6 +680,7 @@ bool auxtrace__evsel_is_auxtrace(struct perf_session *session, > > " q: quicker (less detailed) decoding\n" \ > > " A: approximate IPC\n" \ > > " Z: prefer to ignore timestamps (so-called \"timeless\" decoding)\n" \ > > +" T: use the timestamp trace as kernel time\n" \ > > " PERIOD[ns|us|ms|i|t]: specify period to sample stream\n" \ > > " concatenate multiple options. Default is iybxwpe or cewp\n" > > > -- - Arnaldo