linux/tools/perf
Howard Chu 63e37590cd perf test trace: Change the regex pattern in the struct test
Ian mentioned a reliably occurred failure in the trace_btf_general test
where he obtained trace output of:
    sleep/279619 clock_nanosleep(0, 0, {1,1,}, 0x7ffcd47b6450) = 0

But the regex pattern used for verification is
    "^sleep/[0-9]+ clock_nanosleep\(0, 0, \{1,\}, ..."

This lead to a mismatch.

The reason is, different sleep commands use different timespec data to
call clock_nanosleep, on my machine, the value of tv_nsec is 0.
~~~
$ sudo /tmp/perf/perf trace -e clock_nanosleep -- sleep 1
     0.000 (1000.196 ms): sleep/54261 clock_nanosleep(rqtp: { .tv_sec:
1, .tv_nsec: 0 }, rmtp: 0x7ffe13529550) = 0
~~~

While Ian had this trace log:
~~~
$ sudo /tmp/perf/perf trace -e clock_nanosleep -- sleep 1
    0.000 (1000.208 ms): sleep/1710732 clock_nanosleep(rqtp: {
.tv_sec: 1, .tv_nsec: 1 }, rmtp: 0x7ffc091f4090) = 0
~~~

Because sleep's behavior of setting 'tv_nsec' is not certain, and tv_sec
is most definitely 1, this patch relaxes the key regex pattern to
'\{1,.*\}' for a better chance of matching.

Signed-off-by: Howard Chu <howardchu95@gmail.com>
Tested-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20250528191148.89118-7-howardchu95@gmail.com
Reported-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-06-09 11:18:20 -07:00
..
arch perf pmu intel: Adjust cpumaks for sub-NUMA clusters on graniterapids 2025-05-22 23:15:48 -03:00
bench perf bench evlist-open-close: Switch user option to use BPF filter 2025-06-09 11:18:18 -07:00
check-header_ignore_hunks/lib perf tools: update expected diff for lib/list_sort.c 2024-11-05 17:12:33 -08:00
dlfilters perf tools: Simplify evsel__add_modifier() 2024-10-22 09:52:11 -07:00
Documentation perf trace: Remove --map-dump documentation 2025-06-09 11:18:19 -07:00
include/perf
jvmti
pmu-events perf metricgroup: Binary search when resolving referred to metrics 2025-05-13 16:36:51 -03:00
python perf python: Add counting.py as example for counting perf events 2025-05-22 22:24:58 -03:00
scripts perf scripts python: exported-sql-viewer.py: Fix pattern matching with Python 3 2025-05-12 14:18:16 -03:00
tests perf test trace: Change the regex pattern in the struct test 2025-06-09 11:18:20 -07:00
trace tools include UAPI: Sync linux/vhost.h with the kernel sources 2025-05-20 12:57:12 -03:00
ui perf mem: Show absolute percent in mem_stat output 2025-05-28 14:42:20 -03:00
util perf thread_map: Remove uid options 2025-06-09 11:18:18 -07:00
.gitignore perf tools: Add the empty-pmu-events build to .gitignore 2024-11-07 10:51:56 -08:00
Build perf build: Add pylint build tests 2025-03-24 09:38:20 -07:00
builtin-annotate.c perf annotate: Add --code-with-type option. 2025-03-13 00:19:51 -07:00
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Use perf_tool__init 2024-08-12 18:07:10 -03:00
builtin-c2c.c perf hist: Set levels in output_field_add() 2025-04-25 12:31:54 -03:00
builtin-check.c perf check: Add tip about building with libbfd using BUILD_NONDISTRO=1 2025-04-10 10:45:15 -03:00
builtin-config.c perf config: Add a function to set one variable in .perfconfig 2025-01-14 15:05:56 -03:00
builtin-daemon.c perf daemon: Fix the build on more 32-bit architectures 2024-08-19 21:44:30 -03:00
builtin-data.c
builtin-diff.c perf stream: Use evsel rather than evsel->idx 2024-12-23 13:53:08 -03:00
builtin-evlist.c perf evlist: Print hint for group 2024-09-11 13:08:45 -03:00
builtin-ftrace.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
builtin-help.c perf tools: Remove dependency on libaudit 2025-01-10 10:59:42 -03:00
builtin-inject.c perf inject: Fix use without initialization of local variables 2025-01-14 14:57:19 -03:00
builtin-kallsyms.c
builtin-kmem.c perf evsel: Add/use accessor for tp_format 2024-12-09 17:52:42 -03:00
builtin-kvm.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
builtin-kwork.c perf kwork: Make perf_kwork_add_work a callback 2024-12-18 16:24:33 -03:00
builtin-list.c perf list: Display the PMU name associated with a perf metric in JSON 2025-05-13 17:06:14 -03:00
builtin-lock.c perf lock contention: Reject more than 10ms delays for safety 2025-05-31 08:45:24 -03:00
builtin-mem.c perf mem: Don't leak mem event names 2025-03-10 14:26:45 -07:00
builtin-probe.c perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT 2024-10-18 10:17:40 -07:00
builtin-record.c perf record: Switch user option to use BPF filter 2025-06-09 11:18:17 -07:00
builtin-report.c perf mem: Display sort order only if it's available 2025-05-28 14:41:42 -03:00
builtin-sched.c perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS 2024-12-09 17:52:41 -03:00
builtin-script.c perf script: Display off-cpu samples correctly 2025-05-05 21:51:31 -03:00
builtin-stat.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
builtin-timechart.c perf timechart: Remove redundant variable assignment 2024-11-13 16:27:35 -03:00
builtin-top.c perf top: Switch user option to use BPF filter 2025-06-09 11:18:18 -07:00
builtin-trace.c perf target: Remove uid from target 2025-06-09 11:18:18 -07:00
builtin-version.c perf check: Share the feature status printing routine with 'perf version' 2025-04-10 10:44:04 -03:00
builtin.h perf check: Allow showing a tip for opt-in features not built into perf 2025-04-10 10:44:42 -03:00
check-headers.sh Linux 6.15-rc5 2025-05-06 10:00:58 +02:00
command-list.txt
CREDITS
design.txt
Makefile perf tools: Fix wrong message when running "make JOBS=1" 2024-08-01 12:11:33 -03:00
Makefile.config Merge remote-tracking branch 'torvalds/master' into perf-tools-next 2025-05-07 12:51:38 -03:00
Makefile.perf perf tests: Fix 'perf report' tests installation 2025-05-09 14:10:08 -03:00
MANIFEST perf tools: Fix arm64 source package build 2025-05-13 17:26:35 -03:00
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tools: Remove dependency on libaudit 2025-01-10 10:59:42 -03:00
perf.h perf: Increase MAX_NR_CPUS to 4096 2024-12-09 17:52:41 -03:00