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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,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 1A7B9C433B4 for ; Tue, 11 May 2021 12:07:24 +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 6B7BD615FF for ; Tue, 11 May 2021 12:07:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B7BD615FF Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CcKUAtmjLhytaC330/ybCi5GwGSIsEEdTUGAgq24ZH4=; b=kW7hKIoGm6rwx+6r35U3RLEMN zwXbkT67rO0EqOVPRovt/boK2jN5hOxwXUOcw1AuaxjtkrO7wGuz+okXX66FvgNXrW7LihBvHusqc jlcOoF6LsnawiVQT2S0fKaHbRJ7rT7ArWLUuvAJq9mk3DYQJK2yf+R98mCgbf2LopRzhRk+xNFEAi RENrRI0BMGLF2q6ybGKLkyR1ro7TrSiq2g+vPCqNpFR1xsZJ9+cpcjsTkC6YM6tMRF6J+ZCxZJ7Du Ojd7H56Abd3+gM/oPlnModeDSZPFnHvg92eQ22qrbkagjODzqxyQZhctvtQeZkORpMWgIlwxWQbHD S0Q2wW9Qg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgR9K-00HHq4-MA; Tue, 11 May 2021 12:06:07 +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 1lgNPH-00GYzU-1e for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 08:06:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=owL/4Levsbr9ZSdMY4wPEiIgPr6GonMYfwkwZ8+sBwc=; b=HqMJJuwcwF2M/Y6XHV7dSOq/e+ ClKqjUU3we1yKQ3oRJPe4IU0LlZZHLrO0tCdfeS/CojFKwJvAZ+hbG1X+ZpwRh3I94vYnpWubA7fr 96bP383BC1Pe/63FbwDsJJkmQlpnL0Vf+4bj0upHs3YUeWC61k7+yhmbuhaWLqbRiiqb7EKnBB/rX Ix9rSlROUa4Va3HJhZnQhhG+lM++9iMS6eGkph0Oav8LL/NdPIVve7hU3jJCcygUaSbbyP/IqsYDf e6WJiWN8TOljHqh7RIzm6iN8b1pOQyH+16qxHygwEmJV5eef5B4dO41Mb4eE/xwJrGKiLQxEW0CuE PaqgQz+g==; Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgNPE-009Niv-EB for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 08:06:17 +0000 Received: by mail-pg1-x529.google.com with SMTP id u25so4617507pgl.9 for ; Tue, 11 May 2021 01:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=owL/4Levsbr9ZSdMY4wPEiIgPr6GonMYfwkwZ8+sBwc=; b=WdsVMzw5hMV3bpevyN4y/+8vNyWJPzr8NHJEo7BFpTmqs+8FT6YlbQUBVryuJ4fWul v2u0iA/uN6aXvyuG6a9l92kUtS0KQvwWtUntXwFiTreAedIkwLDK44GOvT4gTqTxH8mh 9otyMAuHnoEskR24vEZHE5yQnVl5LgxzU0wkreU5hq2Xn7BFc+Z0kBn000Ila/bdjk9o 2VZmIBcHb2ZgkeK2gBk+V2/O+EqIk0y4Sn8U4TLAPEYUWGDNVIJkQR6dAZrFUZFOlirD iTKg9UJ8CXzNuCRMmoN5yb10JdCRrs7zS3zivhAraGN2F3j00nIlYihaqs4+aq7SKb+Q cBcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=owL/4Levsbr9ZSdMY4wPEiIgPr6GonMYfwkwZ8+sBwc=; b=aCyhxjyzU2gt98Rnc+LCI2PL18BOAmlrcTTnxkDzV0haZLXxhIH4hXuZ9VrYyqZTtf a3g20sFZJeidjhFezx96wrxkgRvEbMLM5OKx6L7UEIgGbHLTP1iKZbzkr64K55yoS6pe QgOoZ4bE0+p8j96cKzRQnYa7bKRV1Za5dHtOjWIVqNVtMQuVUJjAarxoQSlSTnRgacqV p4YK/DLk44o22G9j53R6XQZOOJo7blZ54baGszMV0Tl6TseG5EDGcBASOc59ZClQtH/I FBYnG+aR44krNucE6NSVLVv9PUwsI+7p4T6HaIpqJYWy1+XUvWxpHoRoR92JjHEqt/H/ gPcw== X-Gm-Message-State: AOAM531xrnhxI/APthlPeDrID2nlFfxWv/IZCoPzq/O48DlPteUWIEEt NYvHm1vBOxQSPIisQFNE6h/QHdfSgUplv+TkVMQLoQ== X-Google-Smtp-Source: ABdhPJy/IpuNzfVlzHBbQnYHtWtbClkdPrzK/5eTeFhvGdUmoXvn7GLPxtZ2SwEo8SN6ofJVFb6GhcZ1I1MrmHivm9g= X-Received: by 2002:a63:e918:: with SMTP id i24mr29602351pgh.118.1620720375143; Tue, 11 May 2021 01:06:15 -0700 (PDT) MIME-Version: 1.0 References: <20210507095814.17933-1-james.clark@arm.com> <3926c523-3fdb-66de-8b9c-b68290a5053e@arm.com> <20210510053904.GB4835@leoy-ThinkPad-X240s> In-Reply-To: <20210510053904.GB4835@leoy-ThinkPad-X240s> From: Denis Nikitin Date: Tue, 11 May 2021 01:06:03 -0700 Message-ID: Subject: Re: [RFC PATCH] perf cs-etm: Handle valid-but-zero timestamps To: Leo Yan Cc: James Clark , coresight@lists.linaro.org, Mathieu Poirier , Al Grant , Branislav Rankov , Denis Nikitin , Suzuki Poulose , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_010616_518335_BE976270 X-CRM114-Status: GOOD ( 16.68 ) /bin/ln: failed to access 'reaver_cache/texts/20210511_010616_518335_BE976270': No such file or directory X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_010616_518335_BE976270 X-CRM114-Status: GOOD ( 13.08 ) 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 Hi Leo, > 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. The bug is confirmed by HW verification. > > 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. Is it really impossible or it just can lead to incorrect decoding? I verified the profiles generated with zero timestamps and this patch on Trogdor (8 CPU cores) and I don't see any significant difference in the quality of the AutoFDO profiles. If mixed packets don't cause errors in reconstructing the branches but instead mess up with their timeline then it probably won't matter for AutoFDO which just collects statistics of the branches. What do you think? > > [...] > > Thanks, > Leo Thanks, Denis _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel