lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1306398853.2207.155.camel@rui>
Date:	Thu, 26 May 2011 16:34:13 +0800
From:	Zhang Rui <rui.zhang@...el.com>
To:	LKML <linux-kernel@...r.kernel.org>,
	linux-pm <linux-pm@...ts.linux-foundation.org>
Cc:	a.p.zijlstra@...llo.nl, mingo@...e.hu, ming.m.lin@...el.com,
	acme@...hat.com, "Brown, Len" <lenb@...nel.org>
Subject: [PATCH 1/3] export some perf interfaces


Export perf interfaces.

Needed by the next patch, which exports the
Package/Core/Uncore/DRAM energy consumption via perf tool.

Singed-off-by: Zhang Rui <rui.zhang@...el.com>
---
 include/linux/perf_event.h |    3 +++
 kernel/events/core.c       |   11 ++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

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
@@ -1153,6 +1153,9 @@ extern void perf_swevent_put_recursion_c
 extern void perf_event_enable(struct perf_event *event);
 extern void perf_event_disable(struct perf_event *event);
 extern void perf_event_task_tick(void);
+extern void perf_swevent_init_hrtimer(struct perf_event *event);
+extern void perf_swevent_start_hrtimer(struct perf_event *event);
+extern void perf_swevent_cancel_hrtimer(struct perf_event *event);
 #else
 static inline void
 perf_event_task_sched_in(struct task_struct *task)			{ }
Index: linux-2.6/kernel/events/core.c
===================================================================
--- linux-2.6.orig/kernel/events/core.c
+++ linux-2.6/kernel/events/core.c
@@ -5648,7 +5648,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;
 	s64 period;
@@ -5669,8 +5669,9 @@ static void perf_swevent_start_hrtimer(s
 				ns_to_ktime(period), 0,
 				HRTIMER_MODE_REL_PINNED, 0);
 }
+EXPORT_SYMBOL_GPL(perf_swevent_start_hrtimer);
 
-static void perf_swevent_cancel_hrtimer(struct perf_event *event)
+void perf_swevent_cancel_hrtimer(struct perf_event *event)
 {
 	struct hw_perf_event *hwc = &event->hw;
 
@@ -5681,8 +5682,9 @@ static void perf_swevent_cancel_hrtimer(
 		hrtimer_cancel(&hwc->hrtimer);
 	}
 }
+EXPORT_SYMBOL_GPL(perf_swevent_cancel_hrtimer);
 
-static void perf_swevent_init_hrtimer(struct perf_event *event)
+void perf_swevent_init_hrtimer(struct perf_event *event)
 {
 	struct hw_perf_event *hwc = &event->hw;
 
@@ -5705,6 +5707,7 @@ static void perf_swevent_init_hrtimer(st
 		event->attr.freq = 0;
 	}
 }
+EXPORT_SYMBOL_GPL(perf_swevent_init_hrtimer);
 
 /*
  * Software event: cpu wall time clock
@@ -6077,6 +6080,7 @@ free_pdc:
 	free_percpu(pmu->pmu_disable_count);
 	goto unlock;
 }
+EXPORT_SYMBOL_GPL(perf_pmu_register);
 
 void perf_pmu_unregister(struct pmu *pmu)
 {
@@ -6098,6 +6102,7 @@ void perf_pmu_unregister(struct pmu *pmu
 	put_device(pmu->dev);
 	free_pmu_context(pmu);
 }
+EXPORT_SYMBOL_GPL(perf_pmu_unregister);
 
 struct pmu *perf_init_event(struct perf_event *event)
 {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ