Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1210436
| From | Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v2 4/8] ARCv2: perf: Support sampling events using overflow interrupts |
| Date | 2015-08-20 13:40 +0200 |
| Message-ID | <pZwmm-3AQ-19@gated-at.bofh.it> (permalink) |
| References | <pU8E1-57u-3@gated-at.bofh.it> <pU8E3-57u-43@gated-at.bofh.it> <pYXoC-3m5-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Peter,
> -----Original Message-----
> From: Peter Zijlstra [mailto:peterz@infradead.org]
> Sent: 19 августа 2015 г. 1:12
> To: Alexey Brodkin
> Cc: linux-arch@vger.kernel.org; linux-kernel@vger.kernel.org; Vineet.Gupta1@synopsys.com; arc-linux-dev@synopsys.com;
> arnd@arndb.de; Arnaldo Carvalho de Melo
> Subject: Re: [PATCH v2 4/8] ARCv2: perf: Support sampling events using overflow interrupts
>
> On Wed, Aug 05, 2015 at 06:13:30PM +0300, Alexey Brodkin wrote:
> > @@ -319,6 +336,20 @@ static int arc_pmu_add(struct perf_event *event, int flags)
> > }
> >
> > write_aux_reg(ARC_REG_PCT_INDEX, idx);
> > +
> > + arc_pmu->act_counter[idx] = event;
> > +
> > + if (is_sampling_event(event)) {
> > + /* Mimic full counter overflow as other arches do */
> > + write_aux_reg(ARC_REG_PCT_INT_CNTL, (u32)arc_pmu->max_period);
> > + write_aux_reg(ARC_REG_PCT_INT_CNTH,
> > + (arc_pmu->max_period >> 32));
> > +
> > + /* Enable interrupt for this counter */
> > + write_aux_reg(ARC_REG_PCT_INT_CTRL,
> > + read_aux_reg(ARC_REG_PCT_INT_CTRL) | (1 << idx));
> > + }
>
> *confused* pmu::add should only start on flags & PERF_EF_START, and then
> we start with hwc->sample_period, not the max_period.
Did you mean here that we should enable interrupts in arc_pmu_start() but not
in arc_pmu_add()?
-Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/8] ARCv2 port to Linux - (C) perf Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2015-08-05 17:20 +0200
[PATCH v2 1/8] ARC: perf: support RAW events Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2015-08-05 17:20 +0200
[PATCH v2 4/8] ARCv2: perf: Support sampling events using overflow interrupts Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2015-08-05 17:20 +0200
Re: [PATCH v2 4/8] ARCv2: perf: Support sampling events using overflow interrupts Peter Zijlstra <peterz@infradead.org> - 2015-08-19 00:20 +0200
RE: [PATCH v2 4/8] ARCv2: perf: Support sampling events using overflow interrupts Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2015-08-20 13:40 +0200
Re: [PATCH v2 0/8] ARCv2 port to Linux - (C) perf Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2015-08-10 10:30 +0200
Re: [arc-linux-dev] [PATCH v2 0/8] ARCv2 port to Linux - (C) perf Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-08-14 09:50 +0200
csiph-web