kernel-ark/tools
Andi Kleen 411916880f perf stat: Add support for --initial-delay option
When measuring workloads the startup phase -- doing page faults, dynamic
linking, opening files -- is often very different from the rest of the
workload.  Especially with smaller kernels and using counter
multiplexing this can give significant measurement errors.

Multiplexing assumes that the workload is mostly the same over longer
periods. But at startup there is typically some spike of activity which
is relatively short.  If many groups are multiplexing the one group
seeing the spike, and which is then scaled up over the time to run all
groups, may see a significant error.

Also in general it's often not useful to measure the startup, because it
is so different from the rest.

One way around this is to use interval mode and discard the first
sample, but this can be awkward because interval mode doesn't support
intervals of less than 100ms, and also a useful interval is not
necessarily the same as a useful startup delay.

This patch adds a new --initial-delay / -D option to skip measuring for
the startup phase. The time can be specified in ms

Here's a simple example:

perf stat -e page-faults bash -c 'for i in $(seq 100000) ; do true ; done'
...
             3,721 page-faults
...

If we just wait 20 ms the number of page faults is 1/3 less:

perf stat -D 20 -e page-faults bash -c 'for i in $(seq 100000) ; do true ; done'
...
             2,823 page-faults
...

So we filtered out most of the startup noise from bash.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1375490473-1503-4-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-08-07 17:35:29 -03:00
..
cgroup cgroups: fix cgroup_event_listener error handling 2013-01-08 10:00:44 -08:00
firewire
hv tools: hv: Improve error logging in KVP daemon. 2013-06-17 15:54:59 -07:00
include/tools tools/include: use stdint types for user-space byteshift headers 2013-07-03 16:02:28 +02:00
lguest lguest: fix example launcher compilation for broken glibc headers. 2013-07-04 11:25:07 +09:30
lib tools lib traceevent: Port kbuffer parser routines 2013-07-12 13:52:16 -03:00
net filter: add minimal BPF JIT image disassembler 2013-03-21 11:35:41 -04:00
nfsd
perf perf stat: Add support for --initial-delay option 2013-08-07 17:35:29 -03:00
power cpupower: Add Haswell family 0x45 specific idle monitor to show PC8,9,10 states 2013-07-05 01:52:19 +02:00
scripts tools: Get only verbose output with V=1 2013-07-08 17:31:34 -03:00
testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
usb tools: usb: ffs-test: Fix build failure 2013-03-07 12:23:17 +08:00
virtio tools/virtio: move module license stub to module.h 2013-07-09 10:47:53 +09:30
vm tools/vm: Switch to liblk library 2013-03-15 13:06:01 -03:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00