kernel_optimize_test/tools/perf/util
Arnaldo Carvalho de Melo b931ea024e perf probe: Fix memory leak when synthesizing SDT probes
[ Upstream commit 5149303fdfe5c67ddb51c911e23262f781cd75eb ]

The argv_split() function must be paired with argv_free(), else we must
keep a reference to the argv array received or do the freeing ourselves,
in synthesize_sdt_probe_command() we were simply leaking that argv[]
array.

Fixes: 3b1f8311f6 ("perf probe: Add sdt probes arguments into the uprobe cmd string")
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexandre Truong <alexandre.truong@arm.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: He Zhe <zhe.he@windriver.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201224135139.GF477817@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:54:02 +01: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
libunwind
scripting-engines perf scripting python: Avoid declaring function pointers with a visibility attribute 2020-11-03 08:32:43 -03:00
affinity.c
affinity.h
annotate.c
annotate.h
archinsn.h
arm-spe.c
arm-spe.h
auxtrace.c
auxtrace.h
block-info.c
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
build-id.c perf tools: Initialize output buffer in build_id__sprintf 2020-11-03 09:14:45 -03:00
build-id.h
cache.h
cacheline.c
cacheline.h
call-path.c
call-path.h
callchain.c
callchain.h
cap.c
cap.h
cgroup.c
cgroup.h
clockid.c
clockid.h
cloexec.c
cloexec.h
color_config.c
color.c
color.h
comm.c
comm.h
compress.h
config.c
config.h
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
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
dso.h
dsos.c
dsos.h
dump-insn.c
dump-insn.h
dwarf-aux.c perf probe: Change function definition check due to broken DWARF 2020-11-27 14:36:15 -03:00
dwarf-aux.h
dwarf-regs.c
env.c
env.h
event.c
event.h
events_stats.h
evlist.c
evlist.h
evsel_config.h
evsel_fprintf.c
evsel_fprintf.h
evsel.c
evsel.h
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
hashmap.h perf tools: Update copy of libbpf's hashmap.c 2020-11-27 14:19:33 -03:00
header.c
header.h
help-unknown-cmd.c
help-unknown-cmd.h
hist.c
hist.h
intel-bts.c
intel-bts.h
intel-pt.c
intel-pt.h
intlist.c
intlist.h
jit.h
jitdump.c
jitdump.h
kvm-stat.h
levenshtein.c
levenshtein.h
llvm-utils.c
llvm-utils.h
lzma.c
machine.c
machine.h
map_symbol.h
map.c
map.h
maps.h
mem-events.c
mem-events.h
mem2node.c
mem2node.h
memswap.c
memswap.h
metricgroup.c
metricgroup.h
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
parse-events.h
parse-events.l
parse-events.y
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
print_binary.h
probe-event.c
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: Change function definition check due to broken DWARF 2020-11-27 14:36:15 -03:00
probe-finder.h
pstack.c
pstack.h
python-ext-sources
python.c
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 tools: Add missing swap for cgroup events 2020-11-03 09:16:41 -03:00
session.h
setns.c
setup.py
sideband_evlist.c
smt.c
smt.h
sort.c
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
strbuf.c
strbuf.h
stream.c
stream.h
strfilter.c
strfilter.h
string.c
string2.h
strlist.c
strlist.h
svghelper.c
svghelper.h
symbol_conf.h
symbol_fprintf.c
symbol-elf.c
symbol-minimal.c
symbol.c
symbol.h
symsrc.h
synthetic-events.c perf record: Synthesize cgroup events only if needed 2020-11-27 14:26:33 -03: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
trace-event-scripting.c
trace-event.c
trace-event.h
trigger.h
tsc.c
tsc.h
units.c
units.h
unwind-libdw.c
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