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 157D1C433B4 for ; Tue, 18 May 2021 14:02:53 +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 938446117A for ; Tue, 18 May 2021 14:02:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 938446117A 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=EYHjjhI3pGkBRSl+UvQr8x0IDLelQq0Vv0ug5JYcUEw=; b=Fz+dgThKnmWa6/RKXA262tcUO S1ea6ch9+9wWucVBZc1uhZyvEGSMxGx2qrTP+gJHZ63/n+4R+hNRidnUGWpY/e+mrokydVSEjFMqE PPE7jMYVDNfENMEl/Csudk6mEdKiLdsvoRz+mYmhAm6fwJZqMu8se40uTO4QWNiP8zB9eFD4PGBmh l8eCGmu6r7C0OaAgCyRsbNcBkmO0NRk9Jv9qtTKuhRI1JSRguIdXEwSscUQAFtMhDFaRn35bRkCV0 EtQrQft3FPRqGcS68HkJnawqwB/PS+ndbcvBU4tCwIR+WGJeS6iaD9/6JENbFBSRh+Qh1AeF9P0BK FAhGldnaw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj0HH-000wux-W6; Tue, 18 May 2021 14:00:56 +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 1lj0HF-000wuH-Fs for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 14:00:53 +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=rDm2tFUKCNBZpJlH4TnUOedGN/6P6Y46H8CLpCWjStg=; b=f53Ys3INBYcYzLHM/2ubHmHCSr /JYQ3C+PA8GJpD/cm8dDjoZ85rbDT0V/XHp4KOJuPrJqFwVVsbnDaeaG4/RKPr+oPmvFAffZV81rb hpFEsqeuoYmgiMXJn+QMjL0VvcP+tDPwTWar1lw7DmHcZzWs23I7QfK5niLxVwxLEnFcRHpS1B/8I tHaGoD5wYZKdY5pdgGFaTbWe94urZ2nbd6BmLusUnRjR2g5Rf0vI5sRSqqbvof7IGs0TBrymjNqHG bzcb8nwFdnIQgUBxER+gUnzQMq8nJlfKSPcu2NF8vAiRKDaxAWXvBrJEKqvtr5Hlhsdw72LJcOOoe ngYNnfpw==; Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0HB-00Ehwg-2p for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 14:00:51 +0000 Received: by mail-pg1-x530.google.com with SMTP id 27so5776261pgy.3 for ; Tue, 18 May 2021 07:00:47 -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=rDm2tFUKCNBZpJlH4TnUOedGN/6P6Y46H8CLpCWjStg=; b=M+jYsxh2xtRurMs3Ac5hNherqf6/jD8Cal9sw4PnIwrNja6zm0HzJvRvl+OjAHapNm B6DALfEt1RbOYeuUdghL1acmujV5U0wyxNfMg3d4xm0f+iT9T1dStyJMJJt10DRRqoXT GuH79kKfLpVX/Fv1ZBhB3+S8Jj3XgAmD90UKu09To9rfiqBEorN+QrDlFc7RIm3DKb94 BwwJhnseHRz7MDetarIfXpGAGxtkqWxrgAxn81llLStQDCHL+DKt8TPq+3UFjWVDlxOW k+kQ532NLAwI5XX+9NKl+wcwr6gZ932MICx6NFy03+km04YAsSRuqSJ69X1YwGA1hL1E CDfw== 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=rDm2tFUKCNBZpJlH4TnUOedGN/6P6Y46H8CLpCWjStg=; b=M6hCi9BRDyd8ZoP9g9vJp8XDMM6M38YrUnolmDYLRdtI9ep/lXTkFzoyWGMCEhrWPM E4mpihm6VHExeNktYUhuZsboObszMc+M1VwQsD8KYFVqd0VSP+YDF+Peok3vjf149wFM T1zUrOxl20ccMV0w5hFxlO5Gnsa1RtKli+x9lTah0Uwttmmhdc22G4gHD0qDL4BcFRhM uut49NTcnXJryzoreFKXG8l/7CXbb5GS7cPtZR/u1cF4G/NlOFZPOJ2bklOu7xaLPdTO GJwlzlEOyxuXeZQIQlfY0KKwnLhSk3WpHoSI36YlguelNiFDAvF+pPqcOrsiGQUWcBcd L1dg== X-Gm-Message-State: AOAM530X1Kl2lOH2Ww3AGQWQ0asvdQ5EfGB2Ju4pK/nUPR16QGVF+ffJ fA6QSWu5ok3nZeQx5gIHqT2WPA== X-Google-Smtp-Source: ABdhPJxRFRs5gNrTogbOUaW+5wntyRe93wyjJvzuncihmD+3yBYfJFVitbMmg3cVTrXRlNuOsqSBHQ== X-Received: by 2002:a63:ed41:: with SMTP id m1mr5229179pgk.252.1621346447074; Tue, 18 May 2021 07:00:47 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([204.124.180.30]) by smtp.gmail.com with ESMTPSA id j27sm13662526pgb.54.2021.05.18.07.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 07:00:46 -0700 (PDT) Date: Tue, 18 May 2021 22:00:40 +0800 From: Leo Yan To: Denis Nikitin Cc: Mathieu Poirier , 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: <20210518140040.GC942578@leoy-ThinkPad-X240s> References: <20210421120413.3110775-1-daniel.kiss@arm.com> <20210426175425.GA1391779@xps15> <20210427154746.GA1422814@xps15> <20210427160443.GA208852@leoy-ThinkPad-X240s> <20210505152919.GA1766375@xps15> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_070049_156870_18355397 X-CRM114-Status: GOOD ( 25.30 ) 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 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. 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