Re: [PATCH v3 3/6] ARCv2: perf: Support sampling events using overflow interrupts

From: Alexey Brodkin
Date: Wed Aug 26 2015 - 10:36:13 EST


Hi Peter,

On Wed, 2015-08-26 at 16:32 +-0200, Peter Zijlstra wrote:
+AD4- On Wed, Aug 26, 2015 at 01:21:08PM +-0000, Alexey Brodkin wrote:
+AD4- +AD4- Hi Peter,
+AD4- +AD4-
+AD4- +AD4- On Wed, 2015-08-26 at 15:12 +-0200, Peter Zijlstra wrote:
+AD4- +AD4- +AD4- On Mon, Aug 24, 2015 at 05:20:20PM +-0300, Alexey Brodkin wrote:
+AD4- +AD4- +AD4- +AD4- +AEAAQA- -295,6 +-317,16 +AEAAQA- static int arc+AF8-pmu+AF8-add(struct perf+AF8-event +ACo-event, int flags)
+AD4- +AD4- +AD4- +AD4- +AH0-
+AD4- +AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- +AD4- write+AF8-aux+AF8-reg(ARC+AF8-REG+AF8-PCT+AF8-INDEX, idx)+ADs-
+AD4- +AD4- +AD4- +AD4- +-
+AD4- +AD4- +AD4- +AD4- +- arc+AF8-pmu-+AD4-act+AF8-counter+AFs-idx+AF0- +AD0- event+ADs-
+AD4- +AD4- +AD4- +AD4- +-
+AD4- +AD4- +AD4- +AD4- +- if (is+AF8-sampling+AF8-event(event)) +AHs-
+AD4- +AD4- +AD4- +AD4- +- /+ACo- Mimic full counter overflow as other arches do +ACo-/
+AD4- +AD4- +AD4- +AD4- +- write+AF8-aux+AF8-reg(ARC+AF8-REG+AF8-PCT+AF8-INT+AF8-CNTL, (u32)arc+AF8-pmu-+AD4-max+AF8-period)+ADs-
+AD4- +AD4- +AD4- +AD4- +- write+AF8-aux+AF8-reg(ARC+AF8-REG+AF8-PCT+AF8-INT+AF8-CNTH,
+AD4- +AD4- +AD4- +AD4- +- (arc+AF8-pmu-+AD4-max+AF8-period +AD4APg- 32))+ADs-
+AD4- +AD4- +AD4- +AD4- +- +AH0-
+AD4- +AD4- +AD4- +AD4- +-
+AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- pmu::add should call pmu::start when PERF+AF8-EF+AF8-START, without that it
+AD4- +AD4- +AD4- should not start the counter, only schedule it.
+AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- (although currently all pmu::add() calls will have EF+AF8-START set)
+AD4- +AD4-
+AD4- +AD4- And that's what we do, don't we?
+AD4- +AD4- -----------------------+AD4-8-----------------------
+AD4- +AD4- if (flags +ACY- PERF+AF8-EF+AF8-START)
+AD4- +AD4- arc+AF8-pmu+AF8-start(event, PERF+AF8-EF+AF8-RELOAD)+ADs-
+AD4- +AD4- -----------------------+AD4-8-----------------------
+AD4- +AD4-
+AD4-
+AD4- D'uh indeed+ACE- I read that above as enabling it, while what it really does
+AD4- it simply program the interrupt thresholds.

That's ok.
So do I need to do anything now or both your initial comments today are no longer valid?

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