From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, ak@linux.intel.com,
acme@redhat.com, jolsa@redhat.com, zheng.z.yan@intel.com,
bp@alien8.de
Subject: [PATCH v3 1/4] perf: add active_entry list head to struct perf_event
Date: Wed, 23 Oct 2013 14:58:02 +0200 [thread overview]
Message-ID: <1382533085-7166-2-git-send-email-eranian@google.com> (raw)
In-Reply-To: <1382533085-7166-1-git-send-email-eranian@google.com>
This patch adds a new fields 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 PMU 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.
Signed-off-by: Stephane Eranian <eranian@google.com>
---
include/linux/perf_event.h | 1 +
kernel/events/core.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 2e069d1..a376384 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -435,6 +435,7 @@ struct perf_event {
struct perf_cgroup *cgrp; /* cgroup event is attach to */
int cgrp_defer_enabled;
#endif
+ struct list_head active_entry;
#endif /* CONFIG_PERF_EVENTS */
};
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 5bd7fe4..6ef9d19 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6629,6 +6629,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);
--
1.7.9.5
next prev parent reply other threads:[~2013-10-23 12:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-23 12:58 [PATCH v3 0/4] perf,x86: add Intel RAPL PMU support Stephane Eranian
2013-10-23 12:58 ` Stephane Eranian [this message]
2013-10-25 14:56 ` [PATCH v3 1/4] perf: add active_entry list head to struct perf_event Jiri Olsa
2013-10-26 16:57 ` Stephane Eranian
2013-10-26 17:44 ` Jiri Olsa
2013-10-28 9:58 ` Stephane Eranian
2013-10-23 12:58 ` [PATCH v3 2/4] perf stat: add event unit and scale support Stephane Eranian
2013-10-23 12:58 ` [PATCH v3 3/4] perf,x86: add Intel RAPL PMU support Stephane Eranian
2013-10-25 11:13 ` Jiri Olsa
2013-10-25 11:13 ` Jiri Olsa
2013-10-25 11:14 ` Jiri Olsa
2013-10-26 17:00 ` Stephane Eranian
2013-10-28 10:33 ` Stephane Eranian
2013-10-28 12:17 ` Peter Zijlstra
2013-10-28 15:54 ` Stephane Eranian
2013-10-23 12:58 ` [PATCH v3 4/4] perf,x86: add RAPL hrtimer support Stephane Eranian
2013-10-25 17:44 ` Jiri Olsa
2013-10-26 17:07 ` Stephane Eranian
2013-10-26 17:53 ` Jiri Olsa
2013-10-28 9:55 ` Stephane Eranian
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=1382533085-7166-2-git-send-email-eranian@google.com \
--to=eranian@google.com \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=zheng.z.yan@intel.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;
as well as URLs for NNTP newsgroup(s).