linux_dsm_epyc7002/tools/perf/util
Adrian Hunter de19e5c3c5 perf tools: Fix trigger class trigger_on()
trigger_on() means that the trigger is available but not ready, however
trigger_on() was making it ready. That can segfault if the signal comes
before trigger_ready(). e.g. (USR2 signal delivery not shown)

  $ perf record -e intel_pt//u -S sleep 1
  perf: Segmentation fault
  Obtained 16 stack frames.
  /home/ahunter/bin/perf(sighandler_dump_stack+0x40) [0x4ec550]
  /lib/x86_64-linux-gnu/libc.so.6(+0x36caf) [0x7fa76411acaf]
  /home/ahunter/bin/perf(perf_evsel__disable+0x26) [0x4b9dd6]
  /home/ahunter/bin/perf() [0x43a45b]
  /lib/x86_64-linux-gnu/libc.so.6(+0x36caf) [0x7fa76411acaf]
  /lib/x86_64-linux-gnu/libc.so.6(__xstat64+0x15) [0x7fa7641d2cc5]
  /home/ahunter/bin/perf() [0x4ec6c9]
  /home/ahunter/bin/perf() [0x4ec73b]
  /home/ahunter/bin/perf() [0x4ec73b]
  /home/ahunter/bin/perf() [0x4ec73b]
  /home/ahunter/bin/perf() [0x4eca15]
  /home/ahunter/bin/perf(machine__create_kernel_maps+0x257) [0x4f0b77]
  /home/ahunter/bin/perf(perf_session__new+0xc0) [0x4f86f0]
  /home/ahunter/bin/perf(cmd_record+0x722) [0x43c132]
  /home/ahunter/bin/perf() [0x4a11ae]
  /home/ahunter/bin/perf(main+0x5d4) [0x427fb4]

Note, for testing purposes, this is hard to hit unless you add some sleep()
in builtin-record.c before record__open().

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: stable@vger.kernel.org
Fixes: 3dcc4436fa ("perf tools: Introduce trigger class")
Link: http://lkml.kernel.org/r/1519807144-30694-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-03-06 11:31:14 -03:00
..
c++
cs-etm-decoder perf tools: Add functionality to communicate with the openCSD decoder 2018-01-25 06:37:26 -03:00
include
intel-pt-decoder Linux 4.15-rc4 2017-12-18 06:26:07 +01:00
libunwind
scripting-engines perf script python: Add script to profile and resolve physical mem type 2018-01-12 11:06:57 -03:00
annotate.c perf report: Fix a wrong offset issue when using /proc/kcore 2018-01-08 11:11:57 -03:00
annotate.h perf annotate: Get the cpuid from evsel->evlist->env in symbol__annotate() 2017-12-27 12:15:51 -03:00
arm-spe-pkt-decoder.c perf tools: Add ARM Statistical Profiling Extensions (SPE) support 2018-01-17 10:23:31 -03:00
arm-spe-pkt-decoder.h perf tools: Add ARM Statistical Profiling Extensions (SPE) support 2018-01-17 10:23:31 -03:00
arm-spe.c perf tools: Add ARM Statistical Profiling Extensions (SPE) support 2018-01-17 10:23:31 -03:00
arm-spe.h perf tools: Add ARM Statistical Profiling Extensions (SPE) support 2018-01-17 10:23:31 -03:00
auxtrace.c perf auxtrace: Prevent decoding when --no-itrace 2018-03-06 11:05:47 -03:00
auxtrace.h perf tools: Add ARM Statistical Profiling Extensions (SPE) support 2018-01-17 10:23:31 -03:00
block-range.c
block-range.h
bpf-loader.c perf bpf: Remove misplaced __maybe_unused attribute 2018-01-25 06:37:28 -03:00
bpf-loader.h
bpf-prologue.c
bpf-prologue.h
branch.c
branch.h
Build perf tools: Add decoder mechanic to support dumping trace data 2018-01-25 06:37:25 -03:00
build-id.c
build-id.h
cache.h
call-path.c
call-path.h
callchain.c perf unwind: Do not look just at the global callchain_param.record_mode 2018-01-17 10:23:32 -03:00
callchain.h perf unwind: Do not look just at the global callchain_param.record_mode 2018-01-17 10:23:32 -03:00
cgroup.c perf evlist: Remove fcntl.h from evlist.h 2018-01-25 06:37:30 -03:00
cgroup.h
cloexec.c
cloexec.h
color.c
color.h
comm.c
comm.h
compress.h
config.c
config.h
counts.c
counts.h
cpumap.c
cpumap.h
cs-etm.c perf tools: Add mechanic to synthesise CoreSight trace packets 2018-01-25 06:37:27 -03:00
cs-etm.h perf tools: Add processing of coresight metadata 2018-01-25 06:37:24 -03:00
ctype.c
data-convert-bt.c
data-convert-bt.h
data-convert.h
data.c perf tools: Move conditional O_CLOEXEC to util.h 2018-01-23 09:48:20 -03: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
drv_configs.c
drv_configs.h
dso.c perf symbols: Using O_CLOEXEC in do_open 2018-01-23 09:49:28 -03:00
dso.h
dump-insn.c
dump-insn.h
dwarf-aux.c
dwarf-aux.h
dwarf-regs.c
env.c perf env: Adopt perf_env__arch() from the annotate code 2017-12-27 12:15:52 -03:00
env.h perf env: Adopt perf_env__arch() from the annotate code 2017-12-27 12:15:52 -03:00
event.c perf script: Add support to display lost events 2018-01-10 12:00:39 -03:00
event.h perf tools: Get rid of unused 'swapped' parameter from perf_event__synthesize_sample() 2018-01-18 09:01:23 -03:00
evlist.c perf evlist: Remove stale mmap read for backward 2018-02-15 09:50:53 -03:00
evlist.h perf evlist: Remove stale mmap read for backward 2018-02-15 09:50:53 -03:00
evsel_fprintf.c
evsel.c perf evsel: Expose the perf_missing_features struct 2018-02-15 09:54:53 -03:00
evsel.h perf evsel: Expose the perf_missing_features struct 2018-02-15 09:54:53 -03:00
expr.h
expr.y
find-vdso-map.c
genelf_debug.c
genelf.c
genelf.h
generate-cmdlist.sh perf trace: Remove audit-libs dependency if syscall tables are present 2018-01-23 09:51:38 -03:00
group.h
header.c perf header: Add infrastructure to record first and last sample time 2018-01-08 11:20:51 -03:00
header.h perf header: Add infrastructure to record first and last sample time 2018-01-08 11:20:51 -03:00
help-unknown-cmd.c
help-unknown-cmd.h
hist.c
hist.h perf hists browser: Add parameter to disable lost event warning 2018-02-15 09:56:26 -03:00
intel-bts.c perf tools: Get rid of unused 'swapped' parameter from perf_event__synthesize_sample() 2018-01-18 09:01:23 -03:00
intel-bts.h
intel-pt.c perf tools: Get rid of unused 'swapped' parameter from perf_event__synthesize_sample() 2018-01-18 09:01:23 -03:00
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 perf report: Fix a wrong offset issue when using /proc/kcore 2018-01-08 11:11:57 -03:00
machine.h
map.c perf report: Fix a wrong offset issue when using /proc/kcore 2018-01-08 11:11:57 -03:00
map.h
mem-events.c
mem-events.h
memswap.c
memswap.h
metricgroup.c perf perf: Remove duplicate includes 2017-12-27 12:15:49 -03:00
metricgroup.h
mmap.c perf mmap: Discard legacy interface for mmap read 2018-02-15 09:54:17 -03:00
mmap.h perf mmap: Discard legacy interface for mmap read 2018-02-15 09:54:17 -03:00
namespaces.c
namespaces.h
ordered-events.c
ordered-events.h
parse-branch-options.c
parse-branch-options.h
parse-events.c perf evlist: Remove fcntl.h from evlist.h 2018-01-25 06:37:30 -03:00
parse-events.h perf record: Fix -c/-F options for cpu event aliases 2017-11-28 14:19:39 -03:00
parse-events.l
parse-events.y
parse-regs-options.c
parse-regs-options.h
path.c perf utils: Move is_directory() to path.h 2017-12-27 12:15:48 -03:00
path.h perf utils: Move is_directory() to path.h 2017-12-27 12:15:48 -03:00
perf_regs.c
perf_regs.h
perf-hooks-list.h
perf-hooks.c
perf-hooks.h
PERF-VERSION-GEN
pmu.c perf vendor events: Use more flexible pattern matching for CPU identification for mapfile.csv 2017-12-05 15:43:55 -03:00
pmu.h perf pmu: Pass pmu as a parameter to get_cpuid_str() 2017-12-05 10:24:33 -03:00
pmu.l
pmu.y
print_binary.c
print_binary.h
probe-event.c perf probe: Support escaped character in parser 2017-12-27 12:15:55 -03:00
probe-event.h
probe-file.c
probe-file.h
probe-finder.c
probe-finder.h
pstack.c
pstack.h
python-ext-sources perf evsel: Fix swap for samples with raw data 2017-12-27 12:15:56 -03:00
python.c perf evlist: Remove 'overwrite' parameter from perf_evlist__mmap 2017-12-05 15:43:53 -03:00
quote.c
quote.h
rb_resort.h
rblist.c perf rblist: Create rblist__exit() function 2017-12-05 10:24:31 -03:00
rblist.h perf rblist: Create rblist__exit() function 2017-12-05 10:24:31 -03:00
record.c perf record: Fix crash in pipe mode 2018-03-05 11:52:41 -03:00
rwsem.c
rwsem.h
sane_ctype.h
session.c perf report: Fix regression when decoding intel_pt traces 2018-01-23 09:51:36 -03:00
session.h
setns.c
setup.py
smt.c
smt.h
sort.c perf tools: Use ui__error() for reporting --fields errors 2018-01-18 10:28:14 -03:00
sort.h
srcline.c perf report: Fix a wrong offset issue when using /proc/kcore 2018-01-08 11:11:57 -03:00
srcline.h perf report: Fix a wrong offset issue when using /proc/kcore 2018-01-08 11:11:57 -03:00
stat-shadow.c perf stat: Remove a set of shadow stats static variables 2017-12-27 12:15:44 -03:00
stat.c perf stat: Update or print per-thread stats 2017-12-27 12:15:46 -03:00
stat.h perf stat: Resort '--per-thread' result 2017-12-27 12:15:47 -03:00
strbuf.c
strbuf.h
strfilter.c
strfilter.h
string2.h perf string: Add {strdup,strpbrk}_esc() 2017-12-27 12:15:55 -03:00
string.c perf string: Add {strdup,strpbrk}_esc() 2017-12-27 12:15:55 -03:00
strlist.c
strlist.h
svghelper.c
svghelper.h
symbol_fprintf.c
symbol-elf.c
symbol-minimal.c
symbol.c perf probe: Find versioned symbols from map 2017-12-27 12:15:54 -03:00
symbol.h perf probe: Find versioned symbols from map 2017-12-27 12:15:54 -03:00
syscalltbl.c perf trace: Use generated syscall table on s390 too 2017-12-27 12:15:50 -03:00
syscalltbl.h
target.c
target.h perf stat: Remove --per-thread pid/tid limitation 2017-12-27 12:15:47 -03:00
term.c
term.h
thread_map.c perf thread_map: Enumerate all threads from /proc 2017-12-27 12:15:46 -03:00
thread_map.h perf thread_map: Enumerate all threads from /proc 2017-12-27 12:15:46 -03:00
thread-stack.c
thread-stack.h
thread.c
thread.h
time-utils.c perf util: Allocate time slices buffer according to number of comma 2018-01-17 10:23:36 -03:00
time-utils.h perf util: Allocate time slices buffer according to number of comma 2018-01-17 10:23:36 -03:00
tool.h perf tools: Make the tool's warning messages optional 2018-01-10 12:00:55 -03:00
top.c
top.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 perf tools: Fix trigger class trigger_on() 2018-03-06 11:31:14 -03:00
tsc.c
tsc.h
units.c
units.h
unwind-libdw.c
unwind-libdw.h
unwind-libunwind-local.c perf unwind: Do not look just at the global callchain_param.record_mode 2018-01-17 10:23:32 -03:00
unwind-libunwind.c perf env: Adopt perf_env__arch() from the annotate code 2017-12-27 12:15:52 -03:00
unwind.h
usage.c
util-cxx.h
util.c perf tools: Substitute yet another strtoull() 2018-02-15 09:57:19 -03:00
util.h perf tools: Move conditional O_CLOEXEC to util.h 2018-01-23 09:48:20 -03:00
values.c
values.h
vdso.c
vdso.h
xyarray.c
xyarray.h
zlib.c