public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Dmitrii Dolgov <9erthalion6@gmail.com>
Cc: linux-perf-users@vger.kernel.org,
	Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>
Subject: Re: [RFC PATCH v2 0/4] Test annotate with data type profiling
Date: Sun, 8 Feb 2026 11:39:24 -0300	[thread overview]
Message-ID: <aYigHLZtXooznMB7@x1> (raw)
In-Reply-To: <20260208122227.3524-1-9erthalion6@gmail.com>

On Sun, Feb 08, 2026 at 01:22:22PM +0100, Dmitrii Dolgov wrote:
> Add shell tests for data type profiling, including C and rust.
> 
> To support the rust test, a new workload with rust code was introduced.
> To build it only when rust is actually available, also add a feature
> test for rust compiler and guard everything behind it.
> 
> Changes in v2:
> - Switched to use mem record.
> - Fixed the build issue with a custom output.
> - Separated patches for the workload and tests.
> - Added new test for C code.
> - Added a feature test for rust compiler.

Thanks, tested it, everything working as advertised:

⬢ [acme@toolbx perf-tools-next]$ m
make: Entering directory '/home/acme/git/linux/tools/perf'
  BUILD:   Doing 'make -j32' parallel build
Warning: Kernel ABI header differences:
  diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
  diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl

Auto-detecting system features:
...                  libdw: [ on  ]
...                  glibc: [ on  ]
...                 libelf: [ on  ]
...                libnuma: [ on  ]
... numa_num_possible_cpus: [ on  ]
...              libpython: [ on  ]
...            libcapstone: [ on  ]
...              llvm-perf: [ on  ]
...                   zlib: [ on  ]
...                   lzma: [ on  ]
...                    bpf: [ on  ]
...                 libaio: [ on  ]
...                libzstd: [ on  ]
...             libopenssl: [ on  ]
...                   rust: [ on  ] <-------------------------

  INSTALL libsubcmd_headers
<SNIP>

⬢ [acme@toolbx perf-tools-next]$ perf record perf test -w code_with_type
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.162 MB perf.data (4036 samples) ]
⬢ [acme@toolbx perf-tools-next]$ perf report --stdio --dso perf -s srcfile,srcline | head -20
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 4K of event 'cpu/cycles/Pu'
# Event count (approx.): 5337677712
#
# Overhead  Source File        Source:Line
# ........  .................  ..............................................................
#
    25.53%  cmp.rs             cmp.rs:1903
    16.66%  code_with_type.rs  code_with_type.rs:15
    14.48%  ub_checks.rs       ub_checks.rs:68
    11.16%  range.rs           range.rs:204
     6.39%  range.rs           range.rs:0
     4.61%  range.rs           range.rs:849
     3.78%  code_with_type.rs  code_with_type.rs:13
     3.51%  code_with_type.rs  code_with_type.rs:21
     2.89%  range.rs           range.rs:764
⬢ [acme@toolbx perf-tools-next]$ grep -m1 'model name' /proc/cpuinfo
model name	: AMD Ryzen 9 9950X3D 16-Core Processor
⬢ [acme@toolbx perf-tools-next]$ uname -a
Linux toolbx 6.18.8-200.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jan 30 20:23:28 UTC 2026 x86_64 GNU/Linux
⬢ [acme@toolbx perf-tools-next]$

  root@number:~# perf test 'perf data type profiling tests'
   83: perf data type profiling tests                                  : Ok
  root@number:~# perf test -vv 'perf data type profiling tests'
   83: perf data type profiling tests:
  --- start ---
  test child forked, pid 125028
  Basic Rust perf annotate test
  Basic annotate test [Success]
  Pipe Rust perf annotate test
  Pipe annotate test [Success]
  Basic C perf annotate test
  Basic annotate test [Success]
  Pipe C perf annotate test
  Pipe annotate test [Success]
  ---- end(0) ----
   83: perf data type profiling tests                                  : Ok
  root@number:~#

Thanks, applied to perf-tools-next,

- Arnaldo

- Arnaldo
 
> Dmitrii Dolgov (4):
>   tools/build: Add a feature test for rust compiler
>   perf test workload: Add code_with_type test workload
>   perf tests: Test annotate with data type profiling and rust
>   perf tests: Test annotate with data type profiling and C
> 
>  tools/build/Makefile.build                    | 14 ++++
>  tools/build/Makefile.feature                  |  6 +-
>  tools/build/feature/Makefile                  |  7 ++
>  tools/build/feature/test-rust.rs              |  4 +
>  tools/perf/Makefile.config                    | 11 +++
>  tools/perf/Makefile.perf                      |  2 +-
>  tools/perf/builtin-check.c                    |  1 +
>  tools/perf/tests/builtin-test.c               |  4 +
>  tools/perf/tests/shell/data_type_profiling.sh | 84 +++++++++++++++++++
>  tools/perf/tests/tests.h                      |  4 +
>  tools/perf/tests/workloads/Build              |  5 ++
>  tools/perf/tests/workloads/code_with_type.c   | 46 ++++++++++
>  tools/perf/tests/workloads/code_with_type.rs  | 23 +++++
>  tools/scripts/Makefile.include                |  2 +
>  14 files changed, 210 insertions(+), 3 deletions(-)
>  create mode 100644 tools/build/feature/test-rust.rs
>  create mode 100755 tools/perf/tests/shell/data_type_profiling.sh
>  create mode 100644 tools/perf/tests/workloads/code_with_type.c
>  create mode 100644 tools/perf/tests/workloads/code_with_type.rs
> 
> 
> base-commit: 36a1b0061a584430277861fe5d8bd107aef26137
> -- 
> 2.52.0
> 

  parent reply	other threads:[~2026-02-08 14:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-08 12:22 [RFC PATCH v2 0/4] Test annotate with data type profiling Dmitrii Dolgov
2026-02-08 12:22 ` [RFC PATCH v2 1/4] tools/build: Add a feature test for rust compiler Dmitrii Dolgov
2026-02-08 12:22 ` [RFC PATCH v2 2/4] perf test workload: Add code_with_type test workload Dmitrii Dolgov
2026-02-09 17:29   ` Ian Rogers
2026-02-11 10:57     ` Dmitry Dolgov
2026-02-09 17:33   ` Ian Rogers
2026-02-11 10:02     ` Dmitry Dolgov
2026-02-08 12:22 ` [RFC PATCH v2 3/4] perf tests: Test annotate with data type profiling and rust Dmitrii Dolgov
2026-02-08 12:22 ` [RFC PATCH v2 4/4] perf tests: Test annotate with data type profiling and C Dmitrii Dolgov
2026-02-10  5:39   ` Ian Rogers
2026-02-10 11:57     ` Dmitry Dolgov
2026-03-02 23:58       ` [PATCH v1] perf test type profiling: Remote typedef on struct Ian Rogers
2026-03-04 10:44         ` Dmitry Dolgov
2026-03-04 20:34           ` Arnaldo Carvalho de Melo
2026-03-04 21:48         ` Namhyung Kim
2026-03-04 22:04           ` Arnaldo Carvalho de Melo
2026-02-08 14:39 ` Arnaldo Carvalho de Melo [this message]
2026-02-08 14:42   ` Rust data-type profiling working in perf was: Re: [RFC PATCH v2 0/4] Test annotate with data type profiling Arnaldo Carvalho de Melo
2026-02-08 15:16     ` Miguel Ojeda
2026-02-09  8:45     ` Dmitry Dolgov
2026-02-10  1:26       ` Namhyung Kim

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=aYigHLZtXooznMB7@x1 \
    --to=acme@kernel.org \
    --cc=9erthalion6@gmail.com \
    --cc=irogers@google.com \
    --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