public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Kan Liang <kan.liang@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Borislav Petkov <bp@suse.de>, David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 11/13] Revert "perf evsel: Add a backpointer to the evlist a evsel is in"
Date: Wed,  9 Sep 2015 16:50:23 -0300	[thread overview]
Message-ID: <1441828225-667-12-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1441828225-667-1-git-send-email-acme@kernel.org>

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


  parent reply	other threads:[~2015-09-09 19:51 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 19:50 [RFC 00/13] perf_env/CPU socket reorg/fixes Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 01/13] perf env: Move perf_env out of header.h and session.c into separate object Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 02/13] perf env: Rename some leftovers from rename to perf_env Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 03/13] perf env: Adopt perf_header__set_cmdline Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 04/13] perf env: Introduce read_cpu_topology_map() method Arnaldo Carvalho de Melo
2015-09-09 21:41   ` Liang, Kan
2015-09-10 13:12     ` Arnaldo Carvalho de Melo
2015-09-10 20:00       ` Liang, Kan
2015-09-10 20:12         ` Arnaldo Carvalho de Melo
2015-09-10 20:14           ` Liang, Kan
2015-09-11 10:20       ` Wangnan (F)
2015-09-11 14:40         ` Arnaldo Carvalho de Melo
2015-09-11 15:33           ` Arnaldo Carvalho de Melo
2015-09-11 16:14             ` Namhyung Kim
2015-09-11 16:32               ` Arnaldo Carvalho de Melo
2015-09-14  9:09             ` [tip:perf/urgent] perf header: Fixup reading of HEADER_NRCPUS feature tip-bot for Arnaldo Carvalho de Melo
2015-09-15  7:04   ` [tip:perf/core] perf env: Introduce read_cpu_topology_map() method tip-bot for Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 05/13] perf sort: Set flag stating if the "socket" key is being used Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 06/13] perf top: Cache the cpu topology info when "-s socket" is used Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 07/13] perf hists browser: Fixup the "cpu" column width calculation Arnaldo Carvalho de Melo
2015-09-11 10:52   ` Wangnan (F)
2015-09-09 19:50 ` [PATCH 08/13] perf machine: Add pointer to sample's environment Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 09/13] perf event: Use machine->env to find the cpu -> socket mapping Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 10/13] perf report: Do not blindly use env->cpu[al.cpu].socket_id Arnaldo Carvalho de Melo
2015-09-11 11:50   ` Wangnan (F)
2015-09-09 19:50 ` Arnaldo Carvalho de Melo [this message]
2015-09-09 21:42   ` [PATCH 11/13] Revert "perf evsel: Add a backpointer to the evlist a evsel is in" Liang, Kan
2015-09-09 19:50 ` [PATCH 12/13] perf evsel: Remove forward declaration of 'struct perf_evlist' Arnaldo Carvalho de Melo
2015-09-09 19:50 ` [PATCH 13/13] Revert "perf evlist: Add backpointer for perf_env to evlist" Arnaldo Carvalho de Melo
2015-09-10  9:19 ` [RFC 00/13] perf_env/CPU socket reorg/fixes Jiri Olsa
2015-09-10 14:13   ` Arnaldo Carvalho de Melo
2015-09-11 12:20 ` Wangnan (F)
2015-09-11 13:03   ` Arnaldo Carvalho de Melo
2015-09-11 13:29     ` Arnaldo Carvalho de Melo
2015-09-11 13:30       ` Arnaldo Carvalho de Melo
2015-09-11 13:36         ` Arnaldo Carvalho de Melo
2015-09-14  1:37           ` Wangnan (F)
2015-09-14  1:26     ` Wangnan (F)

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=1441828225-667-12-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /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