linux/tools/perf
Ian Rogers 16cbe4bad8 perf env: Avoid recursively taking env->bpf_progs.lock
[ Upstream commit 9c51f8788b ]

Add variants of perf_env__insert_bpf_prog_info(), perf_env__insert_btf()
and perf_env__find_btf prefixed with __ to indicate the
env->bpf_progs.lock is assumed held.

Call these variants when the lock is held to avoid recursively taking it
and potentially having a thread deadlock with itself.

Fixes: f8dfeae009 ("perf bpf: Show more BPF program info in print_bpf_prog_info()")
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ming Wang <wangming01@loongson.cn>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/r/20231207014655.1252484-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:27:48 -08:00
..
arch perf tool x86: Fix perf_env memory leak 2023-07-19 16:21:38 +02:00
bench parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:33:40 +01:00
dlfilters perf dlfilter dlfilter-show-cycles: Fix types for print format 2022-09-08 12:17:45 -03:00
Documentation perf kwork: Add the supported subcommands to the document 2023-11-20 11:52:09 +01:00
examples/bpf
include perf dlfilter: Add machine_pid and vcpu 2022-07-20 11:08:13 -03:00
jvmti
pmu-events perf vendor events: Drop STORES_PER_INST metric event for power10 platform 2023-09-19 12:28:00 +02:00
python
scripts perf scripts intel-pt-events.py: Fix IPC output for Python 2 2023-05-17 11:53:39 +02:00
tests perf test shell stat_bpf_counters: Fix test on Intel 2023-09-19 12:28:07 +02:00
trace tools headers uapi: Sync linux/stat.h with the kernel sources 2022-10-25 17:40:48 -03:00
ui perf hists browser: Fix the number of entries for 'e' key 2023-09-19 12:28:07 +02:00
util perf env: Avoid recursively taking env->bpf_progs.lock 2024-01-25 15:27:48 -08:00
.gitignore perf tools: Add the include/perf/ directory to .gitignore 2022-11-08 18:54:41 -03:00
Build perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
builtin-annotate.c perf tools: Make quiet mode consistent between tools 2022-12-31 13:33:07 +01:00
builtin-bench.c perf bench: Add missing setlocale() call to allow usage of %'d style formatting 2023-07-19 16:21:36 +02:00
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Add a "-m" option to show kernel and modules build-ids 2022-07-18 16:35:34 -03:00
builtin-c2c.c perf mem/c2c: Set PERF_SAMPLE_WEIGHT for LOAD_STORE events 2022-10-06 16:29:32 -03:00
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c perf tools: Make quiet mode consistent between tools 2022-12-31 13:33:07 +01:00
builtin-evlist.c
builtin-ftrace.c perf ftrace latency: Remove unnecessary "--" from --use-nsec option 2023-06-09 10:34:02 +02:00
builtin-help.c
builtin-inject.c perf inject: Fix --buildid-all not to eat up MMAP2 2023-03-17 08:50:14 +01:00
builtin-kallsyms.c
builtin-kmem.c perf kmem: Support field "node" in evsel__process_alloc_event() coping with recent tracepoint restructuring 2023-01-18 11:58:31 +01:00
builtin-kvm.c perf kvm: Fix subcommand matching error 2022-08-10 10:44:02 -03:00
builtin-kwork.c perf kwork: Set ordered_events to true in 'struct perf_tool' 2023-11-20 11:52:09 +01:00
builtin-list.c perf list: Fix metricgroups title message 2022-10-14 12:21:42 -03:00
builtin-lock.c perf lock contention: Fix core dump related to not finding the "__sched_text_end" symbol on s/390 2023-01-12 12:02:30 +01:00
builtin-mem.c perf mem: Fix -C option behavior for perf mem record 2022-10-14 12:21:34 -03:00
builtin-probe.c perf probe: Check -v and -q options in the right place 2022-12-31 13:33:08 +01:00
builtin-record.c perf record: Fix "read LOST count failed" msg with sample read 2023-05-17 11:53:39 +02:00
builtin-report.c perf tools: Make quiet mode consistent between tools 2022-12-31 13:33:07 +01:00
builtin-sched.c perf sched: Factor out destroy_tasks() 2022-10-04 08:55:21 -03:00
builtin-script.c perf script: Fix allocation of evsel->priv related to per-event dump files 2023-07-19 16:21:37 +02:00
builtin-stat.c perf stat: Fix aggr mode initialization 2023-11-20 11:52:09 +01:00
builtin-timechart.c perf timechart: Add p_state_end helper 2022-10-04 08:55:21 -03:00
builtin-top.c perf top: Don't pass an ERR_PTR() directly to perf_session__delete() 2023-09-19 12:28:00 +02:00
builtin-trace.c perf trace: Really free the evsel->priv area 2023-09-19 12:27:59 +02:00
builtin-version.c
builtin.h perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
check-headers.sh tools headers: Update the copy of x86's memcpy_64.S used in 'perf bench' 2022-10-25 17:40:48 -03:00
command-list.txt perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
CREDITS
design.txt
Makefile
Makefile.config perf build: Fix library not found error when using CSLIBS 2023-07-27 08:50:39 +02:00
Makefile.perf perf test: Add arm64 asm pureloop test shell script 2022-10-06 14:50:49 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh perf tools: Fix auto-complete on aarch64 2023-03-10 09:33:27 +01:00
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tools: Add same_cmd_with_prefix() helper 2022-10-04 08:55:21 -03:00
perf.h