kernel_optimize_test/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
c++
cs-etm-decoder
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
archinsn.h
arm-spe.c
arm-spe.h
auxtrace.c perf auxtrace: Fix potential NULL pointer dereference 2021-04-28 13:40:00 +02:00
auxtrace.h
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
bpf-event.h
bpf-loader.c
bpf-loader.h
bpf-prologue.c
bpf-prologue.h
branch.c
branch.h
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
clockid.h
cloexec.c
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
counts.h
cpu-set-sched.h
cpumap.c
cpumap.h
cputopo.c
cputopo.h
cs-etm.c
cs-etm.h
data-convert-bt.c
data-convert-bt.h
data-convert.h
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
debug.h
demangle-java.c
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
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
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
evsel_fprintf.c
evsel_fprintf.h
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
expr.h
expr.l
expr.y
find-map.c
fncache.c
fncache.h
genelf_debug.c
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
help-unknown-cmd.c
help-unknown-cmd.h
hist.c
hist.h
intel-bts.c
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
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
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
mem-events.c
mem-events.h
mem2node.c
mem2node.h
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
ordered-events.h
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
parse-sublevel-options.h
path.c
path.h
perf_api_probe.c
perf_api_probe.h
perf_event_attr_fprintf.c
perf_regs.c
perf_regs.h
perf-hooks-list.h
perf-hooks.c
perf-hooks.h
PERF-VERSION-GEN
pfm.c
pfm.h
pmu.c
pmu.h
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
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
record.h
rlimit.c
rlimit.h
rwsem.c
rwsem.h
s390-cpumcf-kernel.h
s390-cpumsf-kernel.h
s390-cpumsf.c
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
smt.c
smt.h
sort.c perf report: Fix -F for branch & mem modes 2021-03-17 17:06:17 +01:00
sort.h
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
stat.c
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
string.c
string2.h
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
syscalltbl.h
target.c
target.h
term.c
term.h
thread_map.c
thread_map.h
thread-stack.c
thread-stack.h
thread.c
thread.h
time-utils.c
time-utils.h
tool.h
top.c
top.h
topdown.c
topdown.h
trace-event-info.c
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
unwind-libunwind.c
unwind.h
usage.c
util.c
util.h
values.c
values.h
vdso.c
vdso.h
xyarray.c
zlib.c
zstd.c