public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
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
Subject: Re: [PATCH 5/5] docs: coresight: Document snapshot mode
Date: Sat, 11 May 2019 15:32:29 +0800	[thread overview]
Message-ID: <20190511073229.GA18064@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <20190501175052.29667-6-mathieu.poirier@linaro.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

  reply	other threads:[~2019-05-11  7:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 17:50 [PATCH 0/5] coresight: Fix snapshot mode Mathieu Poirier
2019-05-01 17:50 ` [PATCH 1/5] coresight: Fix buffer size in " Mathieu Poirier
2019-05-07  7:38   ` Leo Yan
2019-05-07 17:24     ` Mathieu Poirier
2019-05-07  8:50   ` Suzuki K Poulose
2019-05-07 20:22     ` Mathieu Poirier
2019-05-01 17:50 ` [PATCH 2/5] coresight: tmc-etf: Fix snapshot mode update function Mathieu Poirier
2019-05-07  8:13   ` Leo Yan
2019-05-07 17:16     ` Mathieu Poirier
2019-05-07  9:22   ` Suzuki K Poulose
2019-05-01 17:50 ` [PATCH 3/5] coresight: perf: Don't set the truncated flag in snapshot mode Mathieu Poirier
2019-05-07  8:29   ` Leo Yan
2019-05-07 17:44     ` Mathieu Poirier
2019-05-01 17:50 ` [PATCH 4/5] perf tools: Properly set the value of 'old' " Mathieu Poirier
2019-05-07  8:44   ` Leo Yan
2019-05-07 17:59     ` Mathieu Poirier
2019-05-01 17:50 ` [PATCH 5/5] docs: coresight: Document " Mathieu Poirier
2019-05-11  7:32   ` Leo Yan [this message]
2019-05-13  8:37     ` Suzuki K Poulose
2019-05-13 11:16       ` Leo Yan
2019-05-13 20:01         ` Mathieu Poirier
2019-05-13 20:12           ` Mathieu Poirier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190511073229.GA18064@leoy-ThinkPad-X240s \
    --to=leo.yan@linaro.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=coresight@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox