diff mbox series

libtacefs: Fix COMM for use as a field for tracefs_sqlhist()

Message ID 20250410213257.5e3550fd@gandalf.local.home (mailing list archive)
State Accepted
Commit 48a7752c651dd0f176e18afc44db0f911454deff
Headers show
Series libtacefs: Fix COMM for use as a field for tracefs_sqlhist() | expand

Commit Message

Steven Rostedt April 11, 2025, 1:32 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The COMM was added to be used as a filter, but it can also be used as a
field. In order to do that, the type must be correct. The type should just
be "char" and the array type should be a dynamic array.

Fixes: 9098ab0d ("libtracefs: Allow filters to use "COMM"")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 src/tracefs-filter.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/tracefs-filter.c b/src/tracefs-filter.c
index f1de372..3b0933f 100644
--- a/src/tracefs-filter.c
+++ b/src/tracefs-filter.c
@@ -36,9 +36,10 @@  static const struct tep_format_field common_timestamp_usecs = {
 };
 
 static const struct tep_format_field common_comm = {
-	.type			= "char *",
+	.type			= "char",
 	.name			= "common_comm",
-	.size			= 16,
+	.size			= 4,
+	.flags			= TEP_FIELD_IS_ARRAY | TEP_FIELD_IS_DYNAMIC,
 };
 
 const struct tep_format_field tfs_common_stacktrace __hidden = {