linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] perf stat: Add interval-count and time support
@ 2018-01-25  9:10 ufo19890607
  2018-01-25  9:10 ` [PATCH v2 1/2] perf stat: Add support to print counts for fixed times ufo19890607
  2018-01-25  9:10 ` [PATCH v2 2/2] perf stat: Add support to print counts after a period of time ufo19890607
  0 siblings, 2 replies; 5+ messages in thread
From: ufo19890607 @ 2018-01-25  9:10 UTC (permalink / raw)
  To: peterz, mingo, alexander.shishkin, jolsa, dsahern, namhyung,
	milian.wolff, arnaldo.melo, yuzhoujian, adrian.hunter, wangnan0
  Cc: linux-perf-users, linux-kernel, acme

From: yuzhoujian <yuzhoujian@didichuxing.com>

Introduce two new options for perf stat and update perf-stat documentation
accordingly.

The interval-count option can be used to print counts for fixed number of
times, and it should be used specifically with "-I" option.

Show below is the output of the interval-count 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
        
The time option can be used to print counts after a period of time, and it
should not used with "-I" option.

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

	$ perf stat --time 2000 -e cycles -a
        Performance counter stats for 'system wide':

                157,260,423      cycles

                2.003060766 seconds time elapsed

yuzhoujian (2):
Patch 1: Add support to print counts for fixed times
Patch 2: Add support to print counts after a period of time

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

 tools/perf/Documentation/perf-stat.txt | 10 +++++++
 tools/perf/builtin-stat.c              | 53 ++++++++++++++++++++++++++++++++--
 tools/perf/util/stat.h                 |  2 ++
 3 files changed, 62 insertions(+), 3 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-26  7:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25  9:10 [PATCH v2 0/2] perf stat: Add interval-count and time support ufo19890607
2018-01-25  9:10 ` [PATCH v2 1/2] perf stat: Add support to print counts for fixed times ufo19890607
2018-01-25  9:10 ` [PATCH v2 2/2] perf stat: Add support to print counts after a period of time ufo19890607
2018-01-25 12:27   ` Jiri Olsa
     [not found]     ` <CAHCio2hg-C55Ue=bUzu-6sYyGXaCw916AAZ7CzJFW-x1dyWmyw@mail.gmail.com>
2018-01-26  7:51       ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).