Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6146755ybv; Tue, 18 Feb 2020 10:50:08 -0800 (PST) X-Google-Smtp-Source: APXvYqykjmOm+Z/DY4WJHOHP+rUKovFE942wyt851NI1watfvRZvLed/5xomBJnpxozZI/fvHt3V X-Received: by 2002:aca:6749:: with SMTP id b9mr2077751oiy.13.1582051808722; Tue, 18 Feb 2020 10:50:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582051808; cv=none; d=google.com; s=arc-20160816; b=g6HHCDGBqRGxteng1rWA7RbsUv8bU6R6GcGJ6NEzEpBaMfSrbDjlGZhSJXgaqvUKpM +k/2T1MCiE0hEB60Vt9fT7aV/NOq0pPAi4L38HY3elIhBzvPwvptQDkIFv/h8UIgr6Uv bL3B8rqAnUw7f/Re+U0j+QwQGGt2g24zqQ8TVe/+6uuSMI7L6lgEjSbwPSCcC+tbgNrh GKYacIBTzyd4Hr1urKr5neEUB2LnsfwLTIap8otfoLjGROD58UDnvsqk1eiODNh+Q2YB k9a5Uu48HTQbkeot38vQmUYXAYgKQyJgtutE4viYY9YrmnKXD9ZGYad8sMOOs6enhBiL lOCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Rsvcf6nEyweqvzaXVtO81ERnYCMGFqf7irfRI+SZdXk=; b=qaX4kTCe0AThVNj7n95TmECd7jqQxRTA6NDOU/PwrMC6y6nsUecJfXD4a3YiK55bIx jEUDiIiv4yU/F00hvBVFeK/skI1+S+LkRT6ZTqLxBciuvDEdaJcOQcTXDmkDG9nIUH17 hLK4GBWI+LVw+sL4DiIA0cdavLowqbVN4vsoTkkqZgc2m68TKU5uwkTDKHSSlYmnLgC4 6cSPGHZPl+qdZZHXOda+RAVmH7zP28nT6JToSKrzD2m+Ch3dtWc6zyY3l5XAN1shjGd0 Fo2IKi5poOAKpaNGBDcCH4f4W5R+9yVSIg+yWyJH6uQBiGQtDJaq5rKREXUX37YTJneP poaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E3940jiG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si2119824oto.169.2020.02.18.10.49.54; Tue, 18 Feb 2020 10:50:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E3940jiG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726391AbgBRStj (ORCPT + 99 others); Tue, 18 Feb 2020 13:49:39 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:32985 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbgBRStj (ORCPT ); Tue, 18 Feb 2020 13:49:39 -0500 Received: by mail-yw1-f68.google.com with SMTP id 192so9891530ywy.0 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=DkmHO++CDEFVZDMOGvVMIGEwRUy8lohT/laKPkMJ+iHpAbOWSOArT4hlj4e/1lY3ah wIwF+UI8I4M22qmusuDSWcN1FS+SnKjSnA9+Q59qGtSqUDCJKe2gEySMJLbonTO3VTsn YwepvGEVoxYpWHhpDwKm3uSJEmRxItNmj7pyaUtJZXLMSnOjbgnSrLjiJOa5j1BOkS9J fMK3+gxG05JwMC/HKGoKemHTtzlQvmyYDvqf+A020xacyhcyv2HvR2wZTwPEBoC+JviX lctTBywDKWODpIASChkhH0iuKhqQr+YP4g/zwgBMGuVTSIMAXDFFGClJJOy1FFON6h2v eofg== X-Gm-Message-State: APjAAAUFTJQe0uuDB0TMmQC8rgDHE6h8su8/kZIO/EDcmn0Q1590dVZP vMxVkzCa9fdV4ubSYpRtBnThxQ== 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 Cc: Arnaldo Carvalho de Melo , Suzuki K Poulose , Mike Leach , Robert Walker , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Coresight ML 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200213094204.2568-1-leo.yan@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 >