android_kernel_motorola_sm6225/tools/perf
Namhyung Kim bcf3145fbe perf evlist: Enhance perf_evlist__start_workload()
When perf tries to start a workload, it relies on a pipe which the
workload was blocked for reading.  After closing the pipe on the parent,
the workload (child) can start the actual work via exec().

However, if another process was forked after creating a workload, this
mechanism cannot work since the other process (child) also inherits the
pipe, so that closing the pipe in parent cannot unblock the workload.
Fix it by using explicit write call can then closing it.

For similar reason, the pipe fd on parent should be marked as CLOEXEC so
that it can be closed after another child exec'ed.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1372230862-15861-13-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-07-08 17:38:30 -03:00
..
arch perf tools: Fix build on non-glibc systems due to libio.h absence 2013-03-15 13:05:13 -03:00
bench perf bench: Fix memory allocation fail check in mem{set,cpy} workloads 2013-07-08 17:35:40 -03:00
config perf tools: Fix build errors with O and DESTDIR make vars set 2013-07-08 17:34:00 -03:00
Documentation perf record: Remove -f/--force option 2013-07-08 17:37:25 -03:00
python perf python: Use attr.watermark in twatch.py 2012-01-30 18:38:23 -02:00
scripts perf: net_dropmonitor: Remove progress indicator 2013-05-22 15:10:11 -07:00
tests perf tests: Fix exclude_guest|exclude_host checking for attr tests 2013-05-29 15:15:19 +03:00
ui perf top: Add --percent-limit option 2013-05-28 16:24:01 +03:00
util perf evlist: Enhance perf_evlist__start_workload() 2013-07-08 17:38:30 -03:00
.gitignore perf tools: Ignore compiled python binaries 2012-09-07 12:10:58 -03:00
bash_completion perf tools: Complete tracepoint event names 2012-10-04 12:44:52 -03:00
builtin-annotate.c perf tools: Add support for weight v7 (modified) 2013-04-01 12:19:43 -03:00
builtin-bench.c perf tools: Make numa benchmark optional 2013-01-30 10:36:21 -03:00
builtin-buildid-cache.c perf buildid-cache: Add --update option 2013-02-14 14:59:27 -03:00
builtin-buildid-list.c perf symbols: Generalize filter in __fprintf_buildid methods 2012-12-09 08:46:07 -03:00
builtin-diff.c perf diff: Use internal rb tree for hists__precompute 2013-05-28 16:24:02 +03:00
builtin-evlist.c perf evlist: Pass the event_group info via perf_attr_details 2013-02-06 18:09:28 -03:00
builtin-help.c perf help: Fix --help for builtins 2012-10-22 12:35:49 -02:00
builtin-inject.c perf inject: Mark a dso if it's used 2012-10-26 11:22:25 -02:00
builtin-kmem.c perf record: Remove -f/--force option 2013-07-08 17:37:25 -03:00
builtin-kvm.c perf kvm: Handle realloc failures 2013-05-28 16:24:04 +03:00
builtin-list.c perf tools: Use __maybe_used for unused variables 2012-09-11 12:19:15 -03:00
builtin-lock.c perf record: Remove -f/--force option 2013-07-08 17:37:25 -03:00
builtin-mem.c perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
builtin-probe.c perf tools: Introduce tools/lib/lk library 2013-03-15 13:06:00 -03:00
builtin-record.c perf record: Remove -f/--force option 2013-07-08 17:37:25 -03:00
builtin-report.c perf report: Add report.percent-limit config variable 2013-05-28 16:24:02 +03:00
builtin-sched.c perf record: Remove -f/--force option 2013-07-08 17:37:25 -03:00
builtin-script.c perf script: Don't display trace info when invoking scripts 2013-01-24 16:40:52 -03:00
builtin-stat.c perf stat: Avoid sending SIGTERM to random processes 2013-07-08 17:36:33 -03:00
builtin-timechart.c perf record: Remove -f/--force option 2013-07-08 17:37:25 -03:00
builtin-top.c perf top: Add --percent-limit option 2013-05-28 16:24:01 +03:00
builtin-trace.c perf trace: Free evlist resources properly on return path 2013-03-15 13:06:11 -03:00
builtin.h perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
command-list.txt perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP 2012-05-31 11:38:42 -03:00
Makefile perf tools: Fix build errors with O and DESTDIR make vars set 2013-07-08 17:34:00 -03:00
MANIFEST perf tools: Introduce tools/lib/lk library 2013-03-15 13:06:00 -03:00
perf-archive.sh perf archive: Make 'f' the last parameter for tar 2012-09-17 13:10:42 -03:00
perf.c perf tools: Convert needless static variable to local 2013-04-01 12:22:48 -03:00
perf.h perf tools: Add support for weight v7 (modified) 2013-04-01 12:19:43 -03:00