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,URIBL_BLOCKED,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 EABB3C10DCE for ; Tue, 10 Mar 2020 05:43:24 +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 BEF5D24677 for ; Tue, 10 Mar 2020 05:43:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YhrjLhxa"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gChH3PS1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEF5D24677 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: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:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WVUdzxmnpNvjaNtG+HFlIg3oyPFzgsgo3AR6FRegV5k=; b=YhrjLhxalwJaF0 CQ1sibp71qVjXtO/gi391p1JXtj95QhENHcQLkcOix4OVy3q58GElcQVXzqCXG5jmOhR58wbMhg09 oEetdtTc6JApGUX61fz1paVsWGjvS2Zj3IDUpYMswUM+k1sYU5k7t9VlXRhwtxGKE7nJ9Lj/tTmNe X+yD6XxPeTlIQJCE0cMChKgHVgD8rWefNQH/obMBG/3Nn6M0F19xM2n+4T9lSOoZrbDh2diuCFNQP BBiJPrM2XgSsWwVIEI7avNC4CdryTrmIBZNQBbkmTmXpPm9w/a5EHOgwm8i9RcQQt4co7Zc1x8pkh jvF7JYSzXlhlxls4TPfQ==; 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 1jBXfn-0007R7-Rb; Tue, 10 Mar 2020 05:43:23 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jBXfj-0007Qb-UX for linux-arm-kernel@lists.infradead.org; Tue, 10 Mar 2020 05:43:22 +0000 Received: by mail-pl1-x641.google.com with SMTP id h11so1801844plk.7 for ; Mon, 09 Mar 2020 22:43:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=F25Z6JOMg3VYYeS0Ph17/tK9FAZWHrNbdM4PzCWFQu8=; b=gChH3PS1Ahx4kjgjmib1NgIky08oV7TsTD369DupZ3qTEaWaIL8bL1V8Yqy85SlZSx XofjzRdyK/ZgT7pbeM6FhDwzyoJF6CscxXa6XE5ga8eAHHj4GJfQx6cwKFUsw0rkwLKY tU6+oauZM8ktgjO8lnrklWew6Uvm/VcrQZ8FPyGVSEOvFPaH4H0n2drzFthrm5ft+3RZ VxWP43OKxBolA4Utm1IMjeC5oaWOrU5xrQ9t1l08MrygvCGrIkmX3wmgP1cLRHmHmYz0 jJ8jR3Evj+msL9T0efnedWvBGv7WjgLOaHKfMJOcg/Gv0OHKdLamLVq3/Cl6WkS11r05 J1ig== 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:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=F25Z6JOMg3VYYeS0Ph17/tK9FAZWHrNbdM4PzCWFQu8=; b=mPBovEhf8f1oND+JdjJIO7RLaSiGthq0dZJMl0SMX1j324rwifi17+XV+OR/E2V5xY +eq8Rj+1p+SJOyYTs0bz3mA0CoQrHP1ViNU0IdYg9B3710FGrY668W5Q2xtLmu9CkzWZ ig6iNDP1CQZzwTmaULBrI6uvMlPgO3A0zrdtGbttqxAQisCndgO7T+Zgv88kYNj1dJzL RWBwvI5b9XCqOMtNp2I8urUiP+tymLk8gWXr7X4p8rjSeLKQro9eBxvRonbKTrFbPnfk yKj+te0Q0ppvubNOrbBRSThDwsPAOaEb3e1o8YIKCR///PoXr2mNKP+gaH1TvGpJVzDj i06Q== X-Gm-Message-State: ANhLgQ3qvN4HncxN6SsPE1Rw8TyJ0/ZWpB6UAmm+TPxAV88LF+YrcKi9 WgqDLxbpR/fhvgxOKFUZJNljXA== X-Google-Smtp-Source: ADFU+vsXDgkhbqbgEl4Jn5PjWcUx6mjmhk+iK35QWzx5tHigdCQgJMA6OZ+XlXSIjbrH2oaJMWgY/Q== X-Received: by 2002:a17:90b:19c3:: with SMTP id nm3mr1367661pjb.149.1583818998924; Mon, 09 Mar 2020 22:43:18 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([2400:8902::f03c:91ff:fe3f:32da]) by smtp.gmail.com with ESMTPSA id t142sm37183481pgb.31.2020.03.09.22.43.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Mar 2020 22:43:18 -0700 (PDT) Date: Tue, 10 Mar 2020 13:43:05 +0800 From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , 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 v5 0/5] perf cs-etm: Fix synthesizing instruction samples Message-ID: <20200310054305.GA21545@leoy-ThinkPad-X240s> References: <20200219021811.20067-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200219021811.20067-1-leo.yan@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200309_224320_047359_39929812 X-CRM114-Status: GOOD ( 19.78 ) 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: , 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 Hi Arnaldo, On Wed, Feb 19, 2020 at 10:18:06AM +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 Could you pick up this patch set? I confirmed this patch set can cleanly apply on top of the latest mainline kernel (5.6-rc5). Or if you want me to resend this patch set, please feel free let me know. Thanks! Leo > Changes from v4: > * Added Mike's review tag for patch 03; > * Added Mathieu's review tags for all patches. > > 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 > > 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