Re: [PATCH] perf bpf-filter: Fix a parsing error with comma

From: Namhyung Kim
Date: Tue Mar 25 2025 - 15:52:14 EST


On Fri, 07 Mar 2025 14:09:21 -0800, Namhyung Kim wrote:
> The previous change to support cgroup filters introduced a bug that
> pathname can include commas. It confused the lexer to treat an item and
> the trailing comma as a single token. And it resulted in a parse error:
>
> $ sudo perf record -e cycles:P --filter 'period > 0, ip > 64' -- true
> perf_bpf_filter: Error: Unexpected item: 0,
> perf_bpf_filter: syntax error, unexpected BFT_ERROR, expecting BFT_NUM
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung