# Re: \[PATCH v12 08/11\] perf tools: Minimal CALLCHAIN\_DEFERRED support

- From: Jens Remus \<hidden\>
- Date: 2025-07-02 12:23:58 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/07/3117502
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/07/3116251/t.md

```text
Hello Steve!

On 01.07.2025 20:04, Steven Rostedt wrote:
> From: Namhyung Kim <namhyung@kernel.org>
> 
> Add a new event type for deferred callchains and a new callback for the
> struct perf_tool.  For now it doesn't actually handle the deferred
> callchains but it just marks the sample if it has the PERF_CONTEXT_
> USER_DEFFERED in the callchain array.

> diff --git a/tools/lib/perf/include/perf/event.h b/tools/lib/perf/include/perf/event.h

> @@ -151,6 +151,12 @@ struct perf_record_switch {
>  	__u32			 next_prev_tid;
>  };
>  
> +struct perf_record_callchain_deferred {
> +	struct perf_event_header header;

At minimum the timestamp field added to perf with "[PATCH v12 07/11]
perf: Support deferred user callchains for per CPU events" needs to be
added here as well:

	__u64			 timestamp;

Otherwise this and any subsequent enhancements of the perf tools do no
longer work at all.  But probably the timestamp field also needs to be
used for some purpose?

> +	__u64			 nr;
> +	__u64			 ips[];
> +};
> +

Thanks and regards,
Jens
-- 
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@de.ibm.com

IBM

IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/

```
