Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1417047ybx; Thu, 31 Oct 2019 10:16:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKvTZr7e8ZWN372SiN5nKHtswcIrte7Uss5l0xJyyohbLpKkCbJ2Is8Mnwd6jhxILigyN7 X-Received: by 2002:a50:eb89:: with SMTP id y9mr7338960edr.15.1572542198219; Thu, 31 Oct 2019 10:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572542198; cv=none; d=google.com; s=arc-20160816; b=qA4N4yZi39oNh62+AAOlhqmPeeC/ZvvCJq1D1PMp3EKqnOqR/x7Zz9B8QEMTU6p5gG N3QeqYDExLWhWB7WTqOXcGcuVI7N86MOZgi8QyJnEQ6tK1FdeRTrQGPtLxSRr+GIvq9v f/2d6bGaGpdiX5Wvr4va5Pdr+kfFDO76N4QsbCzTyuVZIe4nTCQMycQkr9DKRmGWPiLM gu9HJqoBd24HugY7N9oq8mdfrEr1O+5XrGnOzP9CBgPZyvWd3O8oTpwZcZRy/M0I1xWY hPk1bE9a/Jm/PVU86LZy1jsBgSZqP8O6xgDQc60CQPDJDuxSDYMeiYeHqd6CSqcN/qNF spOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7/oQbUrLxzCFxSXaMBW51XHkJmtd4pn/y99rXYOWrkw=; b=qYSrSIoq7dFBl+/dZ6mU+8zOttsf3sMerBAPo5wgsxg7Q6bB20aHV7OMnO3AX6OITD VsCH0vlFaggr1XuQjCvUc7eiCxc3/b1qQIygJmKO87Jb9Ufj+uFWczw0BXNxamv/zLmk dW8Yla2RfC9/JjLbpbmcovLD9YvQCUPcs5HvM7HLA2WHhyuGTFzbFNczZBtFQCk0nPE3 HCLiJkF1WDfaR8tQ0zHu2Ix8flI7nkjJk06ag04BhTI4dc4XPzpeSt7HNdj/01CMtHL5 Dy200TSh4AINCtRboVlzjMerTPbFX83egDieYd00IM281dneZ+njiefDqXy+OUXBehJY XmWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MAlgB0uB; 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 ov6si308002ejb.196.2019.10.31.10.16.11; Thu, 31 Oct 2019 10:16:38 -0700 (PDT) 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=MAlgB0uB; 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 S1728855AbfJaRO1 (ORCPT + 99 others); Thu, 31 Oct 2019 13:14:27 -0400 Received: from mail-il1-f193.google.com ([209.85.166.193]:41862 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728547AbfJaRO1 (ORCPT ); Thu, 31 Oct 2019 13:14:27 -0400 Received: by mail-il1-f193.google.com with SMTP id z10so6049722ilo.8 for ; Thu, 31 Oct 2019 10:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7/oQbUrLxzCFxSXaMBW51XHkJmtd4pn/y99rXYOWrkw=; b=MAlgB0uBqzuhtFTfYmLyMxFFpONdoI5/VWbG2WlqRhIbxtoHyINwTblMx5ZJl++Q1n GLyXlK0maDw4a14GrRsGiv0loH3883wNDvMgaCbHz5BOm3Az5FjdwMsL6Gj97rfpoHoK /Z30ThzxPpBT+nsheY4LRR0KPtJ0MYgWPUgW9uU12inuCfLdBjLYNFjeL6K6IfZB+Gcv G9IjBqmA0aM7pe18CuWUk6X3WihR1OxQsK3T4+LlBvSRr6YHNuYEqYANbBcW9NwQF/64 cacbSJiLaffDMs/hRowxOuQSDaHedLDPhR4Nby7PKXqR/dOzhL6xpionBwirVT/gK3ek wLRw== 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=7/oQbUrLxzCFxSXaMBW51XHkJmtd4pn/y99rXYOWrkw=; b=k6WmiH53buUmXnO0/+DtFhODLvXgsPvNZPledIZ8vlhY5adNtAkyN6PwdEayIIonaY WMAtbK9Pt1noKisc0ZnwwLnFLNGc+p3NhVHu9v+JJAhnXjXnd4jPNGYfqegDbrpYzB29 FH+g5kzMhU5+6JnMjXniCn3Ee1WhJAPccDWuvTjQv7+UPE+4/kqtsJ79o4RjN4qK6HS/ l/tmJ5Qaqs4uoPPgoZXsKdLvbKDLP0kLR786hrfqG4DnLw2flVUNnrtEOK2YElF0g8li 4eI03+nJwFgrU4Tn1NfMg0KcRYagPmtdwOC+gDWoIzBNv6RApXlLTHAd1wQyR6ign8fr YH2g== X-Gm-Message-State: APjAAAU6phXpv/g1ZMpA/e3MhKmY7m2+7nJN24VwNoKFc1dNttyxGQoX SYUas7k3ChJIWacmY5J0DdNi10jugrE0oCnZobPnww== X-Received: by 2002:a92:1907:: with SMTP id 7mr7540052ilz.72.1572542066045; Thu, 31 Oct 2019 10:14:26 -0700 (PDT) MIME-Version: 1.0 References: <20191024151325.28623-1-leo.yan@linaro.org> In-Reply-To: <20191024151325.28623-1-leo.yan@linaro.org> From: Mathieu Poirier Date: Thu, 31 Oct 2019 11:14:15 -0600 Message-ID: Subject: Re: [PATCH v1 0/4] perf cs-etm: Fix synthesizing instruction samples To: Leo Yan Cc: Arnaldo Carvalho de Melo , Suzuki K Poulose , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel , Linux Kernel Mailing List , Coresight ML , Robert Walker Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Oct 2019 at 09:15, Leo Yan wrote: > > This patch series is to address the issue 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. > > To fix this issue, patch 0001 avoids to reset the last branches for > every instruction sample; if reset the last branches when every time > generate instruction sample, then the later samples in the same range > packet cannot use the last branches anymore. > > Patch 0002 is the main patch to fix the logic for synthesizing > instruction samples; it allows to handle different instruction periods. > > Patch 0003 is an optimization for copying last branches; it only copies > last branches once if the instruction samples share the same last > branches. > > Patch 0004 is a minor fix for unsigned variable comparison to zero. > > To verify my changing for synthesizing instruction samples, I added > some logs in the code, and reviewed the output log manually for > instuctions samples. The below commands are tested on DB410c board: > > # perf script --itrace=i2 > # perf script --itrace=i2li16 > # perf inject --itrace=i2il16 -i perf.data -o perf.data.new > # perf inject --itrace=i100il16 -i perf.data -o perf.data.new > > > Leo Yan (4): > perf cs-etm: Continuously record last branches > perf cs-etm: Correct synthesizing instruction samples > perf cs-etm: Optimize copying last branches > perf cs-etm: Fix unsigned variable comparison to zero I have reviewed and agree with the changes in this set but won't move forward until Mike has looked at patch 2/4. Thanks, Mathieu > > tools/perf/util/cs-etm.c | 137 ++++++++++++++++++++++++++++++++------- > 1 file changed, 115 insertions(+), 22 deletions(-) > > -- > 2.17.1 >