blob: 598f5a7efaa94afe25d1bfca671c63e7a8d1f137 [file] [log] [blame]
Patrick Williamsda295312023-12-05 16:48:56 -06001From 4f32efe70b618c4721bf197692fc9d709d352528 Mon Sep 17 00:00:00 2001
2From: Kienan Stewart <kstewart@efficios.com>
3Date: Mon, 20 Nov 2023 11:27:12 -0500
4Subject: [PATCH 1/2] fix: phys_proc_id and cpu_core_id moved in linux
5 6.7.0-rc1
6
7See upstream commit:
8
9 commit 02fb601d27a7abf60d52b21bdf5b100a8d63da3f
10 Author: Thomas Gleixner <tglx@linutronix.de>
11 Date: Mon Aug 14 10:18:30 2023 +0200
12
13 x86/cpu: Move phys_proc_id into topology info
14
15 Rename it to pkg_id which is the terminology used in the kernel.
16
17 No functional change.
18
19See upstream commit:
20
21 commit e95256335d45cc965cd12c423535002974313340
22 Author: Thomas Gleixner <tglx@linutronix.de>
23 Date: Mon Aug 14 10:18:34 2023 +0200
24
25 x86/cpu: Move cpu_core_id into topology info
26
27 Rename it to core_id and stick it to the other ID fields.
28
29 No functional change.
30
31Upstream-Status: Backport [commit 4f32efe7]
32
33Signed-off-by: Kienan Stewart <kstewart@efficios.com>
34Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
35Change-Id: I574b02430210d5bb72c4b9db901d0e3a6dc7bea0
36---
37 .../instrumentation/events/lttng-statedump.h | 19 +++++++++++++++++++
38 1 file changed, 19 insertions(+)
39
40diff --git a/include/instrumentation/events/lttng-statedump.h b/include/instrumentation/events/lttng-statedump.h
41index 642aa356..4831a941 100644
42--- a/include/instrumentation/events/lttng-statedump.h
43+++ b/include/instrumentation/events/lttng-statedump.h
44@@ -253,6 +253,23 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_interrupt,
45
46 #define LTTNG_HAVE_STATEDUMP_CPU_TOPOLOGY
47
48+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,7,0))
49+LTTNG_TRACEPOINT_EVENT(lttng_statedump_cpu_topology,
50+ TP_PROTO(struct lttng_kernel_session *session, struct cpuinfo_x86 *c),
51+ TP_ARGS(session, c),
52+ TP_FIELDS(
53+ ctf_string(architecture, "x86")
54+ ctf_integer(uint16_t, cpu_id, c->cpu_index)
55+ ctf_string(vendor, c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown")
56+ ctf_integer(uint8_t, family, c->x86)
57+ ctf_integer(uint8_t, model, c->x86_model)
58+ ctf_string(model_name, c->x86_model_id[0] ? c->x86_model_id : "unknown")
59+ ctf_integer(uint16_t, physical_id, c->topo.pkg_id)
60+ ctf_integer(uint16_t, core_id, c->topo.core_id)
61+ ctf_integer(uint16_t, cores, c->booted_cores)
62+ )
63+)
64+#else
65 LTTNG_TRACEPOINT_EVENT(lttng_statedump_cpu_topology,
66 TP_PROTO(struct lttng_kernel_session *session, struct cpuinfo_x86 *c),
67 TP_ARGS(session, c),
68@@ -268,6 +285,8 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_cpu_topology,
69 ctf_integer(uint16_t, cores, c->booted_cores)
70 )
71 )
72+#endif /* LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,7,0) */
73+
74 #endif /* CONFIG_X86_32 || CONFIG_X86_64 */
75
76 #endif /* LTTNG_TRACE_LTTNG_STATEDUMP_H */
77--
782.34.1
79