[PATCH v6 2/2] arm: perf: Add event descriptions

2015-10-28 Thread Drew Richardson
Add additional information about the ARM architected hardware events to make counters self describing. This makes the hardware PMUs easier to use as perf list contains possible events instead of users having to refer to documentation like the ARM TRMs. Signed-off-by: Drew Richardson --- arch

[PATCH v6 1/2] arm: perf: Convert event enums to #defines

2015-10-28 Thread Drew Richardson
The enums are not necessary and this allows the event values to be used to construct static strings at compile time. Signed-off-by: Drew Richardson --- arch/arm/kernel/perf_event_v7.c | 186 ++-- 1 file changed, 85 insertions(+), 101 deletions(-) diff --git

Re: [PATCH 1/2] arm: perf: Convert event enums to #defines

2015-10-28 Thread Drew Richardson
On Wed, Oct 28, 2015 at 08:10:14AM -0700, Drew Richardson wrote: > Add additional information about the ARM architected hardware events > to make counters self describing. This makes the hardware PMUs easier > to use as perf list contains possible events instead of users having >

[PATCH v6 0/2] arm: perf: Add event descriptions

2015-10-28 Thread Drew Richardson
Here's another spin of the arm32 version of adding the event descriptors, this time without the weird copy of attr_groups in armpmu_init which was there last time [0]. This depends on Marks fix [1]. GIT: [PATCH 1/2] arm: perf: Convert event enums to #defines GIT: [PATCH 2/2] arm: perf: Add event d

[PATCH 1/2] arm: perf: Convert event enums to #defines

2015-10-28 Thread Drew Richardson
Add additional information about the ARM architected hardware events to make counters self describing. This makes the hardware PMUs easier to use as perf list contains possible events instead of users having to refer to documentation like the ARM TRMs. Signed-off-by: Drew Richardson --- arch

[PATCH 1/2] arm: perf: Convert event enums to #defines

2015-10-28 Thread Drew Richardson
>From 7a5ccb14449d6ccdf34c38c2c32e739da3552c5f Mon Sep 17 00:00:00 2001 From: Drew Richardson Date: Tue, 13 Oct 2015 07:55:16 -0700 Subject: [PATCH 1/2] arm: perf: Convert event enums to #defines The enums are not necessary and this allows the event values to be used to construct static stri

[PATCH 2/2] arm64: perf: Add event descriptions

2015-10-22 Thread Drew Richardson
Add additional information about the ARM architected hardware events to make counters self describing. This makes the hardware PMUs easier to use as perf list contains possible events instead of users having to refer to documentation like the ARM TRMs. Signed-off-by: Drew Richardson --- arch

[PATCH 1/2] arm64: perf: Convert event enums to #defines

2015-10-22 Thread Drew Richardson
The enums are not necessary and this allows the event values to be used to construct static strings at compile time. Signed-off-by: Drew Richardson --- arch/arm64/kernel/perf_event.c | 95 -- 1 file changed, 45 insertions(+), 50 deletions(-) diff --git a

Re: [PATCHv2] arm: perf: Add event descriptions

2015-10-22 Thread Drew Richardson
On Fri, Oct 09, 2015 at 03:13:38AM -0700, Will Deacon wrote: > Also, would you be able to do something similar for AArch64 too, please? > (take a look at our for-next/core branch for the latest perf changes). Here are some almost identical patches for AArch64 based on arm64 tree's for-next/core br

Re: [PATCH v5 2/2] arm: perf: Add event descriptions

2015-10-15 Thread Drew Richardson
On Thu, Oct 15, 2015 at 04:41:26PM +0100, Mark Rutland wrote: > On Thu, Oct 15, 2015 at 04:29:15PM +0100, Will Deacon wrote: > > On Thu, Oct 15, 2015 at 08:15:06AM -0700, Drew Richardson wrote: > > > On Thu, Oct 15, 2015 at 02:21:12PM +0100, Will Deacon wrote: > > > >

Re: [PATCH v5 2/2] arm: perf: Add event descriptions

2015-10-15 Thread Drew Richardson
On Thu, Oct 15, 2015 at 02:21:12PM +0100, Will Deacon wrote: > On Tue, Oct 13, 2015 at 08:36:45AM -0700, Drew Richardson wrote: > > Add additional information about the ARM architected hardware events > > to make counters self describing. This makes the hardware PMUs easier > >

Re: [PATCH v5 2/2] arm: perf: Add event descriptions

2015-10-13 Thread Drew Richardson
Add additional information about the ARM architected hardware events to make counters self describing. This makes the hardware PMUs easier to use as perf list contains possible events instead of users having to refer to documentation like the ARM TRMs. Signed-off-by: Drew Richardson --- arch

Re: [PATCH v5 1/2] arm: perf: Convert event enums to #defines

2015-10-13 Thread Drew Richardson
The enums are not necessary and this allows the event values to be used to construct static strings at compile time. Signed-off-by: Drew Richardson --- arch/arm/kernel/perf_event_v7.c | 186 ++-- 1 file changed, 85 insertions(+), 101 deletions(-) diff --git

Re: [PATCH v5 0/2] arm: perf: Add event descriptions

2015-10-13 Thread Drew Richardson
I've done as suggested and converted all the events to #defines and split it up into two patches. GIT: [PATCH 1/2] arm: perf: Convert event enums to #defines GIT: [PATCH 2/2] arm: perf: Add event descriptions -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCHv2] arm: perf: Add event descriptions

2015-10-12 Thread Drew Richardson
o make counters self describing. This makes the hardware PMUs easier to use as perf list contains possible events instead of users having to refer to documentation like the ARM TRMs. Signed-off-by: Drew Richardson --- arch/arm/kernel/perf_event_v7.c | 241 +

Re: [PATCHv2] arm: perf: Add event descriptions

2015-10-09 Thread Drew Richardson
On Fri, Oct 09, 2015 at 11:13:38AM +0100, Will Deacon wrote: > On Wed, Oct 07, 2015 at 11:28:18AM -0700, Drew Richardson wrote: > > Add additional information about the ARM architected hardware events > > to make counters self describing. This makes the hardware PMUs easier > >

[PATCHv2] arm: perf: Add event descriptions

2015-10-07 Thread Drew Richardson
Add additional information about the ARM architected hardware events to make counters self describing. This makes the hardware PMUs easier to use as perf list contains possible events instead of users having to refer to documentation like the ARM TRMs. Signed-off-by: Drew Richardson --- arch

Re: [PATCH] arm: perf: Fix userspace call stack walking

2015-10-01 Thread Drew Richardson
On Thu, Oct 01, 2015 at 08:10:41PM +0100, Russell King - ARM Linux wrote: > On Thu, Oct 01, 2015 at 10:26:47AM -0700, Drew Richardson wrote: > > The layout of stack frames has changed over time. Testing using a > > arm-linux-gnueabi gcc-4.2 from 2007 the original code didn't w

[PATCH] arm: perf: Fix userspace call stack walking

2015-10-01 Thread Drew Richardson
f gcc. gcc has this layout for it's stackframes caller_fp caller_lr <- fp However clang has this layout caller_fp <- fp caller_lr Since the layouts are not compatible use a heuristic to determine for each stack frame which layout is used. Signed-off-by: Drew Richardson ---

Re: [PATCH] arm: perf: Add event descriptions

2015-09-24 Thread Drew Richardson
On Mon, Aug 17, 2015 at 10:40:35PM +0100, Drew Richardson wrote: > On Wed, Aug 26, 2015 at 05:51:49PM +0100, Will Deacon wrote: > > On Mon, Aug 17, 2015 at 09:58:09PM +0100, Drew Richardson wrote: > > > On Tue, Aug 04, 2015 at 01:15:23AM +0100, Drew Richardson wrote: >

Re: [PATCH] arm: perf: Add event descriptions

2015-08-26 Thread Drew Richardson
On Wed, Aug 26, 2015 at 05:51:49PM +0100, Will Deacon wrote: > On Mon, Aug 17, 2015 at 09:58:09PM +0100, Drew Richardson wrote: > > On Tue, Aug 04, 2015 at 01:15:23AM +0100, Drew Richardson wrote: > > > Add additional information about hardware events to make counters self >

Re: [PATCH] arm: perf: Add event descriptions

2015-08-26 Thread Drew Richardson
On Tue, Aug 04, 2015 at 01:15:23AM +0100, Drew Richardson wrote: > Add additional information about hardware events to make counters self > describing. This makes the hardware PMUs easier to use as perf list > contains the possible events instead of users having to refer to > docume

Re: [PATCH] ARM: Mark ret_fast_syscall as a function

2015-08-06 Thread Drew Richardson
On Thu, Aug 06, 2015 at 06:30:40PM +0100, Nicolas Pitre wrote: > On Thu, 6 Aug 2015, Drew Richardson wrote: > > > On Tue, Jul 14, 2015 at 01:45:57PM +0100, Drew Richardson wrote: > > > ret_fast_syscall runs when user space makes a syscall. However it > > > needs t

Re: [PATCH] ARM: Mark ret_fast_syscall as a function

2015-08-06 Thread Drew Richardson
On Tue, Jul 14, 2015 at 01:45:57PM +0100, Drew Richardson wrote: > ret_fast_syscall runs when user space makes a syscall. However it > needs to be marked as such so the ELF information is correct. Before > it was: > >101: 8000f300 0 NOTYPE LOCAL DEFAULT2 ret_fast_s

[PATCH] arm: perf: Add event descriptions

2015-08-03 Thread Drew Richardson
without requiring an update. Signed-off-by: Drew Richardson --- arch/arm/kernel/perf_event.c| 1 + arch/arm/kernel/perf_event_v7.c | 617 2 files changed, 618 insertions(+) diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index

[PATCH] ARM: Mark ret_fast_syscall as a function

2015-07-15 Thread Drew Richardson
DEFAULT2 ret_fast_syscall I see this function when using perf to unwind call stacks from kernel space to user space. Without this change I would need to add some special case logic when using the vmlinux ELF information. Signed-off-by: Drew Richardson --- arch/arm/kernel/entry-common.S | 1

[PATCHv3] ftrace: Provide trace clock monotonic raw

2015-05-08 Thread Drew Richardson
useful for tracing early boot, e.g. when debugging issues with NTP. Signed-off-by: Drew Richardson Acked-by: Mathieu Desnoyers --- kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 05330494a0df..458031c31a37 100644 --- a/ke

Re: [PATCH] ftrace: Provide trace clock monotonic raw

2015-05-08 Thread Drew Richardson
On Fri, May 08, 2015 at 03:09:03PM +0100, Steven Rostedt wrote: > On Tue, 5 May 2015 07:54:46 -0700 > Drew Richardson wrote: > > > CLOCK_MONOTONIC_RAW will advance more constantly than CLOCK_MONOTONIC. > > > > Imagine someone is trying to optimize a p

[PATCHv2] ftrace: Provide trace clock monotonic raw

2015-05-07 Thread Drew Richardson
Expose the NMI safe accessor to the monotonic raw clock to the tracer. The mono clock was added with commit 1b3e5c0936046e7e023149ddc8946d21c2ea20eb. Although the monotonic raw clock cannot be used to compare time between different machines, it is not perturbed by ntp. Signed-off-by: Drew

Re: [PATCH] ftrace: Provide trace clock monotonic raw

2015-05-05 Thread Drew Richardson
On Mon, May 04, 2015 at 09:57:48PM +0100, Peter Zijlstra wrote: > On Mon, May 04, 2015 at 01:05:19PM -0700, Drew Richardson wrote: > > I'm collecting and merging data from perf, with Android Atrace data > > (writes to /sys/kernel/debug/tracing/trace_marker) which ends up in &

Re: [PATCH] ftrace: Provide trace clock monotonic raw

2015-05-04 Thread Drew Richardson
notonic raw > > clock cannot be used to compare time between different machines, it is > > not perterbed by ntp. > > perterbed -> perturbed Oops, I'll correct that in the next version. > > > > Signed-off-by: Drew Richardson > > > > What is t

[PATCH] ftrace: Provide trace clock monotonic raw

2015-05-04 Thread Drew Richardson
Expose the NMI safe accessor to the monotonic raw clock to the tracer. The mono clock was added with commit 1b3e5c0936046e7e023149ddc8946d21c2ea20eb. Although the monotonic raw clock cannot be used to compare time between different machines, it is not perterbed by ntp. Signed-off-by: Drew

Re: [PATCH] Export irq tracepoints for use by kernel modules

2014-04-22 Thread Drew Richardson
On Tue, Apr 22, 2014 at 04:01:03PM +0100, Josh Boyer wrote: > On Tue, Apr 22, 2014 at 10:26 AM, Christoph Hellwig > wrote: > > On Tue, Apr 22, 2014 at 07:24:20AM -0700, Drew Richardson wrote: > >> After commit de7b2973903c6cc50b31ee5682a69b2219b9919d ("tracepoint: >

Re: [PATCH] Export irq tracepoints for use by kernel modules

2014-04-22 Thread Drew Richardson
On Tue, Apr 22, 2014 at 03:26:13PM +0100, Christoph Hellwig wrote: > On Tue, Apr 22, 2014 at 07:24:20AM -0700, Drew Richardson wrote: > > After commit de7b2973903c6cc50b31ee5682a69b2219b9919d ("tracepoint: > > Use struct pointer instead of name hash for reg/unreg tracepoints&qu

Re: [PATCH] Export sched tracepoints for use by kernel modules

2014-04-22 Thread Drew Richardson
On Tue, Apr 22, 2014 at 03:45:04PM +0100, Ingo Molnar wrote: > > * Drew Richardson wrote: > > > After commit de7b2973903c6cc50b31ee5682a69b2219b9919d ("tracepoint: > > Use struct pointer instead of name hash for reg/unreg tracepoints"), > > any tracep

[PATCH] Export irq tracepoints for use by kernel modules

2014-04-22 Thread Drew Richardson
After commit de7b2973903c6cc50b31ee5682a69b2219b9919d ("tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported. Signed-off-by: Drew Richardson Acked-by: Pawel Moll --- kernel/softirq.c | 6 ++ 1 fi

[PATCH] Export block tracepoints for use by kernel modules

2014-04-22 Thread Drew Richardson
After commit de7b2973903c6cc50b31ee5682a69b2219b9919d ("tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported. Signed-off-by: Drew Richardson Acked-by: Pawel Moll --- block/blk-core.c | 15

[PATCH] Export sched tracepoints for use by kernel modules

2014-04-22 Thread Drew Richardson
After commit de7b2973903c6cc50b31ee5682a69b2219b9919d ("tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported. Signed-off-by: Drew Richardson Acked-by: Pawel Moll --- kernel/sched/c

[PATCH] Export kmem tracepoints for use by kernel modules

2014-04-22 Thread Drew Richardson
After commit de7b2973903c6cc50b31ee5682a69b2219b9919d ("tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported. Signed-off-by: Drew Richardson Acked-by: Pawel Moll --- mm/util.c | 6 ++ 1 file

Re: Perf Oops on 3.14-rc2

2014-02-19 Thread Drew Richardson
On Wed, Feb 19, 2014 at 04:28:19PM +, Peter Zijlstra wrote: > On Tue, Feb 18, 2014 at 10:18:31AM +, Will Deacon wrote: > > On Mon, Feb 10, 2014 at 10:17:59PM +0000, Drew Richardson wrote: > > > While adding CPU on/offlining support during perf captures I get an > &g

Perf Oops on 3.14-rc2

2014-02-10 Thread Drew Richardson
While adding CPU on/offlining support during perf captures I get an Oops both on ARM as well as my desktop x86_64. Below is a small program that duplicates the issue. Here's the oops from an ARM Versatile Express TC2 board running a vanilla 3.14-rc2 kernel. [ 119.176648] Unable to handle kernel