Commit-ID: a4eaf7f14675cb512d69f0c928055e73d0c6d252
Gitweb: http://git.kernel.org/tip/a4eaf7f14675cb512d69f0c928055e73d0c6d252
Author: Peter Zijlstra<a.p.zijlstra@xxxxxxxxx>
AuthorDate: Wed, 16 Jun 2010 14:37:10 +0200
Committer: Ingo Molnar<mingo@xxxxxxx>
CommitDate: Thu, 9 Sep 2010 20:46:30 +0200
perf: Rework the PMU methods
Replace pmu::{enable,disable,start,stop,unthrottle} with
pmu::{add,del,start,stop}, all of which take a flags argument.
-static void alpha_pmu_unthrottle(struct perf_event *event)^
+static void alpha_pmu_stop(struct perf_event *event, int flags)
{
struct hw_perf_event *hwc =&event->hw;
struct cpu_hw_events *cpuc =&__get_cpu_var(cpu_hw_events);
+ if (!(hwc->state& PERF_HES_STOPPED)) {
+ cpuc->idx_mask&= !(1UL<<hwc->idx);
+ hwc->state |= PERF_HES_STOPPED;
+ }
+
+ if ((flags& PERF_EF_UPDATE)&& !(hwc->state& PERF_HES_UPTODATE)) {
+ alpha_perf_event_update(event, hwc, hwc->idx, 0);
+ hwc->state |= PERF_HES_UPTODATE;
+ }
+
+ if (cpuc->enabled)
+ wrperfmon(PERFMON_CMD_ENABLE, (1UL<<hwc->idx));