Re: [PATCH v1] perf trace: Filter enum arguments with enum names

From: Arnaldo Carvalho de Melo
Date: Mon Jun 17 2024 - 16:29:23 EST


On Sat, Jun 15, 2024 at 02:29:58PM +0800, Howard Chu wrote:
> Before:
>
> perf $ ./perf trace -e timer:hrtimer_start --filter='mode!=HRTIMER_MODE_ABS_PINNED_HARD' --max-events=1
> No resolver (strtoul) for "mode" in "timer:hrtimer_start", can't set filter "(mode!=HRTIMER_MODE_ABS_PINNED_HARD) && (common_pid != 281988)"
>
> After:
>
> perf $ ./perf trace -e timer:hrtimer_start --filter='mode!=HRTIMER_MODE_ABS_PINNED_HARD' --max-events=1
> 0.000 :0/0 timer:hrtimer_start(hrtimer: 0xffff9498a6ca5f18, function: 0xffffffffa77a5be0, expires: 12351248764875, softexpires: 12351248764875, mode: HRTIMER_MODE_ABS)

This one I had to apply manually after applying the other two patches:

⬢[acme@toolbox perf-tools-next]$ git am ./20240615_howardchu95_perf_trace_filter_enum_arguments_with_enum_names.mbx
Applying: perf trace: Filter enum arguments with enum names
error: patch failed: tools/perf/builtin-trace.c:904
error: tools/perf/builtin-trace.c: patch does not apply
Patch failed at 0001 perf trace: Filter enum arguments with enum names
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
⬢[acme@toolbox perf-tools-next]$ git am --abort
⬢[acme@toolbox perf-tools-next]$ patch -p1 < ./20240615_howardchu95_perf_trace_filter_enum_arguments_with_enum_names.mbx
patching file tools/perf/builtin-trace.c
Hunk #1 succeeded at 894 with fuzz 2 (offset -10 lines).
Hunk #2 succeeded at 932 (offset -10 lines).
Hunk #3 succeeded at 1905 (offset 3 lines).
Hunk #4 succeeded at 3832 (offset 3 lines).
Hunk #5 succeeded at 3842 (offset 3 lines).
Hunk #6 succeeded at 3883 (offset 3 lines).
Hunk #7 succeeded at 3902 (offset 3 lines).
⬢[acme@toolbox perf-tools-next]$


I'll push what I have to that tmp.perf-tools-next on my git repo at:

https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git

- Arnaldo