From: Zhang Rui <rui.zhang@intel.com>
To: "peterz@infradead.org" <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"\"robert .richter\"@amd.com" <"robert .richter"@amd.com>,
"fweisbec@gmail.com" <fweisbec@gmail.com>,
"dzickus@redhat.com" <dzickus@redhat.com>,
"acme@redhat.com" <acme@redhat.com>,
"paulus@samba.org" <paulus@samba.org>,
"gorcunov@gmail.com" <gorcunov@gmail.com>,
"Lin, Ming M" <ming.m.lin@intel.com>,
"Brown, Len" <lenb@kernel.org>,
Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: [RFC PATCH 1/3] perf: export perf helper functions
Date: Wed, 18 Aug 2010 16:03:41 +0800 [thread overview]
Message-ID: <1282118621.5181.121.camel@rui> (raw)
In-Reply-To: <1282118367.5181.116.camel@rui>
resend with the correct email address. :p
Export some perf helper functions.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
include/linux/perf_event.h | 2 ++
kernel/perf_event.c | 12 ++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
Index: linux-2.6/kernel/perf_event.c
===================================================================
--- linux-2.6.orig/kernel/perf_event.c
+++ linux-2.6/kernel/perf_event.c
@@ -4572,7 +4572,7 @@ static enum hrtimer_restart perf_swevent
return ret;
}
-static void perf_swevent_start_hrtimer(struct perf_event *event)
+void perf_swevent_start_hrtimer(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
@@ -4595,7 +4595,9 @@ static void perf_swevent_start_hrtimer(s
}
}
-static void perf_swevent_cancel_hrtimer(struct perf_event *event)
+EXPORT_SYMBOL(perf_swevent_start_hrtimer);
+
+void perf_swevent_cancel_hrtimer(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
@@ -4607,6 +4609,8 @@ static void perf_swevent_cancel_hrtimer(
}
}
+EXPORT_SYMBOL(perf_swevent_cancel_hrtimer);
+
/*
* Software event: cpu wall time clock
*/
@@ -4815,6 +4819,8 @@ unlock:
return ret;
}
+EXPORT_SYMBOL(perf_pmu_register);
+
void perf_pmu_unregister(struct pmu *pmu)
{
mutex_lock(&pmus_lock);
@@ -4825,6 +4831,8 @@ void perf_pmu_unregister(struct pmu *pmu
synchronize_srcu(&pmus_srcu);
}
+EXPORT_SYMBOL(perf_pmu_unregister);
+
struct pmu *perf_init_event(struct perf_event *event)
{
struct pmu *pmu = NULL;
Index: linux-2.6/include/linux/perf_event.h
===================================================================
--- linux-2.6.orig/include/linux/perf_event.h
+++ linux-2.6/include/linux/perf_event.h
@@ -888,6 +888,8 @@ extern int perf_max_events;
extern int perf_pmu_register(struct pmu *pmu);
extern void perf_pmu_unregister(struct pmu *pmu);
+extern void perf_swevent_start_hrtimer(struct perf_event *event);
+extern void perf_swevent_cancel_hrtimer(struct perf_event *event);
extern void perf_event_task_sched_in(struct task_struct *task);
extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next);
prev parent reply other threads:[~2010-08-18 8:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 7:59 Zhang Rui
2010-08-18 8:03 ` Zhang Rui [this message]
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=1282118621.5181.121.camel@rui \
--to=rui.zhang@intel.com \
--cc="robert .richter"@amd.com \
--cc=acme@redhat.com \
--cc=dzickus@redhat.com \
--cc=fweisbec@gmail.com \
--cc=gorcunov@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
--cc=mjg59@srcf.ucam.org \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®