kernel-ark/tools/perf
Andrew Vagin 3e76ac78b0 perf record: Add ability to record event period
The problem is that when SAMPLE_PERIOD is not set, the kernel generates
a number of samples in proportion to an event's period. Number of these
samples may be too big and the kernel throttles all samples above a
defined limit.

E.g.: I want to trace when a process sleeps. I created a process which
sleeps for 1ms and for 4ms.  perf got 100 events in both cases.

swapper 0 [000] 1141.371830: sched_stat_sleep: comm=foo pid=1801 delay=1386750 [ns]
swapper 0 [000] 1141.369444: sched_stat_sleep: comm=foo pid=1801 delay=4499585 [ns]

In the first case a kernel want to send 4499585 events and in the second
case it wants to send 1386750 events.  perf-reports shows that process
sleeps in both places equal time.

Instead of this we can get only one sample with an attribute period. As
result we have less data transferring between kernel and user-space and
we avoid throttling of samples.

The patch "events: Don't divide events if it has field period" added a
kernel part of this functionality.

Acked-by: Arun Sharma <asharma@fb.com>
Cc: Arun Sharma <asharma@fb.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: devel@openvz.org
Link: http://lkml.kernel.org/r/1324391565-1369947-1-git-send-email-avagin@openvz.org
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-12-20 12:50:09 -02:00
..
arch perf tools: Make perf.data more self-descriptive (v8) 2011-10-07 17:01:24 -03:00
bench perf tool: Fix gcc 4.6.0 issues 2011-02-07 12:41:41 -02:00
config perf tools: git mv tools/perf/{features-tests.mak,config/} 2011-04-19 08:18:36 -03:00
Documentation perf test: Allow running just a subset of the available tests 2011-11-29 14:04:35 -02:00
python perf evlist: Store pointer to the cpu and thread maps 2011-01-31 12:40:52 -02:00
scripts perf script: Add drop monitor script 2011-09-29 16:41:37 -03:00
util perf record: Add ability to record event period 2011-12-20 12:50:09 -02:00
.gitignore perf tools: Makefile: Remove various and sundry cruft 2011-02-18 07:43:06 -02:00
builtin-annotate.c perf tools: make -C consistent across commands (for cpu list arg) 2011-11-28 11:45:53 -02:00
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Support showing the build id in an ELF file 2011-09-29 16:41:37 -03:00
builtin-diff.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-evlist.c perf evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -03:00
builtin-help.c
builtin-inject.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-kmem.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-kvm.c
builtin-list.c perf list: Allow filtering list of events 2011-02-17 15:38:58 -02:00
builtin-lock.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-probe.c perf tools: Eliminate duplicate code and use PATH_MAX consistently 2011-11-28 10:11:04 -02:00
builtin-record.c perf record: Add ability to record event period 2011-12-20 12:50:09 -02:00
builtin-report.c perf tools: make -C consistent across commands (for cpu list arg) 2011-11-28 11:45:53 -02:00
builtin-sched.c perf tools: Save some loops using perf_evlist__id2evsel 2011-11-28 17:57:40 -02:00
builtin-script.c perf script: Implement option for system-wide profiling 2011-12-12 08:44:00 -02:00
builtin-stat.c perf evlist: Always do automatic allocation of pollfd and mmap structures 2011-11-29 08:05:52 -02:00
builtin-test.c perf test: Soft errors shouldn't stop the "Validate PERF_RECORD_" test 2011-12-02 14:00:04 -02:00
builtin-timechart.c perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
builtin-top.c perf evlist: Always do automatic allocation of pollfd and mmap structures 2011-11-29 08:05:52 -02:00
builtin.h perf tools: Make perf.data more self-descriptive (v8) 2011-10-07 17:01:24 -03:00
command-list.txt perf evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -03:00
CREDITS
design.txt
Makefile perf tools: Rename perf_event_ops to perf_tool 2011-11-28 10:39:28 -02:00
MANIFEST
perf-archive.sh
perf.c perf tools: Simplify debugfs mountpoint handling code 2011-11-28 10:11:28 -02:00
perf.h perf record: Add ability to record event period 2011-12-20 12:50:09 -02:00