Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6181706ybv; Tue, 18 Feb 2020 11:30:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwdGwko+Q7btmBpv2n51t0gsetJYpcP3Q1GSTV9GjNek4lC/YZ8O7KYHUgOS73lHI7+lJtY X-Received: by 2002:a9d:6e8f:: with SMTP id a15mr16457225otr.178.1582054243222; Tue, 18 Feb 2020 11:30:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582054243; cv=none; d=google.com; s=arc-20160816; b=DVlwdIrcXlQp1NAI5xpfjJkCTq9GOYeh1NpEaEI1bvvrJawFB5bVI8lUxRfBWRu3Pf LIyZnXFxkaZdZwfL+2ldllOAI+ISBFCWyl7heUUQT2kiivMZgiIrhz9huL7u7KEp7i8m Rq2sqCcety2C9F5V88qAsFjvPy74IP95aqu7JM1cmfxL5HpJnY/Mf48DLxsHiNj/d3vk 9AHos7jcqiZUH4fs0nehRhfM2t3eBrvzbfQMdbRQqguR3FuLpDFLUFJ7l5FyVP8LTYUH FBzDQ30wJwu55ueombA9OMktLI+VNkEoyyYhkIL6UFyr4iuveAidfKyCmw8UCBaAEOWo DfTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=U9BxnklloKOZjCuc3cdTh1HeN/WnMWEq4zfovk73vyI=; b=qnU2GhgDMi6//DWFZ6ofBsMNNICupLJYcu1gj9JFm/T8y5Ke2O/x7BJxCY9vCuwiGx 1KyfZmlseRISXMVUOjpkYPyGPZ4NLeuCC59EUZMymQUZA1YVEI2xVT4BJC9jxwqbOk1l JcmaoBP+CX07ekHyr4jDlmpWTDe079BKT9adAgwEO0yBvJ6SCw/2+SzocGoPRxtURqFU TWSZjKfi2WFR37dth/944dzXclomm4Xp5xPWJxu9oPxTSRMqiu2Z6nDMAAx8+/8OGsze Vtp7fEgXVX2qEBEB2FNPYKSWlcmrSztE4SO0vaEwl8YyZEjqjA8vxcxZhHuAX3Jq6p95 aV5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nT49w0C1; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si2124675oth.182.2020.02.18.11.30.30; Tue, 18 Feb 2020 11:30:43 -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=@gmail.com header.s=20161025 header.b=nT49w0C1; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgBRTaX (ORCPT + 99 others); Tue, 18 Feb 2020 14:30:23 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:37680 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbgBRTaX (ORCPT ); Tue, 18 Feb 2020 14:30:23 -0500 Received: by mail-qk1-f195.google.com with SMTP id c188so20678150qkg.4 for ; Tue, 18 Feb 2020 11:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=U9BxnklloKOZjCuc3cdTh1HeN/WnMWEq4zfovk73vyI=; b=nT49w0C1ih5oOzBuBiyvQjcGXgaymRwO9laS+OKDFfRZxupH6y7XS1KkdPScRyKr7Y TLq9WjVJyN6/VcyD6x32k0izI8wLRVmKM5Rsq0WbUf4/hD/YmFCTeMADkULpEBF7zGmH jcOvWaensQUjpPb71s4iSUMXCIjg61ptLPuZ+lpRZXVof6kXle79aTHPOhUCjSJuB2HW wTNHJm2VVJMDt7LszNAtbhRSEfHsDAihoUkR5Tkk9HjIYiXHpU2Cxv/GZb3geQplz7rq rvn8+Q9tl7llI3pMLPHrz9iy7PSnDxS/2zqirUQGyCM7hdiBIqCLI1PFHn6uPEgS0RCV EJug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=U9BxnklloKOZjCuc3cdTh1HeN/WnMWEq4zfovk73vyI=; b=rzor2X8ijm4OlCHBN9QzzDO8C1uYOe9UXFlMgmpE+DAT3GXXGOIqS2dCWfMMm4y1wt NH47qd/rZ79Z+CVpal4AYrWHea/KZEHl/ShMKQm8a1AWI6a7m/vJvox7lSkNN+TXq1lr e5/Xlifseujvuh5QP23oyTUbQrlGzGqOasiAubESzDVs9b1J1ZCdr/yWWnTHcFouY2gz LBq6p4r/JtjeExKF8hEXj4ruAGhC0kd5w5n7BXsnxbnAT0GhC4uwzrL9nVx0G9QH99eC uD/O+chzLVyvaIP41Ac4uICd9Uokq3/kzLhj41Z6rZb+OOKSSiBo9iDOEIQxqX55ZIQg N1Cg== X-Gm-Message-State: APjAAAVcYemquQUh7Qw00mzgKaZGASBFn9yD7VE/xFDVV60if4oZNCJV WdNMBHhjwKZjR1I2L4WQlpg= X-Received: by 2002:a37:a488:: with SMTP id n130mr19775161qke.120.1582054221733; Tue, 18 Feb 2020 11:30:21 -0800 (PST) Received: from quaco.ghostprotocols.net ([177.195.210.189]) by smtp.gmail.com with ESMTPSA id o10sm2223215qtp.38.2020.02.18.11.30.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:30:21 -0800 (PST) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B2047403AD; Tue, 18 Feb 2020 16:30:11 -0300 (-03) Date: Tue, 18 Feb 2020 16:30:11 -0300 To: Mathieu Poirier Cc: Leo Yan , 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: <20200218193011.GB5365@kernel.org> References: <20200213094204.2568-1-leo.yan@linaro.org> <20200218184934.GA11448@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200218184934.GA11448@xps15> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Feb 18, 2020 at 11:49:34AM -0700, Mathieu Poirier escreveu: > 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. Yeah, that would make things easier for me, always appreciated. - Arnaldo > Thanks, > Mathieu > > > > > tools/perf/util/cs-etm.c | 157 +++++++++++++++++++++++++++------------ > > 1 file changed, 111 insertions(+), 46 deletions(-) > > > > -- > > 2.17.1 > > -- - Arnaldo