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


Groups > linux.kernel > #1221663 > unrolled thread

[PATCH 11/13] Revert "perf evsel: Add a backpointer to the evlist a evsel is in"

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2015-09-09 22:00 +0200
Last post2015-09-09 23:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 11/13] Revert "perf evsel: Add a backpointer to the evlist a evsel is in" Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-09 22:00 +0200
    RE: [PATCH 11/13] Revert "perf evsel: Add a backpointer to the  evlist a evsel is in" "Liang, Kan" <kan.liang@intel.com> - 2015-09-09 23:50 +0200

#1221663 — [PATCH 11/13] Revert "perf evsel: Add a backpointer to the evlist a evsel is in"

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-09-09 22:00 +0200
Subject[PATCH 11/13] Revert "perf evsel: Add a backpointer to the evlist a evsel is in"
Message-ID<q6THb-4vo-1@gated-at.bofh.it>
From: Arnaldo Carvalho de Melo <acme@redhat.com>

This reverts commit d49e4695077278ee3016cd242967de23072ec331.

We don't need it, using machine->env seems to be enough.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evlist.c | 2 --
 tools/perf/util/evsel.c  | 2 --
 tools/perf/util/evsel.h  | 4 ----
 3 files changed, 8 deletions(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index d51a5200c8af..09b4ec221dda 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -98,7 +98,6 @@ static void perf_evlist__purge(struct perf_evlist *evlist)
 
 	evlist__for_each_safe(evlist, n, pos) {
 		list_del_init(&pos->node);
-		pos->evlist = NULL;
 		perf_evsel__delete(pos);
 	}
 
@@ -126,7 +125,6 @@ void perf_evlist__delete(struct perf_evlist *evlist)
 
 void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry)
 {
-	entry->evlist = evlist;
 	list_add_tail(&entry->node, &evlist->entries);
 	entry->idx = evlist->nr_entries;
 	entry->tracking = !entry->idx;
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 771ade4d5966..8f4d45002461 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -206,7 +206,6 @@ void perf_evsel__init(struct perf_evsel *evsel,
 	evsel->leader	   = evsel;
 	evsel->unit	   = "";
 	evsel->scale	   = 1.0;
-	evsel->evlist	   = NULL;
 	INIT_LIST_HEAD(&evsel->node);
 	INIT_LIST_HEAD(&evsel->config_terms);
 	perf_evsel__object.init(evsel);
@@ -1027,7 +1026,6 @@ void perf_evsel__close_fd(struct perf_evsel *evsel, int ncpus, int nthreads)
 void perf_evsel__exit(struct perf_evsel *evsel)
 {
 	assert(list_empty(&evsel->node));
-	assert(evsel->evlist == NULL);
 	perf_evsel__free_fd(evsel);
 	perf_evsel__free_id(evsel);
 	perf_evsel__free_config_terms(evsel);
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 298e6bbca200..93ac6b128149 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -60,9 +60,6 @@ struct perf_evsel_config_term {
 
 /** struct perf_evsel - event selector
  *
- * @evlist - evlist this evsel is in, if it is in one.
- * @node - To insert it into evlist->entries or in other list_heads, say in
- *         the event parsing routines.
  * @name - Can be set to retain the original event name passed by the user,
  *         so that when showing results in tools such as 'perf stat', we
  *         show the name used, not some alias.
@@ -76,7 +73,6 @@ struct perf_evsel_config_term {
  */
 struct perf_evsel {
 	struct list_head	node;
-	struct perf_evlist	*evlist;
 	struct perf_event_attr	attr;
 	char			*filter;
 	struct xyarray		*fd;
-- 
2.1.0

--
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/

[toc] | [next] | [standalone]


#1221748 — RE: [PATCH 11/13] Revert "perf evsel: Add a backpointer to the evlist a evsel is in"

From"Liang, Kan" <kan.liang@intel.com>
Date2015-09-09 23:50 +0200
SubjectRE: [PATCH 11/13] Revert "perf evsel: Add a backpointer to the evlist a evsel is in"
Message-ID<q6VpD-703-5@gated-at.bofh.it>
In reply to#1221663

> 
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> This reverts commit d49e4695077278ee3016cd242967de23072ec331.
> 
> We don't need it, using machine->env seems to be enough.

The patchset to dump freq per sample need commit d49e469507.
It also needs commit 2c07144dfc which is revert by PATCH 13.
https://lkml.org/lkml/2015/9/8/758

Otherwise, we have to pass evlist and machine through dump_sample.

> 
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Kan Liang <kan.liang@intel.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Stephane Eranian <eranian@google.com>
> Cc: Wang Nan <wangnan0@huawei.com>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/util/evlist.c | 2 --
>  tools/perf/util/evsel.c  | 2 --
>  tools/perf/util/evsel.h  | 4 ----
>  3 files changed, 8 deletions(-)
> 
> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index
> d51a5200c8af..09b4ec221dda 100644
> --- a/tools/perf/util/evlist.c
> +++ b/tools/perf/util/evlist.c
> @@ -98,7 +98,6 @@ static void perf_evlist__purge(struct perf_evlist
> *evlist)
> 
>  	evlist__for_each_safe(evlist, n, pos) {
>  		list_del_init(&pos->node);
> -		pos->evlist = NULL;
>  		perf_evsel__delete(pos);
>  	}
> 
> @@ -126,7 +125,6 @@ void perf_evlist__delete(struct perf_evlist *evlist)
> 
>  void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry)
> {
> -	entry->evlist = evlist;
>  	list_add_tail(&entry->node, &evlist->entries);
>  	entry->idx = evlist->nr_entries;
>  	entry->tracking = !entry->idx;
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index
> 771ade4d5966..8f4d45002461 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -206,7 +206,6 @@ void perf_evsel__init(struct perf_evsel *evsel,
>  	evsel->leader	   = evsel;
>  	evsel->unit	   = "";
>  	evsel->scale	   = 1.0;
> -	evsel->evlist	   = NULL;
>  	INIT_LIST_HEAD(&evsel->node);
>  	INIT_LIST_HEAD(&evsel->config_terms);
>  	perf_evsel__object.init(evsel);
> @@ -1027,7 +1026,6 @@ void perf_evsel__close_fd(struct perf_evsel
> *evsel, int ncpus, int nthreads)  void perf_evsel__exit(struct perf_evsel
> *evsel)  {
>  	assert(list_empty(&evsel->node));
> -	assert(evsel->evlist == NULL);
>  	perf_evsel__free_fd(evsel);
>  	perf_evsel__free_id(evsel);
>  	perf_evsel__free_config_terms(evsel);
> diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index
> 298e6bbca200..93ac6b128149 100644
> --- a/tools/perf/util/evsel.h
> +++ b/tools/perf/util/evsel.h
> @@ -60,9 +60,6 @@ struct perf_evsel_config_term {
> 
>  /** struct perf_evsel - event selector
>   *
> - * @evlist - evlist this evsel is in, if it is in one.
> - * @node - To insert it into evlist->entries or in other list_heads, say in
> - *         the event parsing routines.
>   * @name - Can be set to retain the original event name passed by the
> user,
>   *         so that when showing results in tools such as 'perf stat', we
>   *         show the name used, not some alias.
> @@ -76,7 +73,6 @@ struct perf_evsel_config_term {
>   */
>  struct perf_evsel {
>  	struct list_head	node;
> -	struct perf_evlist	*evlist;
>  	struct perf_event_attr	attr;
>  	char			*filter;
>  	struct xyarray		*fd;
> --
> 2.1.0

--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web