summaryrefslogtreecommitdiff
path: root/scripts/stackdelta
diff options
context:
space:
mode:
authorFeng Jiang <jiangfeng@kylinos.cn>2026-04-04 04:28:47 +0300
committerPaul Walmsley <pjw@kernel.org>2026-04-05 03:42:44 +0300
commit0020240a431187628e2636284023e63b9b7a2aa1 (patch)
tree748336a93ac85823067348909055f2b3a84806fd /scripts/stackdelta
parent27b2810a4a3dcd1545ec8bafc82f967eda591c47 (diff)
downloadlinux-0020240a431187628e2636284023e63b9b7a2aa1.tar.xz
lib/string_kunit: add performance benchmark for strlen()
Introduce a benchmarking framework to the string_kunit test suite to measure the execution efficiency of string functions. The implementation is inspired by crc_benchmark(), measuring throughput (MB/s) and latency (ns/call) across a range of string lengths. It includes a warm-up phase, disables preemption during measurement, and uses a fixed seed for reproducible results. This framework allows for comparing different implementations (e.g., generic C vs. architecture-optimized assembly) within the KUnit environment. Initially, provide a benchmark for strlen(). Suggested-by: Andy Shevchenko <andy@kernel.org> Suggested-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn> Reviewed-by: Kees Cook <kees@kernel.org> Link: https://patch.msgid.link/20260130025018.172925-5-jiangfeng@kylinos.cn [pjw@kernel.org: fixed a checkpatch issue] Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'scripts/stackdelta')
0 files changed, 0 insertions, 0 deletions