Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1240939

[PATCH 26/56] perf stat: Rename perf_stat struct into perf_stat_evsel

From Jiri Olsa <jolsa@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 26/56] perf stat: Rename perf_stat struct into perf_stat_evsel
Date 2015-10-06 22:10 +0200
Message-ID <qgGIG-84P-13@gated-at.bofh.it> (permalink)
References <qgGz0-7BP-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


It's used as the perf_evsel::priv data, so the name
suits better. Also we'll need the perf_stat name
free for more generic struct.

Link: http://lkml.kernel.org/n/tip-sajxmhozt3ltu69sxguktyy3@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-stat.c |  4 ++--
 tools/perf/util/stat.c    | 10 +++++-----
 tools/perf/util/stat.h    |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 5ef88f760b12..184057295970 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -434,7 +434,7 @@ static void print_noise_pct(double total, double avg)
 
 static void print_noise(struct perf_evsel *evsel, double avg)
 {
-	struct perf_stat *ps;
+	struct perf_stat_evsel *ps;
 
 	if (run_count == 1)
 		return;
@@ -671,7 +671,7 @@ static void print_aggr_thread(struct perf_evsel *counter, char *prefix)
 static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
 {
 	FILE *output = stat_config.output;
-	struct perf_stat *ps = counter->priv;
+	struct perf_stat_evsel *ps = counter->priv;
 	double avg = avg_stats(&ps->res_stats[0]);
 	int scaled = counter->counts->scaled;
 	double uval;
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 0db0f8c05d5e..c9f361e097d6 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -67,7 +67,7 @@ double rel_stddev_stats(double stddev, double avg)
 bool __perf_evsel_stat__is(struct perf_evsel *evsel,
 			   enum perf_stat_evsel_id id)
 {
-	struct perf_stat *ps = evsel->priv;
+	struct perf_stat_evsel *ps = evsel->priv;
 
 	return ps->id == id;
 }
@@ -84,7 +84,7 @@ static const char *id_str[PERF_STAT_EVSEL_ID__MAX] = {
 
 void perf_stat_evsel_id_init(struct perf_evsel *evsel)
 {
-	struct perf_stat *ps = evsel->priv;
+	struct perf_stat_evsel *ps = evsel->priv;
 	int i;
 
 	/* ps->id is 0 hence PERF_STAT_EVSEL_ID__NONE by default */
@@ -100,7 +100,7 @@ void perf_stat_evsel_id_init(struct perf_evsel *evsel)
 void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
 {
 	int i;
-	struct perf_stat *ps = evsel->priv;
+	struct perf_stat_evsel *ps = evsel->priv;
 
 	for (i = 0; i < 3; i++)
 		init_stats(&ps->res_stats[i]);
@@ -110,7 +110,7 @@ void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
 
 int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
 {
-	evsel->priv = zalloc(sizeof(struct perf_stat));
+	evsel->priv = zalloc(sizeof(struct perf_stat_evsel));
 	if (evsel->priv == NULL)
 		return -ENOMEM;
 	perf_evsel__reset_stat_priv(evsel);
@@ -304,7 +304,7 @@ int perf_stat_process_counter(struct perf_stat_config *config,
 			      struct perf_evsel *counter)
 {
 	struct perf_counts_values *aggr = &counter->counts->aggr;
-	struct perf_stat *ps = counter->priv;
+	struct perf_stat_evsel *ps = counter->priv;
 	u64 *count = counter->counts->aggr.values;
 	int i, ret;
 
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index f313955a24f2..b4ade679320d 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -20,7 +20,7 @@ enum perf_stat_evsel_id {
 	PERF_STAT_EVSEL_ID__MAX,
 };
 
-struct perf_stat {
+struct perf_stat_evsel {
 	struct stats		res_stats[3];
 	enum perf_stat_evsel_id	id;
 };
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv3 00/56] perf stat: Add scripting support Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 36/56] perf stat record: Synthesize attr update events Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 08/56] perf tools: Add perf_event__fprintf_cpu_map function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 25/56] perf tools: Move id_offset out of struct perf_evsel union Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 28/56] perf stat record: Add record command Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 45/56] perf stat report: Process stat and stat round events Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 43/56] perf stat report: Process stat config event Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 39/56] perf tools: Add data arg to cpu_map__build_map callback Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 13/56] perf tools: Add stat event synthesize function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:00 +0200
  [PATCH 32/56] perf stat record: Add pipe support for record command Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 29/56] perf stat record: Initialize record features Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 19/56] perf tools: Add attr_update event unit type Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 37/56] perf tools: Add cpu_map__empty_new interface Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 50/56] perf script: Process cpu/threads maps Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 26/56] perf stat: Rename perf_stat struct into perf_stat_evsel Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 24/56] perf tools: Introduce stat feature Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 52/56] perf script: Add process_stat/process_stat_interval scripting interface Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 16/56] perf tools: Add stat round event synthesize function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 35/56] perf stat record: Do not allow record with multiple runs mode Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 22/56] perf tools: Add perf_event__fprintf_attr_update function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 40/56] perf stat report: Cache aggregated map entries in extra cpumap Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 42/56] perf stat report: Process cpu/threads maps Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 34/56] perf stat record: Write stat round events on record Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 21/56] perf tools: Add attr_update event name type Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 20/56] perf tools: Add attr_update event scale type Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 18/56] perf tools: Add attr_update event Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:10 +0200
  [PATCH 10/56] perf tools: Add stat config event synthesize function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:20 +0200
  [PATCH 04/56] perf tools: Add perf_event__fprintf_thread_map function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:20 +0200
  [PATCH 06/56] perf tools: Add cpu_map event synthesize function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:20 +0200
  [PATCH 14/56] perf tools: Add stat event read function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:20 +0200
  [PATCH 12/56] perf tools: Add stat event Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:20 +0200
  [PATCH 11/56] perf tools: Add stat config event read function Jiri Olsa <jolsa@kernel.org> - 2015-10-06 22:20 +0200
  RE: [PATCHv3 00/56] perf stat: Add scripting support "Liang, Kan" <kan.liang@intel.com> - 2015-10-08 20:40 +0200
    Re: [PATCHv3 00/56] perf stat: Add scripting support Jiri Olsa <jolsa@redhat.com> - 2015-10-08 22:20 +0200
      RE: [PATCHv3 00/56] perf stat: Add scripting support "Liang, Kan" <kan.liang@intel.com> - 2015-10-09 20:40 +0200
        Re: [PATCHv3 00/56] perf stat: Add scripting support Jiri Olsa <jolsa@redhat.com> - 2015-10-14 13:00 +0200
          RE: [PATCHv3 00/56] perf stat: Add scripting support "Liang, Kan" <kan.liang@intel.com> - 2015-10-14 21:50 +0200

csiph-web