[lkml]   [2020]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[RFC 08/11] coresight: etm-perf: Truncate the perf record if handle has no space
While starting off the etm event, just abort and truncate the perf record
if the perf handle as no space left. This avoids configuring both source
and sink devices in case the data cannot be consumed in perf.

Signed-off-by: Anshuman Khandual <>
drivers/hwtracing/coresight/coresight-etm-perf.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
index ea73cfa..534e205 100644
--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -347,6 +347,9 @@ static void etm_event_start(struct perf_event *event, int flags)
if (!event_data)
goto fail;

+ if (!handle->size)
+ goto fail_end_stop;
* Check if this ETM is allowed to trace, as decided
* at etm_setup_aux(). This could be due to an unreachable
 \ /
  Last update: 2020-11-10 13:46    [W:0.211 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site