[PATCH] libtacefs: Fix COMM for use as a field for tracefs_sqlhist()
Steven Rostedt <[email protected]> Thu, 10 Apr 2025 21:32:57 -0400
| Newsgroups | org.kernel.vger.linux-trace-devel |
|---|---|
| Message-ID | <[email protected]> |
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"") Signed-off-by: Steven Rostedt (Google) <[email protected]> --- src/tracefs-filter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 = { -- 2.47.2