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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 DC326C34049 for ; Tue, 18 Feb 2020 18:49:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B37D521D56 for ; Tue, 18 Feb 2020 18:49:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nmDJA0lX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="E3940jiG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B37D521D56 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+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=gcRYj9oAgdG7JtLftJUzKX8eJlGy7vFCsMauFsZ0nJo=; b=nmDJA0lXPkV8Xe SJSyXK+dftc4c6XLcYPWSf7B2Sf8CU5Yd5VD+RMEDz6lfBxcERhX2kbo9QDTa/C9xansh0aB+GPn5 1G5AvJG4LsDEFP9pt3XMP26FIVk+E7o7WIksMTsRvv4Us/rukH/PHmVXpKwkwArvXnlKo/WaEHwbo mx9eNrd2QpYl0ynrh3c7dLBRygVn25FGWq8BZIHA/mtINpYcsD/ci36lOxU5W1IWJr1r3f5Gyr2Ro fKdv+9yVVlZNU1lSTyUX2iojAh5Zf5sHtZFtOUXXEIMn2iEPKPtF8pe2EZE/hB7hZ9oVmC8qkoorA oqDxX9yTPGwZl1XscsFA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j47wI-0005EN-4x; Tue, 18 Feb 2020 18:49:46 +0000 Received: from mail-yw1-xc44.google.com ([2607:f8b0:4864:20::c44]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j47wD-0005DV-Rx for linux-arm-kernel@lists.infradead.org; Tue, 18 Feb 2020 18:49:43 +0000 Received: by mail-yw1-xc44.google.com with SMTP id a125so9840180ywe.12 for ; Tue, 18 Feb 2020 10:49:39 -0800 (PST) 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:user-agent; bh=Rsvcf6nEyweqvzaXVtO81ERnYCMGFqf7irfRI+SZdXk=; b=E3940jiGUF1Uagjna8ef3NgmN+ostg/I0dw5cE1R5zeXMMRWwv1EqbFgbyRLTcKlZF Fzm+K+hrXXQ2VPVx3vG9l4ag3zpMRTwx0Ut5LmBv/acM+dD7ZkP2FKmkH0we1oKBYkaP rXYvmQFRNrKJ/BPTJoCyG2vrN57gEmEeFwgT5SUpSkyWoGZRF5/MSVCwNACq4PQ7Ik8k +rXbZSBQl6NVkEa/4K7Gf6HeHh76j/vcF/X3bjB+DVgi9ARv7qmANY+z2qesaCPkmPOz VFEbQwPaHIQnqUjE7qHL+2Tmku10RGfY4JjZYFDbMWGOmB+AADDSxvZ+nJjBkw5mdoyy z4Qg== 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:user-agent; bh=Rsvcf6nEyweqvzaXVtO81ERnYCMGFqf7irfRI+SZdXk=; b=AjUniMnAFZ2O8VrOC8V2ko+dN90ZJHSQX87uP3y+HStCUFN0J767u+9YrfHFEX0tMf jJs2G5NQdBBQvqOG1R6KGXXCAprwnQKa+fP2YNUsEaiZW8V4u59SqJMwJEnGsHZnDpKa Moo8UFsUtw66bO7PkIepSk52dybeVKrUgnmV2GNVx8Atzgr1tzZfy2Rbs0C7h+c3zK40 85k551likdU3HFqKeIeUmMOHLB/LZPioLV2Z+OqTf72R/EmqJIw4/yfGiwFcWI00B0KQ PYtOqosDSGON5NUZh2DOUTlkdc1D2hdXro2+YMDSK1Ws+RH0WLCXzMNR4sy3Gjatcxjv M+4A== X-Gm-Message-State: APjAAAUQ0x0V8ktLlYqUvr4vujubUhTjan0zZDdx6JQLv7U5sLWhfHZ8 gjjSTKpR/8iXmOJkx17U7Xdlxg== X-Google-Smtp-Source: APXvYqzRCBhILjOad1Afntyy2VV/HNgWp+4H7xiesfGuqB8WMfOpZ7DpnMFd6fDluVqK9E0lOxPYsQ== X-Received: by 2002:a81:9bc4:: with SMTP id s187mr18147859ywg.285.1582051778613; Tue, 18 Feb 2020 10:49:38 -0800 (PST) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id w5sm2308936yww.106.2020.02.18.10.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 10:49:37 -0800 (PST) Date: Tue, 18 Feb 2020 11:49:34 -0700 From: Mathieu Poirier To: Leo Yan Subject: Re: [PATCH v4 0/5] perf cs-etm: Fix synthesizing instruction samples Message-ID: <20200218184934.GA11448@xps15> References: <20200213094204.2568-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200213094204.2568-1-leo.yan@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200218_104941_911809_7A62F785 X-CRM114-Status: GOOD ( 18.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Suzuki K Poulose , Peter Zijlstra , Coresight ML , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Alexander Shishkin , Ingo Molnar , Namhyung Kim , Robert Walker , Jiri Olsa , linux-arm-kernel@lists.infradead.org, Mike Leach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 13, 2020 at 05:41:59PM +0800, Leo Yan wrote: > This patch series is to address issues for synthesizing instruction > samples, especially when the instruction sample period is small enough, > the current logic cannot synthesize multiple instruction samples within > one instruction range packet. > > Patch 0001 is to swap packets for instruction samples, so this allow > option '--itrace=iNNN' can work well. > > Patch 0002 avoids to reset the last branches for every instruction > sample; if reset the last branches for every time generating sample, the > later samples in the same range packet cannot use the last branches > anymore. > > Patch 0003 is the fixing for handling different instruction periods, > especially for small sample period. > > Patch 0004 is an optimization for copying last branches; it only copies > last branches once if the instruction samples share the same last > branches. > > Patch 0005 is a minor fix for unsigned variable comparison to zero. > > This patch set has been rebased on the latest perf/core branch; and > verified on Juno board with below commands: > > # perf script --itrace=i2 > # perf script --itrace=i2il16 > # perf inject --itrace=i2il16 -i perf.data -o perf.data.new > # perf inject --itrace=i100il16 -i perf.data -o perf.data.new > > Changes from v3: > * Refactored patch 0001 with new function cs_etm__packet_swap() (Mike); > * Refined instruction sample generation flow with single while loop, > which completely uses Mike's suggestions (Mike); > * Added Mike's review tags for patch 01/02/04/05. > > Changes from v2: > * Added patch 0001 which is to fix swapping packets for instruction > samples; > * Refined minor commit logs and comments; > * Rebased on the latest perf/core branch. > > Changes from v1: > * Rebased patch set on perf/core branch with latest commit 9fec3cd5fa4a > ("perf map: Check if the map still has some refcounts on exit"). > > > > Leo Yan (5): > perf cs-etm: Swap packets for instruction samples > perf cs-etm: Continuously record last branch > perf cs-etm: Correct synthesizing instruction samples > perf cs-etm: Optimize copying last branches > perf cs-etm: Fix unsigned variable comparison to zero For all the patches in this set: Reviewed-by: Mathieu Poirier Unless Arnaldo says otherwise, I suggest you send a new V5 with Mike's RB for patch 3/5 and mine for all of them. That way he doesn't have to edit the patches when applying them. Thanks, Mathieu > > tools/perf/util/cs-etm.c | 157 +++++++++++++++++++++++++++------------ > 1 file changed, 111 insertions(+), 46 deletions(-) > > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel