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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 4ECF1C433B4 for ; Tue, 18 May 2021 15:43:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 C4A4B6117A for ; Tue, 18 May 2021 15:43:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4A4B6117A 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+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=desiato.20200630; 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:Cc: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=CLe15uwgfRg/IxlvVHh2NNKXgcT4oWUX8W+CEXWmc2E=; b=gW0Y1iDZRPBdMI14B7NiTX2s3 m02kkb3/QrZrNCMCusm9KqzW9pQng+U4w315bdgQ2mEGfZ6s79k5QiSd7YAvr1+6UuDSbiERSEdEj tXn/yVr919n6K0eCxYv/VnQC8rH7Jw4sZ4CcMIc8JgXpkHAi61ZSkTAKH7ktC1WJoATmw3RosFRYL Mlxk0Ta2pIPoSdgtWMGAGKqoboBDD2ouxAqdM98hz7C5GMpWMKVTiEkYBv76Y5QVyqX94j3BCZvE6 6vcS4zjnlk/lgstpJwHds1Wr5UIKSfuAB8amte1Ij9EkN2AEu71vEL0H2afEmv2XJDhFv4I9zWRiA AyYlrhZiQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj1qT-001Coh-Th; Tue, 18 May 2021 15:41:22 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj1qQ-001CoT-Fc for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 15:41:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JS4LATXkAUdS/sC4KEHtQcOndSGv1Vw6slFcdQ89dSs=; b=n/hnlNFj7oUcCZwFC7ssebcJ50 XGVRownPSmGTzDUW7nOEJYeKPUzzxDjoudtI+EOssO0JocBZwgtu/uW95s/Y0v6SRnFzmclUWCkXX OzLRIiV+RJIdZYjDVQfMKSezmspjtVl8OLsrvC0tqjXH53nlZAY1MuMWWXH8SGFX8i839NTXrNVqQ dJOXtQ0S7snPJBqkchMYVq6I+6KeXUeGTCdyfZG7fEwAFj8/WCXNmg2h1hcvFZ7b0IubzOvRpsQLe ix8gagtWe5jUpsqUHfj4u/mAQQ3a7jfIMSb1/mW3Y2tacfnWytO4ncevjYVCVnlt8kzaiPR0Et+zh E+c63Oqw==; Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj1qN-00ElwV-A1 for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 15:41:16 +0000 Received: by mail-pg1-x536.google.com with SMTP id t193so7301924pgb.4 for ; Tue, 18 May 2021 08:41:14 -0700 (PDT) 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; bh=JS4LATXkAUdS/sC4KEHtQcOndSGv1Vw6slFcdQ89dSs=; b=VdkZxqYCBcOYNdpbuec4MNX9VXEdczDVdTvv3ki+8XychoPgF+lvCIicGfxPwiGQ6z qHsWw0tO54pWrQFxeHj18tpBm8teQPK66+/misGQ7Mzpjs4IQPBv/8Pxkv26ImMQ4FmG zG9IutpwFGEWuTg1zoN86tgVD5rbFz2m9wBuEp+A0FUMiIkCCQNngMecA7q9WZaapYVV fhknfQfmeqAtk0PPXJ+LZU1+5QFd3ltVby5tTJyTlkjMpwKmErPhXmsP4WJ7/pSTkTWI Lenxx9QITVaZlBfnTKGXFB7Db1WFo9IgnuX2Ht6GIIXcDKX+JgzBf5kyS89/Ods1p4ml zQ+w== 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; bh=JS4LATXkAUdS/sC4KEHtQcOndSGv1Vw6slFcdQ89dSs=; b=fT2QFxxSofq1bWjSigfPj0zbR9zovzJ3D/NqeTE8ICeub+S0ffqXK7PYtCaCy0+Mtc aiW5se6SRA+NRW+ty3wwmLvf/5jDcjYX6Af7FxWV3t45kvpqDsVaDYtew+Dv6ph70Yc4 BBbEINJcCPKHEPSjz6cTBIia5XmLipON1bMmvoEtHefqL3TDHIAMfnt0FDZ1OlWvD/QA Vj4k76SU9jS6OIi4iN2Z1vqyqYtfJiFRc8a7bHG+NBt6oFrELTs2XCN2J5Oyy7u8bSko 1znwAT3GAxVaNz9dz1jsBIrdWxXIsV2MNFg6hDwH5SB5t2mY82Otder0ZHnsvCktLval 4HrA== X-Gm-Message-State: AOAM533p/daRIrpgn3gHsXoBse/XvtHfZa4VhTwq9HXQ9DTnCD3sj0XV PKrMekak4w9td/7+Nh7ilhV6dw== X-Google-Smtp-Source: ABdhPJxoD+UitylUvKtdGWMmgRRVmQoEwwalOVDio/gmwoZ2CBVhBJU14BdNsm5FKj8OiV+BQ6VtRA== X-Received: by 2002:a63:3686:: with SMTP id d128mr5599670pga.305.1621352474263; Tue, 18 May 2021 08:41:14 -0700 (PDT) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id u24sm13284996pga.78.2021.05.18.08.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 08:41:13 -0700 (PDT) Date: Tue, 18 May 2021 09:41:11 -0600 From: Mathieu Poirier To: Leo Yan Cc: Denis Nikitin , Mike Leach , "coresight@lists.linaro.org" , "linux-arm-kernel@lists.infradead.org" , Daniel Kiss Subject: Re: [PATCH 0/4] coresight: Add ETR-PERF polling. Message-ID: <20210518154111.GA776252@xps15> References: <20210421120413.3110775-1-daniel.kiss@arm.com> <20210426175425.GA1391779@xps15> <20210427154746.GA1422814@xps15> <20210427160443.GA208852@leoy-ThinkPad-X240s> <20210505152919.GA1766375@xps15> <20210518140040.GC942578@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210518140040.GC942578@leoy-ThinkPad-X240s> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_084115_380108_80512A3C X-CRM114-Status: GOOD ( 39.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 18, 2021 at 10:00:40PM +0800, Leo Yan wrote: > Hi Denis, > > On Fri, May 14, 2021 at 02:02:25AM -0700, Denis Nikitin wrote: > > [...] > > > Hi Mattieu and Leo, > > > > I did some evaluation of the snapshot mode. > > Thanks a lot for the evaluation and share back the result. > > > Performance overhead is indeed higher than with ETR polling patch. > > Here are some numbers for comparison (measured on browser > > Speedometer2 benchmark): > > Runtime overhead of ETM tracing with ETR poll period 100ms is less than > > 0.5%. Snapshot mode gives 2.1%. > > With 10ms period I see 4.6% with ETR polling and 22% in snapshot mode. > > It's not expected that the snapshot mode causes so big overload. > In my head, two factors might cause the overload: > > - The perf interaction between the user space and kernel space; > - The data copying from the ETR's buffer to the AUX ring buffer. > > Check one thing: what's the buffer size for ETR polling mode and for > snapshot mode in your experiments? > > If I remember correctly, by default the snapshot mode uses 4MB for ETR > buffer, if copying 4MB per 10ms, then it's likely to cause big > overload. So at the first glance, the overhead difference might be > caused by the by the different buffer size between ETR poll mode and > snapshot mode. > > > We could probably utilize the ETM strobing feature and reduce frequency > > of data collection but I see a problem when I'm using both. > > Within a minute of profiling the ETM generates a reasonable profile size > > (with strobing autofdo,preset=9 with period 0x1000 it is up to 20MB). > > But then the size grows unproportionally. > > With a 4 minute run I got a 6.3GB profile. > > Just check, as Mathieu has suggested, have you applied the patch [1] > on your local code base for fixing the data copying for snapshot mode? > > After applied this patch, one possibility for unproportional issue is > perf tool itself introduces many activities in snapshot mode (especially > for 10ms period), so the perf tool contributes much extra trace data. > > Another potential issue is: after setting strobing mode, the snapshot > mode will disable the complete paths for tracers and ETR, so if the > strobing configuration is lost after re-enable tracers, then it might > cause the huge trace data in the later phase. For this case, we > definitely should fix it. > > > I don't see such a problem with the ETR polling patch. > > > > Leo, could you please take a look at this problem? > > Sure. For easier reproducing the issue, could you share me the > detailed commands (and source code)? > > P.s. I saw Mike suggests to continue the ETR polling development, this > is not conflict with snapshot mode. At my side, I will investigate the > snapshot mode, but don't want to disturb the process for ETR polling > mode, so when the ETR polling patch series is get ready, please go > ahead for upstreaming the patch series. Just to clarify my position - I would definitely like to see a solution that extends or re-use the current snapshot mode rather than introducing a new mechanism to collect data. > > Thanks, > Leo > > [1]. https://lists.linaro.org/pipermail/coresight/2021-April/006254.html _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel