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>
Cc: adrian.hunter@intel.com, irogers@google.com, jolsa@kernel.org,
	kan.liang@linux.intel.com, namhyung@kernel.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/8] perf trace: Augment enum arguments with BTF
Date: Mon, 24 Jun 2024 19:06:26 -0300	[thread overview]
Message-ID: <Znnt4sTOx6ANJZPV@x1> (raw)
In-Reply-To: <20240624181345.124764-1-howardchu95@gmail.com>

On Tue, Jun 25, 2024 at 02:13:37AM +0800, Howard Chu wrote:
> In this patch, BTF is used to turn enum value to the corresponding
> enum variable name. There is only one system call that uses enum value
> as its argument, that is `landlock_add_rule()`.
> 
> Enum arguments of non-syscall tracepoints can also be augmented, for
> instance timer:hrtimer_start and timer:hrtimer_init's 'mode' argument.
> 
> Changes in v3:

Did a quick test, from a quick look you did the adjustments we agreed
(if (val == 0 && !trace->show_zeros && !arg->show_zero && arg->strtoul
!= STUL_BTF_TYPE), etc), thanks!

And that is the way for collaboration we go on talking on the mailing
list and sometimes writing code, making it available for review and
adopting what we deem best at that point, rinse repeat.

Now I think it would be great if someone like Namhyung or Ian could try
this last patch.

I have to comb thru it but, again, from a quick look and test, it seems
great and probably ready for merging.

Thanks a lot!

- Arnaldo
 
> - Add trace__btf_scnprintf() helper function
> - Remove is_enum memeber in struct syscall_arg_fmt, replace it with 
> btf_is_enum()
> - Add syscall_arg_fmt__cache_btf_enum() to cache btf_type only
> - Resolve NO_LIBBPF=1 build error
> - Skip BTF augmentation test if landlock_add_rule syscall and LIBBPF are not
> available
> - Rename landlock.c workload, add a comment to landlock.c workload
> - Change the way of skipping 'enum ' prefix
> - Add type_name member to struct syscall_arg
> 
> Changes in v2:
> 
> - Add trace_btf_enum regression test, and landlock workload
> 
> Arnaldo Carvalho de Melo (2):
>   perf trace: Introduce trace__btf_scnprintf()
>   perf trace: Remove arg_fmt->is_enum, we can get that from the BTF type
> 
> Howard Chu (6):
>   perf trace: Fix iteration of syscall ids in syscalltbl->entries
>   perf trace: BTF-based enum pretty printing for syscall args
>   perf trace: Augment non-syscall tracepoints with enum arguments with
>     BTF
>   perf trace: Filter enum arguments with enum names
>   perf test: Add landlock workload
>   perf test trace_btf_enum: Add regression test for the BTF augmentation
>     of enums in 'perf trace'
> 
>  tools/perf/builtin-trace.c               | 229 ++++++++++++++++++++---
>  tools/perf/tests/builtin-test.c          |   1 +
>  tools/perf/tests/shell/trace_btf_enum.sh |  61 ++++++
>  tools/perf/tests/tests.h                 |   1 +
>  tools/perf/tests/workloads/Build         |   1 +
>  tools/perf/tests/workloads/landlock.c    |  39 ++++
>  tools/perf/trace/beauty/beauty.h         |   1 +
>  tools/perf/util/syscalltbl.c             |   7 +
>  tools/perf/util/syscalltbl.h             |   1 +
>  9 files changed, 317 insertions(+), 24 deletions(-)
>  create mode 100755 tools/perf/tests/shell/trace_btf_enum.sh
>  create mode 100644 tools/perf/tests/workloads/landlock.c
> 
> -- 
> 2.45.2

  parent reply	other threads:[~2024-06-24 22:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 18:13 [PATCH v3 0/8] perf trace: Augment enum arguments with BTF Howard Chu
2024-06-24 18:13 ` [PATCH v3 1/8] perf trace: Fix iteration of syscall ids in syscalltbl->entries Howard Chu
2024-06-24 18:13 ` [PATCH v3 2/8] perf trace: BTF-based enum pretty printing for syscall args Howard Chu
2024-06-28 19:14   ` Namhyung Kim
2024-06-24 18:13 ` [PATCH v3 3/8] perf trace: Augment non-syscall tracepoints with enum arguments with BTF Howard Chu
2024-06-24 18:13 ` [PATCH v3 4/8] perf trace: Filter enum arguments with enum names Howard Chu
2024-06-28 14:41   ` Arnaldo Carvalho de Melo
2024-06-28 14:44     ` Howard Chu
2024-06-24 18:13 ` [PATCH v3 5/8] perf test: Add landlock workload Howard Chu
2024-06-28 14:44   ` Arnaldo Carvalho de Melo
2024-06-28 14:50     ` Arnaldo Carvalho de Melo
2024-06-24 18:13 ` [PATCH v3 6/8] perf test trace_btf_enum: Add regression test for the BTF augmentation of enums in 'perf trace' Howard Chu
2024-06-24 18:13 ` [PATCH v3 7/8] perf trace: Introduce trace__btf_scnprintf() Howard Chu
2024-06-24 18:13 ` [PATCH v3 8/8] perf trace: Remove arg_fmt->is_enum, we can get that from the BTF type Howard Chu
2024-06-24 22:06 ` Arnaldo Carvalho de Melo [this message]
2024-06-28 19:48   ` [PATCH v3 0/8] perf trace: Augment enum arguments with BTF Namhyung Kim
     [not found]     ` <CAH0uvogL+QU+H4cjF7-bjMXmUKHaORKUy7uN7LVkrQBfwB4+tg@mail.gmail.com>
2024-07-04 19:23       ` Arnaldo Carvalho de Melo

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=Znnt4sTOx6ANJZPV@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@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=namhyung@kernel.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).