From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Dmitrii Dolgov <9erthalion6@gmail.com>
Cc: Miguel Ojeda <ojeda@kernel.org>,
linux-perf-users@vger.kernel.org,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Rust data-type profiling working in perf was: Re: [RFC PATCH v2 0/4] Test annotate with data type profiling
Date: Sun, 8 Feb 2026 11:42:28 -0300 [thread overview]
Message-ID: <aYig1O0-5yxy91la@x1> (raw)
In-Reply-To: <aYigHLZtXooznMB7@x1>
On Sun, Feb 08, 2026 at 11:39:28AM -0300, Arnaldo Carvalho de Melo wrote:
> 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:
This is an interesting piece of news, so CCing to lkml and Miguel as
well, please CC that list in the future.
Also please consider adding examples of output of such new features, so
that people can quickly see it in action, data-type profiling for Rust
seems interesting, right? :-)
- Arnaldo
> ⬢ [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
> > 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
> >
next prev parent reply other threads:[~2026-02-08 14:42 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 ` [RFC PATCH v2 0/4] Test annotate with data type profiling Arnaldo Carvalho de Melo
2026-02-08 14:42 ` Arnaldo Carvalho de Melo [this message]
2026-02-08 15:16 ` Rust data-type profiling working in perf was: " 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=aYig1O0-5yxy91la@x1 \
--to=acme@kernel.org \
--cc=9erthalion6@gmail.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=ojeda@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