From: Bruce Ashfield via lttng-dev <lttng-dev@lists.lttng.org>
To: lttng-dev@lists.lttng.org
Subject: [lttng-dev] [PATCH 1/3] statedump: adjust to v6.7 cpu topology struct
Date: Thu, 23 Nov 2023 14:32:47 -0500 [thread overview]
Message-ID: <20231123193249.3190764-1-bruce.ashfield@gmail.com> (raw)
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Adjusting the statedump to the following upstream commits:
commit b9655e702dc5 [x86/cpu: Encapsulate topology information in cpuinfo_x86]
commit e95256335d45 [x86/cpu: Move cpu_core_id into topology info]
commit 02fb601d27a7 [x86/cpu: Move phys_proc_id into topology info]
We now have the topo struct, as well as some minor member name
changes.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
Someone else may or may not already have this in flight,
but I didn't see anything on the list or in the git
repo.
I ran into this failure when working on the v6.7-rc
kernel as part of yocto project kernel updates.
Tweak as necessary, as I'm no expert in the right way
to version these sort of changes.
Bruce
include/instrumentation/events/lttng-statedump.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/instrumentation/events/lttng-statedump.h b/include/instrumentation/events/lttng-statedump.h
index 642aa356..5f52a29c 100644
--- a/include/instrumentation/events/lttng-statedump.h
+++ b/include/instrumentation/events/lttng-statedump.h
@@ -263,8 +263,13 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_cpu_topology,
ctf_integer(uint8_t, family, c->x86)
ctf_integer(uint8_t, model, c->x86_model)
ctf_string(model_name, c->x86_model_id[0] ? c->x86_model_id : "unknown")
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(6,7,0))
ctf_integer(uint16_t, physical_id, c->phys_proc_id)
ctf_integer(uint16_t, core_id, c->cpu_core_id)
+#else
+ ctf_integer(uint16_t, physical_id, c->topo.pkg_id)
+ ctf_integer(uint16_t, core_id, c->topo.core_id)
+#endif
ctf_integer(uint16_t, cores, c->booted_cores)
)
)
--
2.34.1
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next reply other threads:[~2023-11-23 19:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 19:32 Bruce Ashfield via lttng-dev [this message]
2023-11-23 19:32 ` [lttng-dev] [PATCH 2/3] wrapper/fdtable: adjust fd lookup to v6.7+ Bruce Ashfield via lttng-dev
2023-11-23 19:32 ` [lttng-dev] [PATCH 3/3] vmscan: drop isolate_mode (v6.7+) Bruce Ashfield via lttng-dev
2023-11-23 19:49 ` Kienan Stewart via lttng-dev
2023-11-23 19:56 ` Bruce Ashfield via lttng-dev
2023-11-23 20:24 ` Kienan Stewart via lttng-dev
2023-11-28 19:55 ` Kienan Stewart via lttng-dev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231123193249.3190764-1-bruce.ashfield@gmail.com \
--to=lttng-dev@lists.lttng.org \
--cc=bruce.ashfield@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox