[PATCH 03/25] perf/core: Export output copy helpers for CoreSight

James Clark james.clark at linaro.org
Fri Oct 16 06:30:41 PDT 2026



On 15/09/2026 16:48, Leo Yan wrote:
> CoreSight AUX sampling needs perf_output_copy_aux() to copy trace data
> into samples and perf_output_copy() to prepend zero bytes when the
> available trace is shorter than the requested snapshot.
> 
> Export both helpers so the CoreSight snapshot_aux() callback can use
> them when CONFIG_CORESIGHT=m.
> 
> Assisted-by: Codex:gpt-6
> Signed-off-by: Leo Yan <leo.yan at arm.com>
> ---
>   kernel/events/ring_buffer.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
> index 1b1ffe0533e58a9d976d0eb0fc23e09d5936da2b..e69ea5b077a5e94b5b6bb1f4c6f0ca5b8a94a6cc 100644
> --- a/kernel/events/ring_buffer.c
> +++ b/kernel/events/ring_buffer.c
> @@ -298,6 +298,7 @@ unsigned int perf_output_copy(struct perf_output_handle *handle,
>   {
>   	return __output_copy(handle, buf, len);
>   }
> +EXPORT_SYMBOL_GPL(perf_output_copy);
>   
>   unsigned int perf_output_skip(struct perf_output_handle *handle,
>   			      unsigned int len)
> @@ -617,6 +618,7 @@ long perf_output_copy_aux(struct perf_output_handle *aux_handle,
>   
>   	return len;
>   }
> +EXPORT_SYMBOL_GPL(perf_output_copy_aux);
>   
>   #define PERF_AUX_GFP	(GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN | __GFP_NORETRY)
>   
> 

Reviewed-by: James Clark <james.clark at linaro.org>




More information about the linux-arm-kernel mailing list