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

From: Liang, Kan
Date: Wed Sep 09 2015 - 17:43:14 EST




>
> From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>
> 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@xxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxx>
> Cc: David Ahern <dsahern@xxxxxxxxx>
> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
> Cc: Kan Liang <kan.liang@xxxxxxxxx>
> Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
> Cc: Stephane Eranian <eranian@xxxxxxxxxx>
> Cc: Wang Nan <wangnan0@xxxxxxxxxx>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/