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=-3.8 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 B6A38C433B4 for ; Thu, 15 Apr 2021 14:35:19 +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 37A0761139 for ; Thu, 15 Apr 2021 14:35:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37A0761139 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=VJ1Pnyf6MyffSFWs4o6xtNXLe40XBDv2Ixt0eX5HYIY=; b=ioPeZ6mxRBp0D5MkkdEzpq3As CfO5IdsTRVvTOoEzGHBIalxQojEEuc/K/uADFAOrzY501y5kYqnxsWvcWvUbZ3VnVgYRXbq0OPZ4L KImojWSFygcrIH3nV7zBePhPX7Y1mC+RtzVBqN53GWAUqxfi9pXVnL5X1wk0/rLS+qVocWoDEoeGN F/bQZtf1uo9Ij8L+CBi1NpAH2jQ0VV42yZgds/I5EtD53ZdMNquecaY439Z+jz4cjmU9UBUHKeFta zJO96BGhfxOrAHyFs18pwZHac8RkcmkQDTtHlbNcfJPfdmmWRPJRyKxfWhMJrxEhdcO9qph4VlVa9 cfncgonIg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lX33t-00GSFS-C5; Thu, 15 Apr 2021 14:33:41 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX33r-00GSFK-GG for linux-arm-kernel@desiato.infradead.org; Thu, 15 Apr 2021 14:33:39 +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=S/Ac5p5sFlhYpJj45qpbkrcbzcCAGOqGDmLTdphHEcY=; b=P+6VRi8LY6jrp8hbCvDdK3sBIq fESBhmuHN/r2ezUoclLjxmCszPAnmdRSGkGKOcdWSaDW2jVZz7vU2tFQAoRpaOgFzdfmq9jTXO3w0 kUGtGN3lJ1LyBZYna9b1a410G5FtE8HqrulDFkP6BF5fb8FiqnzCN78Lqz4GXkjEpwb007StWWJGL TRRxsF9vbpBKcMmAPP/4jn/ftbOMmBE1coQbqsz7zSArhvR6TMrBSXtDp/8ccLF029+PkEHayLRwP vVR3X9uBCj0YPSVjjYkuTl4F++WgzoWEQZLWCKaYOIgyhb0EpTy0+xz8BucM1e5EfAHYSdadPvRCo SDwr1rfA==; Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX33p-008ebc-05 for linux-arm-kernel@lists.infradead.org; Thu, 15 Apr 2021 14:33:38 +0000 Received: by mail-pj1-x1033.google.com with SMTP id k23-20020a17090a5917b02901043e35ad4aso14513907pji.3 for ; Thu, 15 Apr 2021 07:33:36 -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=S/Ac5p5sFlhYpJj45qpbkrcbzcCAGOqGDmLTdphHEcY=; b=uxXFkFcErUQRZZT2RsagDil40vU8fxQhVFq4L8Q1w8InnSx7O+aNifDs0SIao2TCdU 5pMTUbhGK2infCJ4+Bp85Me6Su32E+vSzX/LFc6R8qE4w/ZwxDqWsDxaOdpcb38xjcj/ Hb9rcWzLAB+UV5fMgbtGZl4qRUcGXpg3S+YJWnrDHyji/TpKZLLNJH33RhGbQL27N+WS 3fk4+2QwXwZ76889lGDQ/xyHWDCTOls7q6GGSg+KfYx4V0GDopX9AslBRsmjI2wncGS4 iX7HD1DwFOQ7KFMBMIbaCO45NOhS2tsXzqF3f/MUi/kQed6VMIrxutIh6V2AynvYzzIY rFJQ== 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=S/Ac5p5sFlhYpJj45qpbkrcbzcCAGOqGDmLTdphHEcY=; b=EkdMfK4UbwgXoqoRxGQJjOSaP+Jn2uzUph/+4XiGISxYMHqhguPgHAcwpeGp4XZv2R ilooHNCp5cVyQPGI1YofKGwEdDg9kOJj5jXg92VYkwVrwfEq8sAlJ8L9HOU6Ptpjpyjt jK6XgkEqiD7bMa8FqQAAmpY+yosScr4lirIf3NLdJSmXUifr6XUJojXEpi5CKgRJ/PwV sdTLiUUl6Gu6oHCE1DUY+nk9CTB3+jDPQV8Q2W9VpCuUFh68DNuZ5eR5cY1n5TYWh5UG 1XdwDdfX2Hy3vmH0CXhyZmNL4dNFOwTjP2+/9wir1LX1Xo//nXqGhQQ6B9mSnn5fCchc 1y3A== X-Gm-Message-State: AOAM531+f2ZuTzuf5R3fCsPzZ64bx0/dRFlmeyNOnmWgQ8T7Y4+OL1rZ CCwL1nIN7tVTOot+K6XfTPkGCA== X-Google-Smtp-Source: ABdhPJzdaH1Gm9JyqnfPTo7HQh23YJXi3M9xml+sUHCOLDFbpT44bFt/Dd06K8z2yY2wR/no/niRCQ== X-Received: by 2002:a17:90b:3b4a:: with SMTP id ot10mr4193152pjb.48.1618497215586; Thu, 15 Apr 2021 07:33:35 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([116.206.101.232]) by smtp.gmail.com with ESMTPSA id s22sm2971372pjs.42.2021.04.15.07.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 07:33:35 -0700 (PDT) Date: Thu, 15 Apr 2021 22:33:29 +0800 From: Leo Yan To: James Clark Cc: coresight@lists.linaro.org, al.grant@arm.com, branislav.rankov@arm.com, denik@chromium.org, suzuki.poulose@arm.com, Mike Leach , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , Mathieu Poirier , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] perf cs-etm: Set time on synthesised samples to preserve ordering Message-ID: <20210415143329.GC1011890@leoy-ThinkPad-X240s> References: <20210414143919.12605-1-james.clark@arm.com> <20210414143919.12605-2-james.clark@arm.com> <06e1cc2e-1108-81cd-59e4-79277807b80c@arm.com> <20210415123953.GB1011890@leoy-ThinkPad-X240s> <4c173b86-b045-0514-b293-c39cc74d353d@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4c173b86-b045-0514-b293-c39cc74d353d@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_073337_066282_29AF80D3 X-CRM114-Status: GOOD ( 20.73 ) 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 James, On Thu, Apr 15, 2021 at 03:51:46PM +0300, James Clark wrote: [...] > > For the orignal perf data file with "--per-thread" option, the decoder > > runs into the condition for "etm->timeless_decoding"; and it doesn't > > contain ETM timestamp. > > > > Afterwards, the injected perf data file also misses ETM timestamp and > > hit the condition "etm->timeless_decoding". > > > > So I am confusing why the original perf data can be processed properly > > but fails to handle the injected perf data file. > > Hi Leo, > > My patch only deals with per-cpu mode. With per-thread mode everything is already working > because _none_ of the events have timestamps because they are not enabled by default: > > /* In per-cpu case, always need the time of mmap events etc */ > if (!perf_cpu_map__empty(cpus)) > evsel__set_sample_bit(tracking_evsel, TIME); > > When none of the events have timestamps, I think perf doesn't use the ordering code in > ordered-events.c. So when the inject file is opened, the events are read in file order. The explination makes sense to me. One thinking: if the original file doesn't use the ordered event, is it possible for the injected file to not use the ordered event as well? Could you confirm Intel-pt can work well for per-cpu mode for inject file? > So it's not really about --per-thread vs per-cpu mode, it's actually about whether > PERF_SAMPLE_TIME is set, which is set as a by-product of per-cpu mode. > > I hope I understood your question properly. Thanks for info, sorry if I miss any info you have elaborated. Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel