linux/tools/perf
Ian Rogers d790ead8a6 perf tracepoint: Don't scan all tracepoints to test if one exists
In is_valid_tracepoint, rather than scanning
"/sys/kernel/tracing/events/*/*" skipping any path where
"/sys/kernel/tracing/events/*/*/id" doesn't exist, and then testing if
"*:*" matches the tracepoint name, just use the given tracepoint name
replace the ':' with '/' and see if the id file exists.

This turns a nested directory search into a single file available test.

Rather than return 1 for valid and 0 for invalid, return true and false.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240509153245.1990426-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-05-09 18:46:43 -03:00
..
arch perf cs-etm: Improve version detection and error reporting 2024-05-02 11:34:41 -03:00
bench perf bench internals inject-build-id: Fix trap divide when collecting just one DSO 2024-05-07 12:44:02 -03:00
dlfilters
Documentation perf test: Reintroduce -p/--parallel and make -S/--sequential the default 2024-04-26 22:28:08 -03:00
include/perf
jvmti
pmu-events perf vendor events amd: Add Zen 5 mapping 2024-05-04 15:10:07 -03:00
python
scripts perf scripts python: Add a script to run instances of 'perf script' in parallel 2024-04-26 22:07:19 -03:00
tests perf mem-info: Add reference count checking 2024-05-07 18:06:44 -03:00
trace tools include UAPI: Sync linux/vhost.h with the kernel sources 2024-04-22 17:44:57 -03:00
ui perf ui browser: Avoid SEGV on title 2024-05-09 18:12:47 -03:00
util perf tracepoint: Don't scan all tracepoints to test if one exists 2024-05-09 18:46:43 -03:00
.gitignore
Build perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
builtin-annotate.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-bench.c perf bench uprobe: Add uretprobe variant of uprobe benchmarks 2024-04-12 17:54:02 -03:00
builtin-buildid-cache.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-buildid-list.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-c2c.c perf mem-info: Add reference count checking 2024-05-07 18:06:44 -03:00
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c
builtin-help.c
builtin-inject.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-kallsyms.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-kmem.c perf evsel: Use evsel__name_is() helper 2024-04-03 11:48:56 -03:00
builtin-kvm.c
builtin-kwork.c perf kwork: Use zfree() to avoid possibly accessing dangling pointers 2024-05-07 12:44:02 -03:00
builtin-list.c perf list: Escape '\r' in JSON output 2024-04-12 17:54:02 -03:00
builtin-lock.c
builtin-mem.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-probe.c perf probe: Use zfree() to avoid possibly accessing dangling pointers 2024-05-07 12:44:02 -03:00
builtin-record.c perf record: Fix comment misspellings 2024-04-26 22:13:10 -03:00
builtin-report.c perf report: Avoid SEGV in report__setup_sample_type() 2024-05-09 18:14:39 -03:00
builtin-sched.c perf evsel: Use evsel__name_is() helper 2024-04-03 11:48:56 -03:00
builtin-script.c perf mem-info: Add reference count checking 2024-05-07 18:06:44 -03:00
builtin-stat.c perf cpumap: Remove refcnt from 'struct cpu_aggr_map' 2024-05-07 18:06:44 -03:00
builtin-timechart.c
builtin-top.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-trace.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-version.c
builtin.h perf tools: Suggest inbuilt commands for unknown command 2024-03-21 13:54:40 -03:00
check-headers.sh tools headers: Synchronize linux/bits.h with the kernel sources 2024-04-26 22:13:10 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf build: Pretend scandirat is missing with msan 2024-04-26 22:13:10 -03:00
Makefile.perf perf beauty: Move uapi/linux/vhost.h copy out of the directory used to build perf 2024-03-21 20:44:35 -03:00
MANIFEST
perf-archive.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-completion.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tools: Suggest inbuilt commands for unknown command 2024-03-21 13:54:40 -03:00
perf.h