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.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 EF788C04AB1 for ; Sat, 11 May 2019 07:33:03 +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 B131C2173B for ; Sat, 11 May 2019 07:33:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qhiXcA99"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yPwuS4Or" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B131C2173B 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:Cc: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:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=06ds3GiqgPigK8RJj5CvIuu6FSwWwJMxml4QUBTfvYY=; b=qhiXcA99Nc2Bdr LDyYaHkSIJ9gxJHB1MPLtzKRa2gMZ7tvv1XYU6aOT5563zBsnkt3kybWRJvhJwG5unjwsub2KR96l 2HAYvdl8VM3vpwt60MrExU00k9ARZcft64lXuEBC1I4U/yEhndyadOp4rHOIgAbDlvvBBKAB/LZMC Ct6m/S2+faYK/3Ihnm9yLkxMP3OuY+FPNAPY7mk1a/V2Rbxn+jtdgJsEkixzJObUv3ikSg1Le34cG SvGW6uRfkBABGcjuYYfHXhk3d80ods1KHnR+x2mfFjfiGZp8Ap68eGUfdjpSPKjBIkiAV+A3VpMjU bhuXPSOQzS7wk4jz+zTQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPMV6-0005pR-Vf; Sat, 11 May 2019 07:32:56 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPMV0-0005p1-AY for linux-arm-kernel@lists.infradead.org; Sat, 11 May 2019 07:32:51 +0000 Received: by mail-pg1-x541.google.com with SMTP id t187so4092668pgb.13 for ; Sat, 11 May 2019 00:32:49 -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:user-agent; bh=+ksfCNh+4KH9uw/jweW2n7UtifV0NBPC440whlqdjmk=; b=yPwuS4OrCRmR/SZ4XA+yJynBW2t33nTOHgfHNOgVptqFSAsT+kSCeDnmWOAYYbjGA9 O+qQW4zMu5aB2V5ZkOeUsLtQNYNSSoWrYTpzneGRymnLhV2oXAqoGY8npWNSALxl2cRF QUGhoWTQXV5/LzAzIjwgFc79XGscAIJ7sHlkBcD6wksHiZqWG3ljnIm1mxvYJb4at1xG LoIbf3j1WAfGvzyiAHrKt3W2vI2kukGfCR4dJHb9RcRH6eqdMqxVStJOekPVtMV+EmI+ PT6GYEsr9hw7OI1GLVn/mLLma0aX6Imw8f3HXDwHvSn/bv/H+/kD5w/h5CBMB0nAxj8n a3xQ== 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:user-agent; bh=+ksfCNh+4KH9uw/jweW2n7UtifV0NBPC440whlqdjmk=; b=A5e9dqGUrdAdn0trid+5aTLx57k5hXeJMfuERXHxiSuvUOZlAyJk5IK09l2PsGSRte +8tfUwaf+9jTu2xSjX6g4dHTEjzwmDrNXSMmGfVR5Da061D4z4P8jSSMjogNmsCIcw4I jiLu+j329UPmmvZU2lMvoJD6rC6eCsZkf1SR9uvHEj3VMzsTmg+xc26m412Y2fgcooru haqW5sg42oW9CajyDYgWA2g5HfW2R3r4UNaH6vKOhprXBLfnomshi84gS3T8VdG6Bcf7 bpdD+fmKJRq5TutCsAIMq56/ZMemM/HlN00KWhFEmsI1Hlosg6PJywmbuF6Zw2b1UcTt +fDg== X-Gm-Message-State: APjAAAU1xvoVVOi5viTo+b7TURIibhT8MevYuojDAYr27cz+Mxhimfhh 4G2IZk8/2dGEMRNez5tfzrSoEof68/xewSuG X-Google-Smtp-Source: APXvYqxCM/mSGf1Lq9R+GZu4xviXjinW1khK2m/EVD/8a2VUj0IxiuFO3E/nZFmOZRwK1K4qF1NkYQ== X-Received: by 2002:a63:9d83:: with SMTP id i125mr14164953pgd.229.1557559968195; Sat, 11 May 2019 00:32:48 -0700 (PDT) Received: from leoy-ThinkPad-X240s (li253-4.members.linode.com. [173.255.243.4]) by smtp.gmail.com with ESMTPSA id q17sm21668798pfi.185.2019.05.11.00.32.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 May 2019 00:32:47 -0700 (PDT) Date: Sat, 11 May 2019 15:32:29 +0800 From: Leo Yan To: Mathieu Poirier Subject: Re: [PATCH 5/5] docs: coresight: Document snapshot mode Message-ID: <20190511073229.GA18064@leoy-ThinkPad-X240s> References: <20190501175052.29667-1-mathieu.poirier@linaro.org> <20190501175052.29667-6-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190501175052.29667-6-mathieu.poirier@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-20190511_003250_428045_F8A77A3E X-CRM114-Status: GOOD ( 14.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: corbet@lwn.net, alexander.shishkin@linux.intel.com, coresight@lists.linaro.org, suzuki.poulose@arm.com, acme@kernel.org, peterz@infradead.org, mingo@redhat.com, mike.leach@arm.com, linux-arm-kernel@lists.infradead.org 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 On Wed, May 01, 2019 at 11:50:52AM -0600, Mathieu Poirier wrote: [...] > +2.2) Snapshot mode: > + > +Using perf's built-in snapshot mode with CoreSight tracers is supported - to > +do so the '-S' command line option needs to be specified. Since current sink > +devices are used in double-buffer mode when operated from the perf interface, > +the size of the perf ring buffer needs to be adjusted to match the size of the > +buffer used by the CoreSight sinks. From the perf command line it is possible > +to specify the number of pages to use for a session using the '-m,X' option, > +where X is the amount of pages. > + > +The system memory buffer used by ETR devices is automatically adjusted > +to match the size of the perf ring buffer and as such does not need to be > +modified on the perf command line. For ETB and ETF devices the perf ring > +buffer size need to be adjusted to match the size of the internal buffer. > + > +The following examples assume a system page size of 4096 byte: > + > + # cat /sys/bus/coresight/devices/20010000.etb/mgmt/rdp > + 0x2000 > + # perf record -e cs_etm/@20010000.etf/ -S -m,8 --per-thread $APP In this case it shows the usage for etb, thus should: s/20010000.etf/20010000.etb/ BTW, the user needs to convert the rdp to byte size with multiplying 4, it's good to explain for this in the doc or give related info in the driver warning log. Thanks, Leo Yan > + # cat /sys/bus/coresight/devices/20010000.etf/buffer_size > + 0x10000 > + # perf record -e cs_etm/@20010000.etf/ -S -m,16 --per-thread $APP > + > + # perf record -e cs_etm/@20070000.etr/ -S --per-thread $APP > + > +Once an application is launched trace snapshot are collected by sending the > +USR2 message to the process being monitored: > + > + # perf record -e cs_etm/@20070000.etr/ -S --per-thread $APP & > + [1] 14808 > + # kill -USR2 14808 > + ... > + ... > + # kill -USR2 14808 > + ... > + ... > + # kill 14808 > + > > How to use the STM module > ------------------------- > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel