From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
mike.leach@linaro.org, leo.yan@linaro.org, tamas.zsoldos@arm.com,
jinlmao@qti.qualcomm.com, al.grant@arm.com, denik@google.com
Subject: Re: [PATCH v3 05/10] coresight: trbe: Drop duplicate TRUNCATE flags
Date: Wed, 22 Sep 2021 10:34:36 -0600 [thread overview]
Message-ID: <20210922163436.GB2129167@p14s> (raw)
In-Reply-To: <47f5a2cd-c435-7804-c3ff-06b8d266ee9b@arm.com>
On Wed, Sep 15, 2021 at 10:56:17AM +0530, Anshuman Khandual wrote:
>
>
> On 9/14/21 3:56 PM, Suzuki K Poulose wrote:
> > We mark the buffer as TRUNCATED when there is no space left
> > in the buffer. But we do it at different points.
> > __trbe_normal_offset()
> > and also, at all the callers of the above function via
> > compute_trbe_buffer_limit(), when the limit == base (i.e
> > offset = 0 as returned by the __trbe_normal_offset()).
> >
> > So, given that the callers already mark the buffer as TRUNCATED
> > drop the caller inside the __trbe_normal_offset().
> >
> > This is in preparation to moving the handling of TRUNCATED
> > into a central place.
> >
> > Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> > Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> > Cc: Mike Leach <mike.leach@linaro.org>
> > Cc: Leo Yan <leo.yan@linaro.org>
> > Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>
> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
>
> A small nit though.
>
> > ---
> > Change since v2:
> > - Added the flag for trbe_handle_spurious() - Anshuman
> > ---
> > drivers/hwtracing/coresight/coresight-trbe.c | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c
> > index 81bf183a73a1..5297b11f26b7 100644
> > --- a/drivers/hwtracing/coresight/coresight-trbe.c
> > +++ b/drivers/hwtracing/coresight/coresight-trbe.c
> > @@ -252,13 +252,9 @@ static unsigned long __trbe_normal_offset(struct perf_output_handle *handle)
> > * trbe_base trbe_base + nr_pages
> > *
> > * Perf aux buffer does not have any space for the driver to write into.
> > - * Just communicate trace truncation event to the user space by marking
> > - * it with PERF_AUX_FLAG_TRUNCATED.
>
> Should not this comment be moved, where PERF_AUX_FLAG_TRUNCATED
> gets marked after this change ?
I moved the comment and applied this patch.
>
> > */
> > - if (!handle->size) {
> > - perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);
> > + if (!handle->size)
> > return 0;
> > - }
> >
> > /* Compute the tail and wakeup indices now that we've aligned head */
> > tail = PERF_IDX2OFF(handle->head + handle->size, buf);
> > @@ -360,7 +356,6 @@ static unsigned long __trbe_normal_offset(struct perf_output_handle *handle)
> > return limit;
> >
> > trbe_pad_buf(handle, handle->size);
> > - perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);
> > return 0;
> > }
> >
> > @@ -688,6 +683,7 @@ static void trbe_handle_spurious(struct perf_output_handle *handle)
> > buf->trbe_write = buf->trbe_base + PERF_IDX2OFF(handle->head, buf);
> > if (buf->trbe_limit == buf->trbe_base) {
> > trbe_drain_and_disable_local();
> > + perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);
> > return;
> > }
> > trbe_enable_hw(buf);
> >
_______________________________________________
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:[~2021-09-22 16:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 10:26 [PATCH v3 00/10] coresight: TRBE and Self-Hosted trace fixes Suzuki K Poulose
2021-09-14 10:26 ` [PATCH v3 01/10] coresight: etm4x: Save restore TRFCR_EL1 Suzuki K Poulose
2021-09-21 15:50 ` Mathieu Poirier
2021-09-14 10:26 ` [PATCH v3 02/10] coresight: etm4x: Use Trace Filtering controls dynamically Suzuki K Poulose
2021-09-15 4:59 ` Anshuman Khandual
2021-09-14 10:26 ` [PATCH v3 03/10] coresight: etm-pmu: Ensure the AUX handle is valid Suzuki K Poulose
2021-09-14 10:26 ` [PATCH v3 04/10] coresight: trbe: Ensure the format flag is set always Suzuki K Poulose
2021-09-15 5:15 ` Anshuman Khandual
2021-09-22 16:33 ` Mathieu Poirier
2021-09-14 10:26 ` [PATCH v3 05/10] coresight: trbe: Drop duplicate TRUNCATE flags Suzuki K Poulose
2021-09-15 5:26 ` Anshuman Khandual
2021-09-22 16:34 ` Mathieu Poirier [this message]
2021-09-14 10:26 ` [PATCH v3 06/10] coresight: trbe: Fix handling of spurious interrupts Suzuki K Poulose
2021-09-15 5:44 ` Anshuman Khandual
2021-09-21 17:24 ` Mathieu Poirier
2021-09-21 21:29 ` Suzuki K Poulose
2021-09-22 17:13 ` Mathieu Poirier
2021-09-14 10:26 ` [PATCH v3 07/10] coresight: trbe: Do not truncate buffer on IRQ Suzuki K Poulose
2021-09-15 6:44 ` Anshuman Khandual
2021-09-21 17:41 ` Mathieu Poirier
2021-09-21 17:50 ` Mathieu Poirier
2021-09-14 10:26 ` [PATCH v3 08/10] coresight: trbe: Unify the enabling sequence Suzuki K Poulose
2021-09-22 16:56 ` Mathieu Poirier
2021-09-14 10:26 ` [PATCH v3 09/10] coresight: trbe: End the AUX handle on truncation Suzuki K Poulose
2021-09-14 10:26 ` [PATCH v3 10/10] coresight: trbe: Prohibit trace before disabling TRBE Suzuki K Poulose
2021-09-15 6:58 ` Anshuman Khandual
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=20210922163436.GB2129167@p14s \
--to=mathieu.poirier@linaro.org \
--cc=al.grant@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=coresight@lists.linaro.org \
--cc=denik@google.com \
--cc=jinlmao@qti.qualcomm.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mike.leach@linaro.org \
--cc=suzuki.poulose@arm.com \
--cc=tamas.zsoldos@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