Re: [PATCH v4 06/15] tracing/filters: Fix quoted operand parsing in function event filter
From: Steven Rostedt
Date: Tue Nov 24 2026 - 14:07:55 EST
On Thu, 19 Nov 2026 09:38:21 +0900
"Masami Hiramatsu (Google)" <mhiramat@xxxxxxxxxx> wrote:
> For this issue, we need to use "perf record" to reproduce it. It seems
> that expected behavior [1], only perf can set filter to
> ftrace:funtion event. From the tracefs, ftrace:function event does
> not have filter .
>
> /sys/kernel/tracing # ls events/ftrace/function/
> format hist id
>
> But perf (perf_event_open + ioctl(PERF_EVENT_IOC_SET_FILTER)) can
> set the filter to ftrace:function event e.g.
>
> perf record -e ftrace:function --filter 'ip == "schedule"' -a -- sleep 1
>
> This should succeed, but it fails without this patch because parse_pred()
> stops at the closing "(double quote).
>
> failed to set filter "ip == "schedule"" on event ftrace:function: Operation not permitted
>
> With this patch, the perf succeeds to run.
Ah this is filter logic that can only be hit by perf. That's because it
does magic to have the function event's ip field to be automatically
treated as functions.
OK.
-- Steve