linux_dsm_epyc7002/tools/perf/util
Arnaldo Carvalho de Melo 8ff266de89 perf llvm: Return -ENOMEM when asprintf() fails
[ Upstream commit c435c166dcf526ac827bc964d82cc0d5e7a1fd0b ]

Zhihao sent a patch but it made llvm__compile_bpf() return what
asprintf() returns on error, which is just -1, but since this function
returns -errno, fix it by returning -ENOMEM for this case instead.

Fixes: cb76371441 ("perf llvm: Allow passing options to llc ...")
Fixes: 5eab5a7ee0 ("perf llvm: Display eBPF compiling command ...")
Reported-by: Hulk Robot <hulkci@huawei.com>
Reported-by: Zhihao Cheng <chengzhihao1@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: clang-built-linux@googlegroups.com
Link: http://lore.kernel.org/lkml/20210609115945.2193194-1-chengzhihao1@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-14 16:56:52 +02:00
..
arm-spe-decoder perf: arm-spe: Fix check error when synthesizing events 2020-08-21 10:22:23 -03:00
c++
cs-etm-decoder perf: cs-etm: Update to build with latest opencsd version. 2020-05-05 16:35:32 -03:00
include tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' 2020-11-12 17:55:41 -03:00
intel-pt-decoder perf intel-pt: Fix transaction abort handling 2021-06-03 09:00:28 +02:00
libunwind
scripting-engines perf scripting python: Fix tuple_set_u64() 2021-07-14 16:56:38 +02:00
affinity.c
affinity.h
annotate.c perf tools: Pass build_id object to build_id__sprintf() 2020-10-14 08:46:22 -03:00
annotate.h perf tools: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
archinsn.h
arm-spe.c perf arm-spe: Support synthetic events 2020-06-01 12:24:23 -03:00
arm-spe.h
auxtrace.c perf auxtrace: Fix potential NULL pointer dereference 2021-04-28 13:40:00 +02:00
auxtrace.h perf auxtrace: Add itrace 'q' option for quicker, less detailed decoding 2020-08-06 08:24:03 -03:00
block-info.c perf report: Fix wrong LBR block sorting 2021-04-14 08:42:11 +02:00
block-info.h
block-range.c
block-range.h
bpf_map.c
bpf_map.h
bpf-event.c perf bpf: Decouple creating the evlist from adding the SB event 2020-05-05 16:35:29 -03:00
bpf-event.h perf bpf: Decouple creating the evlist from adding the SB event 2020-05-05 16:35:29 -03:00
bpf-loader.c perf: Stop using deprecated bpf_program__title() 2020-09-09 11:28:28 -07:00
bpf-loader.h
bpf-prologue.c perf bpf: Fix bpf prologue generation 2020-06-09 12:40:04 -03:00
bpf-prologue.h
branch.c
branch.h perf branch: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
Build perf tools: Fix dynamic libbpf link 2021-05-19 10:13:13 +02:00
build-id.c perf tools: Initialize output buffer in build_id__sprintf 2020-11-03 09:14:45 -03:00
build-id.h perf tools: Pass build_id object to build_id__sprintf() 2020-10-14 08:46:22 -03:00
cache.h
cacheline.c
cacheline.h
call-path.c
call-path.h
callchain.c perf streams: Report hot streams 2020-10-14 13:34:26 -03:00
callchain.h perf streams: Report hot streams 2020-10-14 13:34:26 -03:00
cap.c
cap.h
cgroup.c perf tools: Allow creation of cgroup without open 2020-09-28 09:18:06 -03:00
cgroup.h perf tools: Allow creation of cgroup without open 2020-09-28 09:18:06 -03:00
clockid.c perf tools: Add clockid_name function 2020-08-06 09:33:57 -03:00
clockid.h perf tools: Add clockid_name function 2020-08-06 09:33:57 -03:00
cloexec.c perf tool: Make perf tool aware of SELinux access control 2020-05-28 10:03:26 -03:00
cloexec.h
color_config.c
color.c
color.h
comm.c
comm.h
compress.h
config.c perf config: Export the perf_config_from_file() function 2020-10-13 17:03:19 -03:00
config.h perf config: Export the perf_config_from_file() function 2020-10-13 17:03:19 -03:00
copyfile.c
copyfile.h
counts.c perf counts: Reset prev_raw_counts counts 2020-05-28 10:03:27 -03:00
counts.h perf counts: Reset prev_raw_counts counts 2020-05-28 10:03:27 -03:00
cpu-set-sched.h
cpumap.c
cpumap.h
cputopo.c
cputopo.h perf tools: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
cs-etm.c perf cs-etm: Fix corrupt data after perf inject from 2020-09-01 12:15:52 -03:00
cs-etm.h perf cs-etm: Move definition of 'traceid_list' global variable from header file 2020-05-05 16:35:32 -03:00
data-convert-bt.c perf data: Add support to store time of day in CTF data conversion 2020-08-06 09:43:37 -03:00
data-convert-bt.h
data-convert.h perf data: Add support to store time of day in CTF data conversion 2020-08-06 09:43:37 -03:00
data.c perf data: Fix error return code in perf_data__create_dir() 2021-05-07 11:04:31 +02:00
data.h
db-export.c
db-export.h
debug.c perf tools: Add general function to parse sublevel options 2020-08-14 09:15:47 -03:00
debug.h
demangle-java.c perf jvmti: Fix demangling Java symbols 2020-05-28 10:03:28 -03:00
demangle-java.h
demangle-rust.c
demangle-rust.h
dso.c perf tools: Align buildid list output for short build ids 2020-10-14 11:28:52 -03:00
dso.h perf tools: Align buildid list output for short build ids 2020-10-14 11:28:52 -03:00
dsos.c perf tools: Align buildid list output for short build ids 2020-10-14 11:28:52 -03:00
dsos.h
dump-insn.c
dump-insn.h
dwarf-aux.c perf probe: Fix NULL pointer dereference in convert_variable_location() 2021-06-10 13:39:17 +02:00
dwarf-aux.h
dwarf-regs.c
env.c
env.h perf tools: Move clockid_res_ns under clock struct 2020-08-06 09:42:20 -03:00
event.c perf tools: Fix DSO filtering when not finding a map for a sampled address 2021-03-04 11:38:03 +01:00
event.h perf script: Show text poke address symbol 2020-07-10 08:39:14 -03:00
events_stats.h
evlist.c perf record: Fix continue profiling after draining the buffer 2021-03-04 11:38:09 +01:00
evlist.h perf record: Fix continue profiling after draining the buffer 2021-03-04 11:38:09 +01:00
evsel_config.h perf evsel: Rename *perf_evsel__get_config_term() & friends to evsel__env() 2020-05-28 10:03:24 -03:00
evsel_fprintf.c perf evsel: Rename perf_evsel__fprintf() to evsel__fprintf() 2020-05-28 10:03:24 -03:00
evsel_fprintf.h perf evsel: Rename perf_evsel__fprintf() to evsel__fprintf() 2020-05-28 10:03:24 -03:00
evsel.c perf evsel: Add evsel__clone() function 2020-09-28 08:55:48 -03:00
evsel.h perf evsel: Add evsel__clone() function 2020-09-28 08:55:48 -03:00
evswitch.c
evswitch.h
expr.c perf metric: Add recursion check when processing nested metrics 2020-07-30 07:01:49 -03:00
expr.h perf metric: Add recursion check when processing nested metrics 2020-07-30 07:01:49 -03:00
expr.l perf expr: Add < and > operators 2020-06-22 16:28:09 -03:00
expr.y perf metric: Compute referenced metrics 2020-07-30 07:01:49 -03:00
find-map.c
fncache.c
fncache.h
genelf_debug.c perf jit: Fix inaccurate DWARF line table 2020-05-29 16:51:38 -03:00
genelf.c
genelf.h
generate-cmdlist.sh
get_current_dir_name.c
get_current_dir_name.h
hashmap.c perf tools: Update copy of libbpf's hashmap.c 2020-11-03 08:26:55 -03:00
hashmap.h perf tools: Update copy of libbpf's hashmap.c 2020-11-27 14:19:33 -03:00
header.c perf tools: Add size to 'struct perf_record_header_build_id' 2020-10-14 11:28:12 -03:00
header.h perf header: Store clock references for -k/--clockid option 2020-08-06 09:35:06 -03:00
help-unknown-cmd.c
help-unknown-cmd.h
hist.c perf evsel: Rename perf_evsel__resort*() to evsel__resort*() 2020-05-28 10:03:24 -03:00
hist.h perf evsel: Rename perf_evsel__resort*() to evsel__resort*() 2020-05-28 10:03:24 -03:00
intel-bts.c perf evsel: Rename __perf_evsel__sample_size() to __evsel__sample_size() 2020-05-05 16:35:30 -03:00
intel-bts.h
intel-pt.c perf intel-pt: Fix sample instruction bytes 2021-06-03 09:00:27 +02:00
intel-pt.h
intlist.c
intlist.h
jit.h
jitdump.c perf jit: Let convert_timestamp() to be backwards-compatible 2021-05-14 09:50:44 +02:00
jitdump.h perf tools: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
kvm-stat.h
levenshtein.c
levenshtein.h
llvm-utils.c perf llvm: Return -ENOMEM when asprintf() fails 2021-07-14 16:56:52 +02:00
llvm-utils.h
lzma.c
machine.c perf intel-pt: Fix 'CPU too large' error 2021-01-19 18:27:29 +01:00
machine.h perf machine: Add machine__for_each_dso() function 2020-09-17 15:47:12 -03:00
map_symbol.h
map.c perf map: Fix error return code in maps__clone() 2021-04-28 13:40:00 +02:00
map.h perf inject: Do not load map/dso when injecting build-id 2020-10-13 11:01:37 -03:00
maps.h
mem2node.c perf mem2node: Avoid double free related to realloc 2020-05-05 16:35:30 -03:00
mem2node.h
mem-events.c perf c2c: Fix 'perf c2c record -e list' to show the default events used 2020-05-28 10:03:25 -03:00
mem-events.h perf c2c: Fix 'perf c2c record -e list' to show the default events used 2020-05-28 10:03:25 -03:00
memswap.c
memswap.h
metricgroup.c Merge branch 'perf/urgent' into perf/core 2020-10-13 13:02:20 -03:00
metricgroup.h perf tools: Copy metric events properly when expand cgroups 2020-09-28 09:16:21 -03:00
mmap.c
mmap.h
namespaces.c
namespaces.h
ordered-events.c perf tools: Remove unneeded semicolons 2020-04-30 10:48:32 -03:00
ordered-events.h perf tools: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
parse-branch-options.c
parse-branch-options.h
parse-events.c perf tools: Add support for exclusive groups/events 2020-10-14 12:24:28 -03:00
parse-events.h perf parse-events: Reduce casts around bp_addr 2020-09-28 09:22:39 -03:00
parse-events.l perf tools: Add support for exclusive groups/events 2020-10-14 12:24:28 -03:00
parse-events.y perf parse-events: Reduce casts around bp_addr 2020-09-28 09:22:39 -03:00
parse-regs-options.c perf record: Fix memory leak when using '--user-regs=?' to list registers 2020-12-30 11:53:59 +01:00
parse-regs-options.h
parse-sublevel-options.c perf tools: Add general function to parse sublevel options 2020-08-14 09:15:47 -03:00
parse-sublevel-options.h perf tools: Add general function to parse sublevel options 2020-08-14 09:15:47 -03:00
path.c
path.h
perf_api_probe.c perf tools: Add support for PERF_RECORD_TEXT_POKE 2020-07-10 08:20:01 -03:00
perf_api_probe.h perf tools: Add support for PERF_RECORD_TEXT_POKE 2020-07-10 08:20:01 -03:00
perf_event_attr_fprintf.c perf tools: Add support for PERF_RECORD_TEXT_POKE 2020-07-10 08:20:01 -03:00
perf_regs.c
perf_regs.h
perf-hooks-list.h
perf-hooks.c
perf-hooks.h
PERF-VERSION-GEN
pfm.c perf tools: Add optional support for libpfm4 2020-05-29 16:51:38 -03:00
pfm.h perf tools: Add optional support for libpfm4 2020-05-29 16:51:38 -03:00
pmu.c perf test: Free formats for perf pmu parse test 2020-09-15 09:22:42 -03:00
pmu.h perf test: Free formats for perf pmu parse test 2020-09-15 09:22:42 -03:00
pmu.l
pmu.y
print_binary.c perf python scripting: Fix printable strings in python3 scripts 2020-10-01 12:10:56 -03:00
print_binary.h
probe-event.c perf tools: Pass build_id object to build_id__sprintf() 2020-10-14 08:46:22 -03:00
probe-event.h
probe-file.c perf probe: Fix memory leak when synthesizing SDT probes 2020-12-30 11:54:02 +01:00
probe-file.h
probe-finder.c perf probe: Fix NULL pointer dereference in convert_variable_location() 2021-06-10 13:39:17 +02:00
probe-finder.h perf probe: Fall back to debuginfod query if debuginfo and source not found locally 2020-09-18 09:20:47 -03:00
pstack.c perf tools: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
pstack.h
python-ext-sources
python.c perf tools: Copy metric events properly when expand cgroups 2020-09-28 09:16:21 -03:00
rb_resort.h
rblist.c
rblist.h
record.c perf record: Support sample-read topdown metric group 2020-09-17 15:47:58 -03:00
record.h perf tools: Add FIFO file names as alternative options to --control 2020-09-04 14:38:15 -03:00
rlimit.c
rlimit.h
rwsem.c
rwsem.h
s390-cpumcf-kernel.h
s390-cpumsf-kernel.h
s390-cpumsf.c perf auxtrace: Add option to synthesize branch stack for regular events 2020-05-05 16:35:29 -03:00
s390-cpumsf.h
s390-sample-raw.c
sample-raw.c
sample-raw.h
session.c perf session: Correct buffer copying when peeking events 2021-06-16 12:01:46 +02:00
session.h
setns.c
setup.py
sideband_evlist.c perf evsel: Rename perf_evsel__new*() to evsel__new*() 2020-05-28 10:03:24 -03:00
smt.c perf tools: Simplify checking if SMT is active. 2020-05-05 16:35:29 -03:00
smt.h
sort.c perf report: Fix -F for branch & mem modes 2021-03-17 17:06:17 +01:00
sort.h perf hist: Add fast path for duplicate entries check 2020-04-18 09:05:01 -03:00
spark.c
spark.h
srccode.c
srccode.h
srcline.c
srcline.h
stat-display.c perf stat: Use proper cpu for shadow stats 2020-11-27 14:31:37 -03:00
stat-shadow.c perf stat: Support new per thread TopDown metrics 2020-09-17 15:48:08 -03:00
stat.c perf stat: Support new per thread TopDown metrics 2020-09-17 15:48:08 -03:00
stat.h perf stat: Add --for-each-cgroup option 2020-09-28 09:07:08 -03:00
strbuf.c
strbuf.h
stream.c perf streams: Report hot streams 2020-10-14 13:34:26 -03:00
stream.h perf streams: Report hot streams 2020-10-14 13:34:26 -03:00
strfilter.c
strfilter.h
string2.h
string.c
strlist.c
strlist.h
svghelper.c
svghelper.h
symbol_conf.h
symbol_fprintf.c perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars 2021-05-14 09:50:28 +02:00
symbol-elf.c perf tools: Pass build_id object to dso__build_id_equal() 2020-10-14 09:25:36 -03:00
symbol-minimal.c perf tools: Pass build_id object to dso__set_build_id() 2020-10-14 08:46:42 -03:00
symbol.c perf symbols: Fix return value when loading PE DSO 2021-03-04 11:38:07 +01:00
symbol.h perf tools: Fix crash with non-jited bpf progs 2020-11-03 08:30:34 -03:00
symsrc.h
synthetic-events.c perf synthetic events: Avoid write of uninitialized memory when generating PERF_RECORD_MMAP* records 2021-03-30 14:32:06 +02:00
synthetic-events.h
syscalltbl.c perf trace: Use zalloc() to make sure all fields are zeroed in the syscalltbl constructor 2020-05-29 16:50:29 -03:00
syscalltbl.h perf trace: Remove union from syscalltbl, all the fields are needed 2020-05-29 16:50:26 -03:00
target.c
target.h
term.c
term.h
thread_map.c
thread_map.h
thread-stack.c perf thread-stack: Add thread_stack__br_sample_late() 2020-05-05 16:35:29 -03:00
thread-stack.h perf thread-stack: Add thread_stack__br_sample_late() 2020-05-05 16:35:29 -03:00
thread.c perf callchain: Stitch LBR call stack 2020-04-18 09:05:01 -03:00
thread.h perf callchain: Stitch LBR call stack 2020-04-18 09:05:01 -03:00
time-utils.c
time-utils.h
tool.h perf tools: Add support for PERF_RECORD_TEXT_POKE 2020-07-10 08:20:01 -03:00
top.c perf evsel: Rename *perf_evsel__*name() to *evsel__*name() 2020-05-05 16:35:30 -03:00
top.h perf top: Move sb_evlist to 'struct perf_top' 2020-05-05 16:35:29 -03:00
topdown.c perf record: Support sample-read topdown metric group 2020-09-17 15:47:58 -03:00
topdown.h perf record: Support sample-read topdown metric group 2020-09-17 15:47:58 -03:00
trace-event-info.c perf util: Fix potential SEGFAULT in put_tracepoints_path error path 2020-05-28 10:03:27 -03:00
trace-event-parse.c
trace-event-read.c perf traceevent: Ensure read cmdlines are null terminated. 2021-03-17 17:06:17 +01:00
trace-event-scripting.c
trace-event.c
trace-event.h
trigger.h
tsc.c perf tsc: Support cap_user_time_short for event TIME_CONV 2020-09-22 13:46:40 -03:00
tsc.h perf tsc: Calculate timestamp with cap_user_time_short 2020-09-22 13:45:21 -03:00
units.c
units.h
unwind-libdw.c perf unwind: Set userdata for all __report_module() paths 2021-05-28 13:17:43 +02:00
unwind-libdw.h
unwind-libunwind-local.c perf tools: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
unwind-libunwind.c
unwind.h
usage.c
util.c
util.h perf tests: Call test_attr__open() directly 2020-09-10 11:55:37 -03:00
values.c
values.h
vdso.c
vdso.h
xyarray.c
zlib.c
zstd.c perf tools: Use %zd for size_t printf formats on 32-bit 2020-09-01 12:15:21 -03:00