tmp_suning_uos_patched/tools/perf/tests
Jiri Olsa 774cb499ca perf tools: Fix 'disabled' attribute config for record command
Currently the record command sets all events initially as disabled.

There's non conditional perf_evlist__enable call, that enables all
events before we exec tracee program. That actually screws whole
enable_on_exec logic, because the event is enabled before the traced
program got executed.

What we actually want is:

1) For any type of traced program:
  - all independent events and group leaders are disabled
  - all group members are enabled

   Group members are ruled by group leaders. They need to
   be enabled, because the group scheduling relies on that.

2) For traced programs executed by perf:
   - all independent events and group leaders have
     enable_on_exec set
   - we don't specifically enable or disable any event during
     the record command

   Independent events and group leaders are initially disabled
   and get enabled by exec. Group members are ruled by group
   leaders as stated in 1).

3) For traced programs attached by perf (pid/tid):
   - we specifically enable or disable all events during
     the record command

   When attaching events to already running traced we
   enable/disable events specifically, as there's no
   initial traced exec call.

Fixing appropriate perf_event_attr test case to cover this change.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1352741644-16809-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-11-14 16:52:03 -03:00
..
attr perf tools: Fix 'disabled' attribute config for record command 2012-11-14 16:52:03 -03:00
attr.c perf tests: Final cleanup for builtin-test move 2012-11-14 16:50:24 -03:00
attr.py perf tests: Move attr.py temp dir cleanup into finally section 2012-11-08 13:16:19 -03:00
builtin-test.c perf tests: Final cleanup for builtin-test move 2012-11-14 16:50:24 -03:00
dso-data.c perf tests: Check for mkstemp return value in dso-data test 2012-11-14 16:50:30 -03:00
evsel-roundtrip-name.c perf tests: Move perf_evsel__roundtrip_name_test into separate object 2012-11-14 16:49:56 -03:00
evsel-tp-sched.c perf tests: Move perf_evsel__tp_sched_test into separate object 2012-11-14 16:50:02 -03:00
mmap-basic.c perf tests: Move test__basic_mmap into separate object 2012-11-14 16:49:32 -03:00
open-syscall-all-cpus.c perf tests: Move test__open_syscall_event_on_all_cpus into separate object 2012-11-14 16:49:25 -03:00
open-syscall-tp-fields.c perf tools: Fix attributes for '{}' defined event groups 2012-11-14 16:51:50 -03:00
open-syscall.c perf tests: Move test__open_syscall_event into separate object 2012-11-14 16:49:17 -03:00
parse-events.c perf tests: Final cleanup for builtin-test move 2012-11-14 16:50:24 -03:00
perf-record.c perf tests: Move test__PERF_RECORD into separate object 2012-11-14 16:49:43 -03:00
pmu.c perf tests: Move pmu tests into separate object 2012-11-14 16:50:19 -03:00
rdpmc.c perf tests: Move test__rdpmc into separate object 2012-11-14 16:49:50 -03:00
tests.h perf tests: Final cleanup for builtin-test move 2012-11-14 16:50:24 -03:00
util.c perf tests: Move test__open_syscall_event into separate object 2012-11-14 16:49:17 -03:00
vmlinux-kallsyms.c perf tests: Move test__vmlinux_matches_kallsyms into separate object 2012-11-14 16:48:35 -03:00