Lines Matching defs:hwc

253 				struct hw_perf_event *hwc, int idx)
255 long left = local64_read(&hwc->period_left);
256 long period = hwc->sample_period;
261 local64_set(&hwc->period_left, left);
262 hwc->last_period = period;
268 local64_set(&hwc->period_left, left);
269 hwc->last_period = period;
283 local64_set(&hwc->prev_count, (unsigned long)(-left));
308 struct hw_perf_event *hwc, int idx, long ovf)
314 prev_raw_count = local64_read(&hwc->prev_count);
317 if (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
331 local64_sub(delta, &hwc->period_left);
413 struct hw_perf_event *hwc = &pe->hw;
414 int idx = hwc->idx;
417 alpha_perf_event_set_period(pe, hwc, idx);
421 if (!(hwc->state & PERF_HES_STOPPED))
436 struct hw_perf_event *hwc = &event->hw;
469 hwc->state = PERF_HES_UPTODATE;
471 hwc->state |= PERF_HES_STOPPED;
488 struct hw_perf_event *hwc = &event->hw;
510 alpha_perf_event_update(event, hwc, idx, 0);
526 struct hw_perf_event *hwc = &event->hw;
528 alpha_perf_event_update(event, hwc, hwc->idx, 0);
534 struct hw_perf_event *hwc = &event->hw;
537 if (!(hwc->state & PERF_HES_STOPPED)) {
538 cpuc->idx_mask &= ~(1UL<<hwc->idx);
539 hwc->state |= PERF_HES_STOPPED;
542 if ((flags & PERF_EF_UPDATE) && !(hwc->state & PERF_HES_UPTODATE)) {
543 alpha_perf_event_update(event, hwc, hwc->idx, 0);
544 hwc->state |= PERF_HES_UPTODATE;
548 wrperfmon(PERFMON_CMD_DISABLE, (1UL<<hwc->idx));
554 struct hw_perf_event *hwc = &event->hw;
557 if (WARN_ON_ONCE(!(hwc->state & PERF_HES_STOPPED)))
561 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE));
562 alpha_perf_event_set_period(event, hwc, hwc->idx);
565 hwc->state = 0;
567 cpuc->idx_mask |= 1UL<<hwc->idx;
569 wrperfmon(PERFMON_CMD_ENABLE, (1UL<<hwc->idx));
605 struct hw_perf_event *hwc = &event->hw;
642 hwc->event_base = ev;
656 evtypes[n] = hwc->event_base;
663 hwc->config_base = 0;
664 hwc->idx = PMC_NO_INDEX;
678 if (!hwc->sample_period) {
679 hwc->sample_period = alpha_pmu->pmc_max_period[0];
680 hwc->last_period = hwc->sample_period;
681 local64_set(&hwc->period_left, hwc->sample_period);
806 struct hw_perf_event *hwc;
851 hwc = &event->hw;
852 alpha_perf_event_update(event, hwc, idx, alpha_pmu->pmc_max_period[idx]+1);
853 perf_sample_data_init(&data, 0, hwc->last_period);
855 if (alpha_perf_event_set_period(event, hwc, idx)) {