linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Howard Chu <howardchu95@gmail.com>, Namhyung Kim <namhyung@kernel.org>
Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf trace: Filter enum arguments with enum names
Date: Mon, 17 Jun 2024 17:48:50 -0300	[thread overview]
Message-ID: <ZnChMidAp7hxBVhI@x1> (raw)
In-Reply-To: <ZnCcliuecJABD5FN@x1>

On Mon, Jun 17, 2024 at 05:29:17PM -0300, Arnaldo Carvalho de Melo wrote:
> 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

I've put it also in the perf_trace-btf_enum branch:

https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=perf_trace-btf_enum

Maybe we can then ask Namhyung to merge from that branch into
perf-tools-next/perf-tools-next.

Namhyung, wdyt? I'll do some more tests and review the code one more
time early tomorrow, but all seems to be work as expected.

The way it was submitted was a bit convoluted, I was expecting for
Howard to have the patches the way I put it in the perf_trace-btf_enum
branch, then use:

⬢[acme@toolbox perf-tools-next]$ rm -f 0*.patch
⬢[acme@toolbox perf-tools-next]$ git format-patch -n HEAD~4
0000-cover-letter.patch
0001-perf-trace-Fix-iteration-of-syscall-ids-in-syscalltb.patch
0002-perf-trace-BTF-based-enum-pretty-printing-for-syscal.patch
0003-perf-trace-Augment-non-syscall-tracepoints-with-enum.patch
0004-perf-trace-Filter-enum-arguments-with-enum-names.patch
⬢[acme@toolbox perf-tools-next]$

And then use:

git send-email --from "Howard Chu <howardchu95@gmail.com>" \
                --to "Arnaldo Carvalho de Melo <acme@kernel.org>"
                --cc "Jiri Olsa <jolsa@kernel.org>" \
                --cc "Namhyung Kim <namhyung@kernel.org>" \
                --cc "Ian Rogers <irogers@google.com>" \
                --cc "Adrian Hunter <adrian.hunter@intel.com>" \
                --cc "Kan Liang <kan.liang@linux.intel.com>" \
                --cc linux-kernel@vger.kernel.org \
                --cc linux-perf-users@vger.kernel.org \
                --no-validate \
                --smtp-debug=1 \
                --no-chain-reply-to 0*.patch

After editing 0000-cover-letter.patch to add an explanation about the
series. The version of the series would be in the Subject line for the
cover letter, etc.

Lets try to use this in the next series, concentrating now in reviewing
if what I have at:

https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=perf_trace-btf_enum

Can already be merged by Namhyung on perf-tools-next/perf-tools-next.

Thanks a lot!

- Arnaldo

      reply	other threads:[~2024-06-17 20:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-15  6:29 [PATCH v1] perf trace: Filter enum arguments with enum names Howard Chu
2024-06-17 20:29 ` Arnaldo Carvalho de Melo
2024-06-17 20:48   ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZnChMidAp7hxBVhI@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=howardchu95@gmail.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).