return arg_fmt->type == NULL ? -1 : 0;
 }
 
+static bool syscall_arg__strtoul_btf_enum(char *bf, size_t size, struct syscall_arg *arg, u64 *val)
+{
+       const struct btf_type *bt;
+       char *type = arg->parm;
+       struct btf_enum *be;
+       struct btf *btf;
+
+       trace__load_vmlinux_btf(arg->trace);
+
+       btf = arg->trace->btf;
+       if (btf == NULL)
+               return false;
+
+       if (syscall_arg_fmt__cache_btf_enum(arg->fmt, btf, type) < 0)
+               return false;
+
+       bt = arg->fmt->type;
+       be = btf_enum(bt);
+       for (int i = 0; i < btf_vlen(bt); ++i, ++be) {
+               const char *name = btf__name_by_offset(btf, be->name_off);
+               int max_len = max(size, strlen(name));
+
+               if (strncmp(name, bf, max_len) == 0) {
+                       *val = be->val;
+                       return true;
+               }
+       }
+
+       return false;
+}
+
 static size_t btf_enum_scnprintf(const struct btf_type *type, struct btf *btf, char *bf, size_t size, int val)
 {
        struct btf_enum *be = btf_enum(type);
 {
        return 0;
 }
+
+static bool syscall_arg__strtoul_btf_enum(char *bf __maybe_unused, size_t size __maybe_unused,
+                                         struct syscall_arg *arg __maybe_unused, u64 *val __maybe_unused)
+{
+       return false;
+}
 #endif // HAVE_LIBBPF_SUPPORT
 
+#define STUL_BTF_ENUM syscall_arg__strtoul_btf_enum
+
 #define STRARRAY(name, array) \
          { .scnprintf  = SCA_STRARRAY, \
            .strtoul    = STUL_STRARRAY, \
                        arg->scnprintf = SCA_FD;
                } else if (strstr(field->type, "enum") && use_btf != NULL) {
                        *use_btf = arg->is_enum = true;
+                       arg->strtoul = STUL_BTF_ENUM;
                } else {
                        const struct syscall_arg_fmt *fmt =
                                syscall_arg_fmt__find_by_name(field->name);
        return __trace__deliver_event(trace, event->event);
 }
 
-static struct syscall_arg_fmt *evsel__find_syscall_arg_fmt_by_name(struct evsel *evsel, char *arg)
+static struct syscall_arg_fmt *evsel__find_syscall_arg_fmt_by_name(struct evsel *evsel, char *arg,
+                                                                  char **type)
 {
        struct tep_format_field *field;
        struct syscall_arg_fmt *fmt = __evsel__syscall_arg_fmt(evsel);
                return NULL;
 
        for (field = evsel->tp_format->format.fields; field; field = field->next, ++fmt)
-               if (strcmp(field->name, arg) == 0)
+               if (strcmp(field->name, arg) == 0) {
+                       *type = field->type;
                        return fmt;
+               }
 
        return NULL;
 }
 
-static int trace__expand_filter(struct trace *trace __maybe_unused, struct evsel *evsel)
+static int trace__expand_filter(struct trace *trace, struct evsel *evsel)
 {
        char *tok, *left = evsel->filter, *new_filter = evsel->filter;
 
                        struct syscall_arg_fmt *fmt;
                        int left_size = tok - left,
                            right_size = right_end - right;
-                       char arg[128];
+                       char arg[128], *type;
 
                        while (isspace(left[left_size - 1]))
                                --left_size;
 
                        scnprintf(arg, sizeof(arg), "%.*s", left_size, left);
 
-                       fmt = evsel__find_syscall_arg_fmt_by_name(evsel, arg);
+                       fmt = evsel__find_syscall_arg_fmt_by_name(evsel, arg, &type);
                        if (fmt == NULL) {
                                pr_err("\"%s\" not found in \"%s\", can't set filter \"%s\"\n",
                                       arg, evsel->name, evsel->filter);
                        if (fmt->strtoul) {
                                u64 val;
                                struct syscall_arg syscall_arg = {
-                                       .parm = fmt->parm,
+                                       .trace = trace,
+                                       .fmt   = fmt,
                                };
 
+                               if (fmt->is_enum) {
+                                       syscall_arg.parm = type;
+                               } else {
+                                       syscall_arg.parm = fmt->parm;
+                               }
+
                                if (fmt->strtoul(right, right_size, &syscall_arg, &val)) {
                                        char *n, expansion[19];
                                        int expansion_lenght = scnprintf(expansion, sizeof(expansion), "%#" PRIx64, val);