mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 22:34:33 +01:00
The purpose of the workload is to gather samples of rust runtime. To
achieve that it has a dummy rust library linked with it.
Per recommendations for such scenarios [1], the rust library is
statically linked.
An example:
$ perf record perf test -w code_with_type
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.160 MB perf.data (4074 samples) ]
$ perf report --stdio --dso perf -s srcfile,srcline
45.16% ub_checks.rs ub_checks.rs:72
6.72% code_with_type.rs code_with_type.rs:15
6.64% range.rs range.rs:767
4.26% code_with_type.rs code_with_type.rs:21
4.23% range.rs range.rs:0
3.99% code_with_type.rs code_with_type.rs:16
[...]
[1]: https://doc.rust-lang.org/reference/linkage.html#mixed-rust-and-foreign-codebases
Signed-off-by: Dmitrii Dolgov <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Namhyung Kim <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
24 lines
763 B
Python
24 lines
763 B
Python
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
perf-test-y += noploop.o
|
|
perf-test-y += thloop.o
|
|
perf-test-y += leafloop.o
|
|
perf-test-y += sqrtloop.o
|
|
perf-test-y += brstack.o
|
|
perf-test-y += datasym.o
|
|
perf-test-y += landlock.o
|
|
perf-test-y += traploop.o
|
|
perf-test-y += inlineloop.o
|
|
|
|
ifeq ($(CONFIG_RUST_SUPPORT),y)
|
|
perf-test-y += code_with_type.o
|
|
perf-test-y += code_with_type.a
|
|
endif
|
|
|
|
CFLAGS_sqrtloop.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE
|
|
CFLAGS_leafloop.o = -g -O0 -fno-inline -fno-omit-frame-pointer -U_FORTIFY_SOURCE
|
|
CFLAGS_brstack.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE
|
|
CFLAGS_datasym.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE
|
|
CFLAGS_traploop.o = -g -O0 -fno-inline -U_FORTIFY_SOURCE
|
|
CFLAGS_inlineloop.o = -g -O2
|