From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
anshuman.khandual@arm.com, mike.leach@linaro.org,
leo.yan@linaro.org, tamas.zsoldos@arm.com,
jinlmao@qti.qualcomm.com, al.grant@arm.com, denik@google.com,
James Clark <james.clark@arm.com>
Subject: Re: [PATCH v3 07/10] coresight: trbe: Do not truncate buffer on IRQ
Date: Tue, 21 Sep 2021 11:41:10 -0600 [thread overview]
Message-ID: <20210921174110.GD2059841@p14s> (raw)
In-Reply-To: <20210914102641.1852544-8-suzuki.poulose@arm.com>
On Tue, Sep 14, 2021 at 11:26:38AM +0100, Suzuki K Poulose wrote:
> The TRBE driver marks the AUX buffer as TRUNCATED when we get an IRQ
> on FILL event. This has rather unwanted side-effect of the event
> being disabled when there may be more space in the ring buffer.
>
> So, instead of TRUNCATE we need a different flag to indicate
> that the trace may have lost a few bytes (i.e from the point of
> generating the FILL event until the IRQ is consumed). Anyways, the
> userspace must use the size from RECORD_AUX headers to restrict
> the "trace" decoding.
>
> Using PARTIAL flag causes the perf tool to generate the
> following warning:
>
> Warning:
> AUX data had gaps in it XX times out of YY!
>
> Are you running a KVM guest in the background?
>
> which is pointlessly scary for a user. The other remaining options
> are :
> - COLLISION - Use by SPE to indicate samples collided
> - Add a new flag - Specifically for CoreSight, doesn't sound
> so good, if we can re-use something.
>
> Given that we don't already use the "COLLISION" flag, the above
> behavior can be notified using this flag for CoreSight.
>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Cc: James Clark <james.clark@arm.com>
> Cc: Mike Leach <mike.leach@linaro.org>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: Leo Yan <leo.yan@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> Changes since v2:
> - The perf tool patch for reporting collisions is queued.
> ---
> drivers/hwtracing/coresight/coresight-trbe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c
> index de99dd0aecd3..a1a15fa6c4ae 100644
> --- a/drivers/hwtracing/coresight/coresight-trbe.c
> +++ b/drivers/hwtracing/coresight/coresight-trbe.c
> @@ -612,7 +612,7 @@ static unsigned long arm_trbe_update_buffer(struct coresight_device *csdev,
> * for correct size. Also, mark the buffer truncated.
> */
> write = get_trbe_limit_pointer();
> - perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);
> + perf_aux_output_flag(handle, PERF_AUX_FLAG_COLLISION);
The rational in the changelog should be added here as a comment.
> }
>
> offset = write - base;
> @@ -705,7 +705,7 @@ static void trbe_handle_overflow(struct perf_output_handle *handle)
> * Mark the buffer as truncated, as we have stopped the trace
> * collection upon the WRAP event, without stopping the source.
> */
> - perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);
> + perf_aux_output_flag(handle, PERF_AUX_FLAG_COLLISION);
Same.
> perf_aux_output_end(handle, size);
> event_data = perf_aux_output_begin(handle, event);
> if (!event_data) {
> --
> 2.24.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:[~2021-09-21 17:43 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
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 [this message]
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=20210921174110.GD2059841@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=james.clark@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.