linux_dsm_epyc7002/tools/perf
yuzhoujian db06a269ec perf stat: Add support to print counts for fixed times
Introduce a new option to print counts for fixed number of times and
update 'perf stat' documentation accordingly.

Show below is the output of the new option for perf stat.

  $ perf stat -I 1000 --interval-count 2 -e cycles -a
  #           time             counts unit events
           1.002827089         93,884,870      cycles
           2.004231506         56,573,446      cycles

We can just print the counts for several times with this newly
introduced option. The usage of it is a little like 'vmstat', and it
should be used together with "-I" option.

  $ vmstat -n 1 2
  procs ---------memory-------------- --swap- ----io-- -system-- ------cpu---
   r  b swpd   free   buff   cache    si   so  bi   bo  in   cs us sy id wa st
   0  0    0 78270544 547484 51732076  0   0   0   20    1    1  1  0 99  0 0
   0  0    0 78270512 547484 51732080  0   0   0   16  477 1555  0  0 100 0 0

Changes since v3:
- merge interval_count check and times check to one line.
- fix the wrong indent in stat.h
- use stat_config.times instead of 'times' in cmd_stat function.

Changes since v2:
- none.

Changes since v1:
- change the name of the new option "times-print" to "interval-count".
- keep the new option interval specifically.

Signed-off-by: yuzhoujian <yuzhoujian@didichuxing.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1517217923-8302-2-git-send-email-ufo19890607@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-02-16 10:09:24 -03:00
..
arch perf s390: Rework system call table creation by using syscall.tbl 2018-02-15 10:06:08 -03:00
bench perf perf: Remove duplicate includes 2017-12-27 12:15:49 -03:00
Documentation perf stat: Add support to print counts for fixed times 2018-02-16 10:09:24 -03:00
jvmti perf jvmti: Generate correct debug information for inlined code 2017-12-18 11:54:08 -03:00
pmu-events perf vendor events aarch64: Add JSON metrics for ARM Cortex-A53 Processor 2018-02-15 09:49:44 -03:00
python
scripts perf script python: Add script to profile and resolve physical mem type 2018-01-12 11:06:57 -03:00
tests perf tests: Fix dwarf unwind for stripped binaries 2018-02-16 10:09:23 -03:00
trace perf trace beauty flock: Move to separate object file 2018-01-25 06:37:31 -03:00
ui perf hists browser: Add parameter to disable lost event warning 2018-02-15 09:56:26 -03:00
util perf stat: Add support to print counts for fixed times 2018-02-16 10:09:24 -03:00
.gitignore perf tools: Add trace/beauty/generated/ into .gitignore 2018-02-05 13:58:02 -03:00
Build perf trace: Remove audit-libs dependency if syscall tables are present 2018-01-23 09:51:38 -03:00
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c perf buildid-cache: Update help text for purge command 2017-11-16 14:49:54 -03:00
builtin-buildid-list.c
builtin-c2c.c perf hists browser: Add parameter to disable lost event warning 2018-02-15 09:56:26 -03:00
builtin-config.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c
builtin-help.c perf trace: Remove audit-libs dependency if syscall tables are present 2018-01-23 09:51:38 -03:00
builtin-inject.c perf tools: Get rid of unused 'swapped' parameter from perf_event__synthesize_sample() 2018-01-18 09:01:23 -03:00
builtin-kallsyms.c
builtin-kmem.c mm: remove __GFP_COLD 2017-11-15 18:21:06 -08:00
builtin-kvm.c perf evlist: Remove fcntl.h from evlist.h 2018-01-25 06:37:30 -03:00
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Put new line after target override warning 2018-02-16 10:09:23 -03:00
builtin-report.c perf report: Add support to display group output for non group events 2018-02-16 10:09:24 -03:00
builtin-sched.c
builtin-script.c perf script: Add --show-round-event to display PERF_RECORD_FINISHED_ROUND 2018-02-16 10:09:23 -03:00
builtin-stat.c perf stat: Add support to print counts for fixed times 2018-02-16 10:09:24 -03:00
builtin-timechart.c
builtin-top.c perf top: Check the latency of perf_top__mmap_read() 2018-02-15 09:57:06 -03:00
builtin-trace.c perf trace: Fix call-graph output 2018-02-05 13:53:45 -03:00
builtin-version.c
builtin.h
check-headers.sh Revert "tools include s390: Grab a copy of arch/s390/include/uapi/asm/unistd.h" 2018-02-15 10:06:15 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf tools: Integrating the CoreSight decoding library 2018-01-25 06:37:23 -03:00
Makefile.perf perf tools: Integrating the CoreSight decoding library 2018-01-25 06:37:23 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh perf tools: Auto-complete for events with ':' 2017-12-27 12:16:00 -03:00
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c perf trace: Remove audit-libs dependency if syscall tables are present 2018-01-23 09:51:38 -03:00
perf.h perf record: Fix period option handling 2018-02-05 12:18:28 -03:00