Message ID | 20220131163642.2754485-5-rostedt@goodmis.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 9c16318b52e54aa38843d7b1b280e63022a18ba5 |
Headers | show |
Series | libtracefs: synthetic event fixes | expand |
diff --git a/src/tracefs-hist.c b/src/tracefs-hist.c index ec63b88a0bca..e7dd279ae3f9 100644 --- a/src/tracefs-hist.c +++ b/src/tracefs-hist.c @@ -841,6 +841,15 @@ static char *add_synth_field(const struct tep_format_field *field, return append_string(str, NULL, "];"); } + /* Synthetic events understand pid_t, gfp_t and bool */ + if (strcmp(field->type, "pid_t") == 0 || + strcmp(field->type, "gfp_t") == 0 || + strcmp(field->type, "bool") == 0) { + str = strdup(field->type); + str = append_string(str, " ", name); + return append_string(str, NULL, ";"); + } + sign = field->flags & TEP_FIELD_IS_SIGNED; switch (field->size) {