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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 855FCC43460 for ; Tue, 11 May 2021 08:05:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 535DD613CA for ; Tue, 11 May 2021 08:05:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230422AbhEKIGT (ORCPT ); Tue, 11 May 2021 04:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbhEKIGS (ORCPT ); Tue, 11 May 2021 04:06:18 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEDDBC06175F for ; Tue, 11 May 2021 01:05:11 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id c17so15506433pfn.6 for ; Tue, 11 May 2021 01:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qowb1jCPuujd1IWsaK4vSQJT6KwxU2yyn+OfcNfTCs4=; b=X8L8UnWsuHK5IGqp7KD23AjgSrJhNLM8XDx2FxDwsZezIyv7RhI+opaPcSv8+AeDn+ 0t/thWkYZppBZn2Is3zdeMfElvob/hpiNoASEFxYSLyqB6KTti1XrYwGsLB3bYq28X4P AqYO2SXjby8YR7S4g8VALCgvtnFyUUjWBsj+Q4WxUmn1V5arDt1mneDC7gJpIjsQB/M0 dlArazIN/Gt2tNbaiFKBtZn/nIpCWyZXCxQJcvXBx8pjTxyl8Fbg+NcqZA9VefIIdHE1 dGx2Ov0lKUjwGVijfqZS8b/8mIjNBfseHJHzew5Jot+OCW0aAqWhS7/AzQ+ZS36wTeFG 947Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qowb1jCPuujd1IWsaK4vSQJT6KwxU2yyn+OfcNfTCs4=; b=YVmeILiI4/iMA+QvBymi6F/SaYzwsCqmix2w9/qvtJObq888m7cLrzpc7DUsEoTOQ5 dQWeXzVpRgMqNo+c1ju6oYW6EPzFi3Ez/QexQNWsk3hY9dqJbQCOT+WMU0qcCALZWFje jONsEPHc3OqO1rNCQPsttBshHRX9HLW4VZZRQOhr3kjQ3okCaNJInTEjzKjhKir29Cuw 7/tFzKqvOaV9cf5sl0w8pZIATYj/Zx34f0xSY0/35dSbwTPLafe2WW9Z1DgYv7iBH+D2 6w+xvIO6qqCUQLk76Hm5U82j8K16+84VFUy62bR2E4DdqpPBcJlqvQCOSDrmKdIsrs4A /Obg== X-Gm-Message-State: AOAM531ZwC9V9RlpdlwuN/4zRq/VHnFpscsveZN3B3wdGOGDjsvRMt2j C+1RQD7hfPz/2p6qOwd1LUc6Pw== X-Google-Smtp-Source: ABdhPJztvCw2v+qMSbbFPGpcKYFa9G6eBPQdix7Cv3054DAxJ4x2xcjGBH4FewuCg580zoUHJu8X7w== X-Received: by 2002:a63:8149:: with SMTP id t70mr29797637pgd.299.1620720311243; Tue, 11 May 2021 01:05:11 -0700 (PDT) Received: from leoy-ThinkPad-X240s (ec2-18-167-90-4.ap-east-1.compute.amazonaws.com. [18.167.90.4]) by smtp.gmail.com with ESMTPSA id j7sm1482312pjw.4.2021.05.11.01.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 01:05:10 -0700 (PDT) Date: Tue, 11 May 2021 16:05:04 +0800 From: Leo Yan To: James Clark Cc: coresight@lists.linaro.org, mathieu.poirier@linaro.org, al.grant@arm.com, branislav.rankov@arm.com, denik@chromium.org, suzuki.poulose@arm.com, anshuman.khandual@arm.com, Mike Leach , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] perf cs-etm: Handle valid-but-zero timestamps Message-ID: <20210511080504.GC8273@leoy-ThinkPad-X240s> References: <20210507095814.17933-1-james.clark@arm.com> <3926c523-3fdb-66de-8b9c-b68290a5053e@arm.com> <20210510053904.GB4835@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210510053904.GB4835@leoy-ThinkPad-X240s> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 01:39:04PM +0800, Leo Yan wrote: > On Fri, May 07, 2021 at 01:02:35PM +0300, James Clark wrote: > > > > > > On 07/05/2021 12:58, James Clark wrote: > > > There is an intermittent issue on Trogdor devices that > > > results in all Coresight timestamps having a value of zero. > > > > I've attached a file here that has the issue. From the dump you > > can see the zero timestamps: > > > > Idx:69; ID:10; I_TIMESTAMP : Timestamp.; Updated val = 0x0 > > Idx:71; ID:10; I_ATOM_F1 : Atom format 1.; E > > Idx:72; ID:10; I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xFFFFFFE723C65824 ~[0x5824] > > > > This doesn't have an impact on decoding as they end up being > > decoded in file order as in with timeless mode. > > Just remind, as Mike has mentioned that if the timestamp is zero, it > means the hardware setting for timestamp is not enabled properly. So > for system wide or per CPU mode tracing, it's better to double check > what's the reason the timestamp is not enabled properly. > > IIUC, this patch breaks the existed rational in the code. Let's think > about there have 4 CPUs, every CPU has its own AUX trace buffer, and > when decode the trace data, it will use 4 queues to track the packets > and every queue has its timestamp. > > CPU0: cs_etm_queue -> ... -> packet_queue->timestamp > CPU1: cs_etm_queue -> ... -> packet_queue->timestamp > CPU2: cs_etm_queue -> ... -> packet_queue->timestamp > CPU3: cs_etm_queue -> ... -> packet_queue->timestamp > > The issue is if all CPUs' timestamp are zero, it's impossible to find > a way to synthesize samples in the right time order. I saw Denis's replying for the hardware issue for timestamp, wander if can add a new option "--force-aux-ts-zero" to override the hardware timestamp issue. Without the option "--force-aux-ts-zero", the developers still have chance to observe the failure case caused by the abnormal timestamps. Thanks, Leo 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=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 DD0DBC433ED for ; Tue, 11 May 2021 12:06:53 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 3FF3A61396 for ; Tue, 11 May 2021 12:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FF3A61396 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=cCbDH5R5ssv7T9te/FbxxDDYzBQ5+8HSWT3QM8rilY8=; b=qarvExX//5WR8ovA2CQL8PruI 4aODhcfCOcQPu3EqAYWp177FfGzeXNzKsPD+tk64YYiu7vxemy2RiyN0SQxFYpuytB4H5mSQ8WCqH 73RNfAmfJ9ifFYvct3a6iI+GGd1Lb/sxWTwoFu2b1hX/AqzC7Vhucc/421ltFRXVe6ood4hmhIQ9b 5Kgg8Dw1uLAivoMkvXDkWIUH8ZmnY6cYhOEubgbZ9lYfoKJGZtu2cEGsitRtwXBG5qEilqHN4UmV+ xEmMU2qpDQB87v1h6QZXEr/naAdB+5bwb/bNBk0z7/DBG+pEXRn7fdDvthqBH5uqWj996BScFBJYW oDgj2i1tg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgR8N-00HHcn-Bu; Tue, 11 May 2021 12:05:08 +0000 Received: from [2607:7c80:54:e::133] (helo=bombadil.infradead.org) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgNOG-00GYuH-3v for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 08:05:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=qowb1jCPuujd1IWsaK4vSQJT6KwxU2yyn+OfcNfTCs4=; b=0q11Bv/xMXwYK0odmietxDjfpz 4mSzvGGRRBZdesCD3lnqa1OV445FYboAOAA5FiRfVmE+ju8NCbxFTIZXIO9Zc31GaapS/ib2h15bl W/HTcMyeOt0sHBSIN0AZDklQn2RvX6BRKnS3Op5Vtxwv/4+wFRyfDenC6pXKWX9RLATEUqLFsCnO2 IsekGrnIj1K08CW31dimAKzpjf4vRhfuSP/Qmw9ey63F5DyUNnH0p75OuqFnx2D2T9nDUOeUxKvG9 E61VutolwGLbTfcjTC0famCyYV33LUI/Cm4e5rMG8JeLsmqUt+PR1Sl4lr8ri7U1fZY45DIqCN+Qo 2axDCUdQ==; Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgNOC-009NhD-N1 for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 08:05:14 +0000 Received: by mail-pf1-x42b.google.com with SMTP id k19so15504211pfu.5 for ; Tue, 11 May 2021 01:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qowb1jCPuujd1IWsaK4vSQJT6KwxU2yyn+OfcNfTCs4=; b=X8L8UnWsuHK5IGqp7KD23AjgSrJhNLM8XDx2FxDwsZezIyv7RhI+opaPcSv8+AeDn+ 0t/thWkYZppBZn2Is3zdeMfElvob/hpiNoASEFxYSLyqB6KTti1XrYwGsLB3bYq28X4P AqYO2SXjby8YR7S4g8VALCgvtnFyUUjWBsj+Q4WxUmn1V5arDt1mneDC7gJpIjsQB/M0 dlArazIN/Gt2tNbaiFKBtZn/nIpCWyZXCxQJcvXBx8pjTxyl8Fbg+NcqZA9VefIIdHE1 dGx2Ov0lKUjwGVijfqZS8b/8mIjNBfseHJHzew5Jot+OCW0aAqWhS7/AzQ+ZS36wTeFG 947Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qowb1jCPuujd1IWsaK4vSQJT6KwxU2yyn+OfcNfTCs4=; b=cPLZJrRzn1ocwm/H9UQ02hp1LxclZV31Tc3lwwUyLvy4L7Cjk6e6pKjQcg7Lq+s2XF 1OuSit+EpaETqG+VEXCqBVGTYNfsAMb9t5Le3fD8d1CgIqdjP7aZuWXJT9pNDNps+xQk w8Sb8knqxMDOABLR2/EVGjAM5oKBZlY9nZ91zeyS02ujKDdc1oTU6zn6QsyLBDdwxctd y1ragamWeMN07otAe+4IJ/OJnyJjLnG4QmVPwh/ekeKJcre9jAQi0x+2pVZ62KoImQ6y N45nss3ZdD3Vr5bti/16dw6GzkM8JGaQe4hp8h1qMMBz4Q/nXrwi0Aj5Jh/7ZN3nH1G6 RW+g== X-Gm-Message-State: AOAM533QlHMMIII+fG3rRCDm9PNsOv7Ncqfu4D38cj+ZftKg6eM7jhTv Ulf6hnErpS9lYvz1MbY/n84JJQ== X-Google-Smtp-Source: ABdhPJztvCw2v+qMSbbFPGpcKYFa9G6eBPQdix7Cv3054DAxJ4x2xcjGBH4FewuCg580zoUHJu8X7w== X-Received: by 2002:a63:8149:: with SMTP id t70mr29797637pgd.299.1620720311243; Tue, 11 May 2021 01:05:11 -0700 (PDT) Received: from leoy-ThinkPad-X240s (ec2-18-167-90-4.ap-east-1.compute.amazonaws.com. [18.167.90.4]) by smtp.gmail.com with ESMTPSA id j7sm1482312pjw.4.2021.05.11.01.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 01:05:10 -0700 (PDT) Date: Tue, 11 May 2021 16:05:04 +0800 From: Leo Yan To: James Clark Cc: coresight@lists.linaro.org, mathieu.poirier@linaro.org, al.grant@arm.com, branislav.rankov@arm.com, denik@chromium.org, suzuki.poulose@arm.com, anshuman.khandual@arm.com, Mike Leach , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] perf cs-etm: Handle valid-but-zero timestamps Message-ID: <20210511080504.GC8273@leoy-ThinkPad-X240s> References: <20210507095814.17933-1-james.clark@arm.com> <3926c523-3fdb-66de-8b9c-b68290a5053e@arm.com> <20210510053904.GB4835@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210510053904.GB4835@leoy-ThinkPad-X240s> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_010512_840527_77286D04 X-CRM114-Status: GOOD ( 22.83 ) /bin/ln: failed to access 'reaver_cache/texts/20210511_010512_840527_77286D04': No such file or directory X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_010512_840527_77286D04 X-CRM114-Status: GOOD ( 18.97 ) 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 On Mon, May 10, 2021 at 01:39:04PM +0800, Leo Yan wrote: > On Fri, May 07, 2021 at 01:02:35PM +0300, James Clark wrote: > > > > > > On 07/05/2021 12:58, James Clark wrote: > > > There is an intermittent issue on Trogdor devices that > > > results in all Coresight timestamps having a value of zero. > > > > I've attached a file here that has the issue. From the dump you > > can see the zero timestamps: > > > > Idx:69; ID:10; I_TIMESTAMP : Timestamp.; Updated val = 0x0 > > Idx:71; ID:10; I_ATOM_F1 : Atom format 1.; E > > Idx:72; ID:10; I_ADDR_S_IS0 : Address, Short, IS0.; Addr=0xFFFFFFE723C65824 ~[0x5824] > > > > This doesn't have an impact on decoding as they end up being > > decoded in file order as in with timeless mode. > > Just remind, as Mike has mentioned that if the timestamp is zero, it > means the hardware setting for timestamp is not enabled properly. So > for system wide or per CPU mode tracing, it's better to double check > what's the reason the timestamp is not enabled properly. > > IIUC, this patch breaks the existed rational in the code. Let's think > about there have 4 CPUs, every CPU has its own AUX trace buffer, and > when decode the trace data, it will use 4 queues to track the packets > and every queue has its timestamp. > > CPU0: cs_etm_queue -> ... -> packet_queue->timestamp > CPU1: cs_etm_queue -> ... -> packet_queue->timestamp > CPU2: cs_etm_queue -> ... -> packet_queue->timestamp > CPU3: cs_etm_queue -> ... -> packet_queue->timestamp > > The issue is if all CPUs' timestamp are zero, it's impossible to find > a way to synthesize samples in the right time order. I saw Denis's replying for the hardware issue for timestamp, wander if can add a new option "--force-aux-ts-zero" to override the hardware timestamp issue. Without the option "--force-aux-ts-zero", the developers still have chance to observe the failure case caused by the abnormal timestamps. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel