aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-06-29 11:42:37 -0400
committerIngo Molnar <mingo@elte.hu>2011-07-01 05:06:40 -0400
commit26ca5c11fb45ae2b2ac7e3574b8db6b3a3c7d350 (patch)
tree01f430828eaacf7ba3e0eb541f8d946f3d855696 /kernel/events
parent0af3ac1fdb9d5c297b4b07c9e0172531d42b6716 (diff)
perf: export perf_event_refresh() to modules
KVM needs one-shot samples, since a PMC programmed to -X will fire after X events and then again after 2^40 events (i.e. variable period). Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1309362157-6596-4-git-send-email-avi@redhat.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index ba8e0f4a20e6..0567e32d71aa 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1764,7 +1764,7 @@ out:
1764 raw_spin_unlock_irq(&ctx->lock); 1764 raw_spin_unlock_irq(&ctx->lock);
1765} 1765}
1766 1766
1767static int perf_event_refresh(struct perf_event *event, int refresh) 1767int perf_event_refresh(struct perf_event *event, int refresh)
1768{ 1768{
1769 /* 1769 /*
1770 * not supported on inherited events 1770 * not supported on inherited events
@@ -1777,6 +1777,7 @@ static int perf_event_refresh(struct perf_event *event, int refresh)
1777 1777
1778 return 0; 1778 return 0;
1779} 1779}
1780EXPORT_SYMBOL_GPL(perf_event_refresh);
1780 1781
1781static void ctx_sched_out(struct perf_event_context *ctx, 1782static void ctx_sched_out(struct perf_event_context *ctx,
1782 struct perf_cpu_context *cpuctx, 1783 struct perf_cpu_context *cpuctx,