linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Andi Kleen <ak@linux.intel.com>, David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Stephane Eranian <eranian@google.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 09/24] perf stat: Introduce perf_evlist__reset_stats
Date: Fri, 26 Jun 2015 12:44:46 -0300	[thread overview]
Message-ID: <1435333501-3429-10-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1435333501-3429-1-git-send-email-acme@kernel.org>

From: Jiri Olsa <jolsa@kernel.org>

To fit in with the rest of the helpers (alloc and free).

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1435310967-14570-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-stat.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 983bcbbe8e0a..188cd98a4ab3 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -216,7 +216,7 @@ out_free:
 	return -1;
 }
 
-static void perf_stat__reset_stats(struct perf_evlist *evlist)
+static void perf_evlist__reset_stats(struct perf_evlist *evlist)
 {
 	struct perf_evsel *evsel;
 
@@ -224,7 +224,11 @@ static void perf_stat__reset_stats(struct perf_evlist *evlist)
 		perf_evsel__reset_stat_priv(evsel);
 		perf_evsel__reset_counts(evsel);
 	}
+}
 
+static void perf_stat__reset_stats(void)
+{
+	perf_evlist__reset_stats(evsel_list);
 	perf_stat__reset_shadow_stats();
 }
 
@@ -1473,7 +1477,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
 		status = run_perf_stat(argc, argv);
 		if (forever && status != -1) {
 			print_stat(argc, argv);
-			perf_stat__reset_stats(evsel_list);
+			perf_stat__reset_stats();
 		}
 	}
 
-- 
2.1.0


  parent reply	other threads:[~2015-06-26 15:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26 15:44 [GIT PULL 00/24] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 01/24] perf trace: Validate syscall list passed via -e argument Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 02/24] perf thread_map: Introduce thread_map__reset function Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 03/24] perf thrad_map: Add comm string into array Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 04/24] perf tests: Add thread_map object tests Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 05/24] perf stat: Introduce perf_counts function Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 06/24] perf stat: Use xyarray for cpu evsel counts Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 07/24] perf stat: Make stats work over the thread dimension Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 08/24] perf stat: Rename struct perf_counts::cpu member to values Arnaldo Carvalho de Melo
2015-06-26 15:44 ` Arnaldo Carvalho de Melo [this message]
2015-06-26 15:44 ` [PATCH 10/24] perf stat: Move perf_evsel__(alloc|free|reset)_stat_priv into stat object Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 11/24] perf stat: Move perf_evsel__(alloc|free)_prev_raw_counts " Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 12/24] perf stat: Move perf_evlist__(alloc|free|reset)_stats " Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 13/24] perf stat: Introduce perf_evsel__alloc_stats function Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 14/24] perf stat: Introduce perf_evsel__read function Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 15/24] perf stat: Introduce read_counters function Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 16/24] perf stat: Separate counters reading and processing Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 17/24] perf stat: Move zero_per_pkg into counter process code Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 18/24] perf stat: Move perf_stat initialization " Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 19/24] perf stat: Remove perf_evsel__read_cb function Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 20/24] perf stat: Rename print_interval to process_interval Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 21/24] perf stat: Using init_stats instead of memset Arnaldo Carvalho de Melo
2015-06-26 15:44 ` [PATCH 22/24] perf stat: Introduce print_counters function Arnaldo Carvalho de Melo
2015-06-26 15:45 ` [PATCH 23/24] perf stat: Introduce --per-thread option Arnaldo Carvalho de Melo
2015-06-26 15:45 ` [PATCH 24/24] perf symbols: Check access permission when reading symbol files Arnaldo Carvalho de Melo
2015-06-30  4:48 ` [GIT PULL 00/24] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435333501-3429-10-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).