summaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/perf_event.h
Commit message (Collapse)AuthorAgeFilesLines
* arc: perf: Enable generic "cache-references" and "cache-misses" eventsAlexey Brodkin2016-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | We used to live with PERF_COUNT_HW_CACHE_REFERENCES and PERF_COUNT_HW_CACHE_REFERENCES not specified on ARC. Those events are actually aliases to 2 cache events that we do support and so this change sets "cache-reference" and "cache-misses" events in the same way as "L1-dcache-loads" and L1-dcache-load-misses. And while at it adding debug info for cache events as well as doing a subtle fix in HW events debug info - config value is much better represented by hex so we may see not only event index but as well other control bits set (if they exist). Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: perf: Finally introduce HS perf unitVineet Gupta2015-08-271-1/+4
| | | | | | | | | | With all features in place, the ARC HS pct block can now be effectively allowed to be probed/used Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: perf: implement exclusion of event counting in user or kernel modeAlexey Brodkin2015-08-271-0/+3
| | | | | | | Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARCv2: perf: Support sampling events using overflow interruptsAlexey Brodkin2015-08-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In times of ARC 700 performance counters didn't have support of interrupt an so for ARC we only had support of non-sampling events. Put simply only "perf stat" was functional. Now with ARC HS we have support of interrupts in performance counters which this change introduces support of. ARC performance counters act in the following way in regard of interrupts generation. [1] A counter counts starting from value set in PCT_COUNT register pair [2] Once counter reaches value set in PCT_INT_CNT interrupt is raised Basic setup look like this: [1] PCT_COUNT = 0; [2] PCT_INT_CNT = __limit_value__; [3] Enable interrupts for that counter and let it run [4] Let counter reach its limit [5] Handle interrupt when it happens Note that PCT HW block is build in CPU core and so ints interrupt line (which is basically OR of all counters IRQs) is wired directly to top-level IRQC. That means do de-assert PCT interrupt it's required to reset IRQs from all counters that have reached their limit values. Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: perf: cap the number of counters to hardware max of 32Vineet Gupta2015-08-271-2/+3
| | | | | | | | | | | The number of counters in PCT can never be more than 32 (while countable conditions could be 100+) for both ARCompact and ARCv2 And while at it update copyright dates. Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: add/fix some comments in code - no functional changeVineet Gupta2015-08-201-1/+1
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: perf: support cache hit/miss ratioVineet Gupta2015-04-201-5/+12
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: perf: Add some comments/debug stuffVineet Gupta2015-04-201-29/+24
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Add perf support for ARC700 coresMischa Jonker2013-11-121-1/+203
| | | | | | | | | This adds basic perf support for ARC700 cores. Most PERF_COUNT_HW* events are supported now. Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: perf support (software counters only)Vineet Gupta2013-02-151-0/+13
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>