mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Stephane Eranian <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com,
	mingo@kernel.org, peterz@infradead.org, ak@linux.intel.com,
	tglx@linutronix.de
Subject: [tip:perf/core] perf: Add active_entry list head to struct perf_event
Date: Wed, 27 Nov 2013 06:07:52 -0800	[thread overview]
Message-ID: <tip-71ad88efebbcde374bddf904b96f3a7fc82d45d4@git.kernel.org> (raw)
In-Reply-To: <1384275531-10892-2-git-send-email-eranian@google.com>

Commit-ID:  71ad88efebbcde374bddf904b96f3a7fc82d45d4
Gitweb:     http://git.kernel.org/tip/71ad88efebbcde374bddf904b96f3a7fc82d45d4
Author:     Stephane Eranian <eranian@google.com>
AuthorDate: Tue, 12 Nov 2013 17:58:48 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 27 Nov 2013 11:16:38 +0100

perf: Add active_entry list head to struct perf_event

This patch adds a new field to the struct perf_event.
It is intended to be used to chain events which are
active (enabled). It helps in the hardware layer
for PMUs which do not have actual counter restrictions, i.e.,
free running read-only counters. Active events are chained
as opposed to being tracked via the counter they use.

To save space we use a union with hlist_entry as both
are mutually exclusive (suggested by Jiri Olsa).

Signed-off-by: Stephane Eranian <eranian@google.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: acme@redhat.com
Cc: jolsa@redhat.com
Cc: zheng.z.yan@intel.com
Cc: bp@alien8.de
Cc: maria.n.dimakopoulou@gmail.com
Link: http://lkml.kernel.org/r/1384275531-10892-2-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/perf_event.h | 5 ++++-
 kernel/events/core.c       | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 2e069d1..8f4a70f 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -319,7 +319,10 @@ struct perf_event {
 	 */
 	struct list_head		migrate_entry;
 
-	struct hlist_node		hlist_entry;
+	union {
+		struct hlist_node	hlist_entry;
+		struct list_head	active_entry;
+	};
 	int				nr_siblings;
 	int				group_flags;
 	struct perf_event		*group_leader;
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 72348dc..403b781 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6655,6 +6655,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
 	INIT_LIST_HEAD(&event->event_entry);
 	INIT_LIST_HEAD(&event->sibling_list);
 	INIT_LIST_HEAD(&event->rb_entry);
+	INIT_LIST_HEAD(&event->active_entry);
 
 	init_waitqueue_head(&event->waitq);
 	init_irq_work(&event->pending, perf_pending_event);

  reply	other threads:[~2013-11-27 14:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 16:58 [PATCH v7 0/4] perf/x86: add Intel RAPL PMU support Stephane Eranian
2013-11-12 16:58 ` [PATCH v7 1/4] perf: add active_entry list head to struct perf_event Stephane Eranian
2013-11-27 14:07   ` tip-bot for Stephane Eranian [this message]
2013-11-12 16:58 ` [PATCH v7 2/4] perf stat: add event unit and scale support Stephane Eranian
2013-11-27 14:08   ` [tip:perf/core] tools/perf/stat: Add " tip-bot for Stephane Eranian
2013-11-12 16:58 ` [PATCH v7 3/4] perf,x86: add Intel RAPL PMU support Stephane Eranian
2013-11-27 10:23   ` Peter Zijlstra
2013-11-27 14:08   ` [tip:perf/core] perf/x86: Add " tip-bot for Stephane Eranian
2013-11-27 18:35   ` [PATCH v7 3/4] perf,x86: add " Vince Weaver
2013-11-27 18:38     ` Stephane Eranian
2013-11-27 22:03       ` Vince Weaver
2013-11-28 12:26         ` Ingo Molnar
2013-11-28 12:35           ` Stephane Eranian
2013-11-29 19:16             ` Vince Weaver
2013-11-29 20:09               ` Stephane Eranian
2013-11-29 20:31                 ` Borislav Petkov
2013-11-29 23:25                   ` Stephane Eranian
2013-11-30 16:39                     ` Vince Weaver
2013-11-12 16:58 ` [PATCH v7 4/4] perf,x86: add RAPL hrtimer support Stephane Eranian
2013-11-27 14:10   ` [tip:perf/core] perf/x86: Add " tip-bot for Stephane Eranian
2013-11-27 14:33   ` tip-bot for Stephane Eranian
2013-11-12 18:10 ` [PATCH v7 0/4] perf/x86: add Intel RAPL PMU support Andi Kleen

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=tip-71ad88efebbcde374bddf904b96f3a7fc82d45d4@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome