[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1605012309-24812-9-git-send-email-anshuman.khandual@arm.com>
Date: Tue, 10 Nov 2020 18:15:06 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: linux-arm-kernel@...ts.infradead.org, coresight@...ts.linaro.org
Cc: linux-kernel@...r.kernel.org, suzuki.poulose@....com,
mathieu.poirier@...aro.org, mike.leach@...aro.org,
Anshuman Khandual <anshuman.khandual@....com>
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 <anshuman.khandual@....com>
---
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
--
2.7.4
Powered by blists - more mailing lists