linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing: Fix trace entry and trace common fields for preempt_lazy_count
@ 2020-02-21 15:35 Jiri Olsa
  2020-02-21 15:49 ` Steven Rostedt
  0 siblings, 1 reply; 15+ messages in thread
From: Jiri Olsa @ 2020-02-21 15:35 UTC (permalink / raw)
  To: linux-rt-users
  Cc: Thomas Gleixner, Juri Lelli, Sebastian Sewior,
	Arnaldo Carvalho de Melo, Steven Rostedt

When commit 65fd07df3588 added preempt_lazy_count into 'struct trace_entry'
it did not add 4 bytes padding. Also we need to update the common fields
for tracepoint, otherwise some tools (bpftrace) stop working due to missing
common fields.

Fixes: 65fd07df3588 ("x86: Support for lazy preemption")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 include/linux/trace_events.h | 2 ++
 kernel/trace/trace_events.c  | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index f3b1ef07e4a5..51a3f5188923 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -65,6 +65,8 @@ struct trace_entry {
 	unsigned short		migrate_disable;
 	unsigned short		padding;
 	unsigned char		preempt_lazy_count;
+	unsigned char		padding1;
+	unsigned short		padding2;
 };
 
 #define TRACE_EVENT_TYPE_MAX						\
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index accaae59a762..1fe37b7aeaff 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -183,6 +183,9 @@ static int trace_define_common_fields(void)
 	__common_field(int, pid);
 	__common_field(unsigned short, migrate_disable);
 	__common_field(unsigned short, padding);
+	__common_field(unsigned char,  preempt_lazy_count);
+	__common_field(unsigned char,  padding1);
+	__common_field(unsigned short, padding2);
 
 	return ret;
 }
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-03-09 12:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 15:35 [PATCH] tracing: Fix trace entry and trace common fields for preempt_lazy_count Jiri Olsa
2020-02-21 15:49 ` Steven Rostedt
2020-02-21 16:10   ` Jiri Olsa
2020-02-21 16:21     ` Steven Rostedt
2020-02-21 16:29       ` Jiri Olsa
2020-02-21 16:50         ` Steven Rostedt
2020-02-21 16:37       ` Sebastian Andrzej Siewior
2020-02-21 17:44         ` [PATCH RT] tracing: make preempt_lazy and migrate_disable counter smaller Sebastian Andrzej Siewior
2020-02-21 19:51           ` Steven Rostedt
2020-02-21 20:20             ` Sebastian Andrzej Siewior
2020-02-21 20:49           ` Jiri Olsa
2020-02-24 10:01             ` Sebastian Andrzej Siewior
2020-02-24 11:54               ` Jiri Olsa
2020-02-24 17:01                 ` [PATCH RT v2] " Sebastian Andrzej Siewior
2020-03-09 12:30                   ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).