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 2/5] coresight: tmc-etf: Fix snapshot mode update function
Date: Tue, 7 May 2019 16:13:20 +0800 [thread overview]
Message-ID: <20190507081320.GB21730@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <20190501175052.29667-3-mathieu.poirier@linaro.org>
On Wed, May 01, 2019 at 11:50:49AM -0600, Mathieu Poirier wrote:
> When working in snapshot mode function perf_aux_output_begin()
Do you mean perf_aux_output_end() rather than perf_aux_output_begin()?
I checked perf_aux_output_begin(), it will always set 'handle->size'
to zero.
> does not set the handle->size because the size is expected to be
> deduced by the placement of the "head" and "old" pointers in user
> space. As such there is no point in trying to adjust the amount
> of data to copy to the ring buffer.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Rest looks good to me:
Reviewed-by: Leo Yan <leo.yan@linaro.org>
> ---
> drivers/hwtracing/coresight/coresight-tmc-etf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c
> index 7694833b13cb..d3025634f5e6 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c
> @@ -497,9 +497,11 @@ static unsigned long tmc_update_etf_buffer(struct coresight_device *csdev,
> /*
> * The TMC RAM buffer may be bigger than the space available in the
> * perf ring buffer (handle->size). If so advance the RRP so that we
> - * get the latest trace data.
> + * get the latest trace data. In snapshot mode none of that matters
> + * since we are expected to clobber stale data in favour of the latest
> + * traces.
> */
> - if (to_read > handle->size) {
> + if (!buf->snapshot && to_read > handle->size) {
> u32 mask = 0;
>
> /*
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-05-07 8:13 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 [this message]
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
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=20190507081320.GB21730@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