Skip to contentSkip to conversation

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

PATCH New Steven Rostedt 1 participant 1 message Apr 11, 2025

lore
Share & tools
lore
#0 lore raw

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

From: "Steven Rostedt (Google)" <[email protected]>

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"")
---
 src/tracefs-filter.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
src/tracefs-filter.c +3 -2
index f1de372..3b0933f 100644
@@ -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 = {
Signature · 1 line
2.47.2