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=-8.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable 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 9FCCBC04AB5 for ; Mon, 3 Jun 2019 19:01:49 +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 74A2C26F1D for ; Mon, 3 Jun 2019 19:01:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qGqePi2Q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mu8+YrUW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74A2C26F1D 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=Z7YDg3Dz1lYitgc2xgb+PSDH/9ssdlu2l9EyKJAsGAw=; b=qGqePi2QemxyRG 29t9UEQs8NrbHxWMSKcLGEDm02YhtHPDsqr0V5NARNwBgixHmwP8qJpt3Gy2Qp+H3mEHqEagP348Q LyhCWJgl88MeExmpaOKJ499fiqbTRaGuFIciCcE8nbUWCkr63p4SJQ0FbdlXjWNx7qJfFYwVBkRo4 rsN/YEJ+ka8YUEKUJMnjCTrZWg1Tssdczd8aNxgNxJHH7Jfe2/Ai2QPRsTPOO4mOzw45lKBbNZhMz iOBhJBvvNB5CjqgLGC2DQw+jkJ0XLzkmR3IWqciggX+IaKtLoWhjl2gCq5cCiBsTij8+yuW7gVOPt afW+um5gLjOe0tCagesQ==; 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 1hXsDG-0002eT-R3; Mon, 03 Jun 2019 19:01:42 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXsDD-0002dp-Qu for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2019 19:01:41 +0000 Received: by mail-pl1-x644.google.com with SMTP id i2so2991617plt.1 for ; Mon, 03 Jun 2019 12:01:36 -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=uOj8qS4yMWJcPzBr8jU/oW2KYVngTdjQDL1LJv/Tl0k=; b=mu8+YrUWQdYC2yPvI31aJeWbUy+/m/JdlBnvxPwbPgA4aR3Dko6HDsZHyi2HsBRRA8 5ZlaLTjxNM68Al1YETdnGXAFwRlrElG6NZZ1j8Hx4UVHJ3hcuZD5Y/7VqGQRirguL3N7 ccmPcVkphF2ROPyPYGWb6oqTC7KpewSiRiDXKJGxCopyHEAW0lSbHXCTbSbo40S30gSm UrgWiQJ9MzEPZG4NWjrakLfjBSt+eTyVA+31+Grrka+qDfU5BzOXXSXNlVKnOEoumMGs c9QGJJG4EXRd5w2FiwIHepI++jpU4ZPuUEBJf4WhgSmpKyN4NxdhbypbTGeXH38oeMkA 5P+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:user-agent; bh=uOj8qS4yMWJcPzBr8jU/oW2KYVngTdjQDL1LJv/Tl0k=; b=IMxKmFG5mZMjrxLHi+R8rBvlAhBbwDjO7ZQMjv3C87vAsIXq2JPUx/W3DiaLmFDMrX pNoSCnDN2hxh8turemUNmSfcfO24cIrH/R80XWtXWaQeUcAqBMWbpqEwTs11QLOXqIQU akzpUn219+NMSxIFEK7ccTaefls+6xZQxI2l8VrwE42rDRwT+rxJVVFfDGk/DF6YNyL/ 3KhYbbjrsfuVYZL1BNrUr6u8RGn7lhWMo0BwlZld8NzS6mnDYhb4sYYT+gl2xB52CZiX oF0spkc8aj7dWHUJyKcsy5bOuKKtGd0a60cwjHJukboKXeL4JKzmE/DF5jQzmT3p9xQi 6KPQ== X-Gm-Message-State: APjAAAUNCf0THZ12OkEuGzADKl7vc455jEgy4BZpWBnFiHA09dQhnUFL ED9WV1A2fxmwPhg0zodZMGsU5w== X-Google-Smtp-Source: APXvYqykPgkSoXQZvF7692GpCMJ2OMiNKz9Vibqh/vST8wLXn0EjIfLgD7N96K2Ny86xOMvDMWXBGw== X-Received: by 2002:a17:902:bc83:: with SMTP id bb3mr9026727plb.56.1559588495811; Mon, 03 Jun 2019 12:01:35 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id 24sm17259787pgn.32.2019.06.03.12.01.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jun 2019 12:01:35 -0700 (PDT) Date: Mon, 3 Jun 2019 13:01:33 -0600 From: Mathieu Poirier To: Suzuki K Poulose Subject: Re: [PATCH] Documentation: coresight: Update the generic device names Message-ID: <20190603190133.GA20462@xps15> References: <1559229077-26436-1-git-send-email-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1559229077-26436-1-git-send-email-suzuki.poulose@arm.com> 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-20190603_120139_945017_F52DF152 X-CRM114-Status: GOOD ( 22.34 ) 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: coresight@lists.linaro.org, Jonathan Corbet , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, leo.yan@linaro.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 Hi Suzuki, On Thu, May 30, 2019 at 04:11:17PM +0100, Suzuki K Poulose wrote: > Update the documentation to reflect the new naming scheme with > latest changes. > > Reported-by: Leo Yan > Cc: Mathieu Poirier > Cc: Jonathan Corbet > Signed-off-by: Suzuki K Poulose > --- > Documentation/trace/coresight.txt | 34 +++++++++++++++++++--------------- > 1 file changed, 19 insertions(+), 15 deletions(-) > > diff --git a/Documentation/trace/coresight.txt b/Documentation/trace/coresight.txt > index efbc832..7b427cf 100644 > --- a/Documentation/trace/coresight.txt > +++ b/Documentation/trace/coresight.txt > @@ -326,16 +326,20 @@ amount of processor cores), the "cs_etm" PMU will be listed only once. > A Coresight PMU works the same way as any other PMU, i.e the name of the PMU is > listed along with configuration options within forward slashes '/'. Since a > Coresight system will typically have more than one sink, the name of the sink to > -work with needs to be specified as an event option. Names for sink to choose > -from are listed in sysFS under ($SYSFS)/bus/coresight/devices: > +work with needs to be specified as an event option. > +On newer kernels the available sinks are listed in sysFS under: > +($SYSFS)/bus/event_source/devices/cs_etm/sinks/ > > - root@linaro-nano:~# ls /sys/bus/coresight/devices/ > - 20010000.etf 20040000.funnel 20100000.stm 22040000.etm > - 22140000.etm 230c0000.funnel 23240000.etm 20030000.tpiu > - 20070000.etr 20120000.replicator 220c0000.funnel > - 23040000.etm 23140000.etm 23340000.etm > + root@localhost:/sys/bus/event_source/devices/cs_etm/sinks# ls > + tmc_etf0 tmc_etr0 tpiu0 > > - root@linaro-nano:~# perf record -e cs_etm/@20070000.etr/u --per-thread program > +On older kernels, this may need to be found from the list of coresight devices, > +available under ($SYSFS)/bus/coresight/devices/: > + > + root@localhost:/sys/bus/coresight/devices# ls > + etm0 etm1 etm2 etm3 etm4 etm5 funnel0 funnel1 funnel2 replicator0 stm0 tmc_etf0 tmc_etr0 tpiu0 > + > + root@linaro-nano:~# perf record -e cs_etm/@tmc_etr0/u --per-thread program On the "older" kernels you are referring to one would find the original naming convention. Everything else looks good to me. Mathieu > > The syntax within the forward slashes '/' is important. The '@' character > tells the parser that a sink is about to be specified and that this is the sink > @@ -352,7 +356,7 @@ perf can be used to record and analyze trace of programs. > Execution can be recorded using 'perf record' with the cs_etm event, > specifying the name of the sink to record to, e.g: > > - perf record -e cs_etm/@20070000.etr/u --per-thread > + perf record -e cs_etm/@tmc_etr0/u --per-thread > > The 'perf report' and 'perf script' commands can be used to analyze execution, > synthesizing instruction and branch events from the instruction trace. > @@ -381,7 +385,7 @@ sort example is from the AutoFDO tutorial (https://gcc.gnu.org/wiki/AutoFDO/Tuto > Bubble sorting array of 30000 elements > 5910 ms > > - $ perf record -e cs_etm/@20070000.etr/u --per-thread taskset -c 2 ./sort > + $ perf record -e cs_etm/@tmc_etr0/u --per-thread taskset -c 2 ./sort > Bubble sorting array of 30000 elements > 12543 ms > [ perf record: Woken up 35 times to write data ] > @@ -405,7 +409,7 @@ than the program flow through the code. > As with any other CoreSight component, specifics about the STM tracer can be > found in sysfs with more information on each entry being found in [1]: > > -root@genericarmv8:~# ls /sys/bus/coresight/devices/20100000.stm > +root@genericarmv8:~# ls /sys/bus/coresight/devices/stm0 > enable_source hwevent_select port_enable subsystem uevent > hwevent_enable mgmt port_select traceid > root@genericarmv8:~# > @@ -413,14 +417,14 @@ root@genericarmv8:~# > Like any other source a sink needs to be identified and the STM enabled before > being used: > > -root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20010000.etf/enable_sink > -root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/20100000.stm/enable_source > +root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink > +root@genericarmv8:~# echo 1 > /sys/bus/coresight/devices/stm0/enable_source > > From there user space applications can request and use channels using the devfs > interface provided for that purpose by the generic STM API: > > -root@genericarmv8:~# ls -l /dev/20100000.stm > -crw------- 1 root root 10, 61 Jan 3 18:11 /dev/20100000.stm > +root@genericarmv8:~# ls -l /dev/stm0 > +crw------- 1 root root 10, 61 Jan 3 18:11 /dev/stm0 > root@genericarmv8:~# > > Details on how to use the generic STM API can be found here [2]. > -- > 2.7.4 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel