Re: [PATCH 4/5] perf, amd: Enable northbridge performance counters on AMD family 15h

2012-11-27 Thread Robert Richter
he_event_ids)); Otherwise the whole patch set looks good. Acked-by: Robert Richter Thanks Jacob. -Robert -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.

Re: i386, v3.6-rc3: Kernel panic - not syncing: Fatal exception in interrupt

2012-08-28 Thread Robert Richter
On 27.08.12 17:14:27, Robert Richter wrote: > Steven and Ingo, > > while running profiling tests on 32 bit I got a > > Kernel panic - not syncing: Fatal exception in interrupt Seems not to be a regression, I could trigger it with v3.5 too. The problem seems to be oprofile rela

Re: [PATCH 1/1] x86/oprofile: Fix the calltrace upon profiling some specified events with oprofile

2012-08-28 Thread Robert Richter
On 27.08.12 09:32:13, wei.y...@windriver.com wrote: > From: Wei Yang > > Upon enabling the call-graph functionality of oprofile, A few minutes > later the following calltrace will always occur. > > BUG: unable to handle kernel paging request at 656d6153 This is probably the same I found to yest

Re: [PATCH 1/1] x86/oprofile: Fix the calltrace upon profiling some specified events with oprofile

2012-09-04 Thread Robert Richter
k_pointer(). Also, a fix only in oprofile code does not solve other uses of dump_trace()/kernel_stack_pointer(). So the proper fix I see is to fix kernel_stack_pointer() to return a valid stack in case of an empty stack while in softirq. Something like the patch below. Maybe it must be optimized a

[GIT PULL] oprofile: fixes and updates

2012-09-04 Thread Robert Richter
fea7a08acb13524b47711625eebea40a0ede69a0: Linux 3.6-rc3 (2012-08-22 13:29:06 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git core Robert Richter (2): oprofile, s390: Fix uninitialized memory access when writing to oprofilefs oprofile: Remove

Re: i386, v3.6-rc3: Kernel panic - not syncing: Fatal exception in interrupt

2012-09-04 Thread Robert Richter
On 04.09.12 11:16:16, Steven Rostedt wrote: > On Tue, 2012-08-28 at 10:12 +0200, Robert Richter wrote: > > BUG: unable to handle kernel NULL pointer dereference at 0040 > > IP: [] print_context_stack+0x6e/0x8d > > *pde = > > Oops: [#1] SMP > >

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread Robert Richter
On 10.09.12 10:40:16, David Ahern wrote: > --- a/tools/perf/builtin-record.c > +++ b/tools/perf/builtin-record.c > @@ -294,6 +294,11 @@ try_again: > perf_evsel__name(pos)); > rc = -err; > goto out; >

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread Robert Richter
On 11.09.12 07:22:32, David Ahern wrote: > On 9/11/12 3:20 AM, Robert Richter wrote: > > On 10.09.12 10:40:16, David Ahern wrote: > >> --- a/tools/perf/builtin-record.c > >> +++ b/tools/perf/builtin-record.c > >

Re: [PATCH 3/3] perf tool: give user better message if precise is not supported

2012-09-11 Thread Robert Richter
On 11.09.12 08:32:55, David Ahern wrote: > My guess would be /usr/include/bits/errno.h: > > /* Linux has no ENOTSUP error code. */ > # define ENOTSUP EOPNOTSUPP Ok, so ENOTSUP is actually the same as EOPNOTSUPP. Since the syscall returns a EOPNOTSUPP, I prefer this when checking perf_event_open(

[PATCH] perf, ibs: Add sysfs support

2012-09-12 Thread Robert Richter
allows to specify following ibs options: $ perf record -e ibs_fetch/rand_en=1/GH ... $ perf record -e ibs_op/cnt_ctl=1/GH ... Option cnt_ctl is only enabled if the IBS_CAPS_OPCNT bit is set in ibs cpuid feature flags (family 10h RevC and above). Signed-off-by: Robert Richter --- arch/x86

[PATCH] perf: Introduce function to report unsupported syscall attribute flags

2012-09-12 Thread Robert Richter
: 0010 or (checking precise modifier :ppp): perf: unsupported attribute flags: 00018000 Signed-off-by: Robert Richter --- arch/x86/kernel/cpu/perf_event.c | 19 ++- arch/x86/kernel/cpu/perf_event_amd_ibs.c |3 ++- include/linux/perf_event.h

Re: [PATCH] perf: Introduce function to report unsupported syscall attribute flags

2012-09-12 Thread Robert Richter
On 12.09.12 13:20:43, Peter Zijlstra wrote: > On Wed, 2012-09-12 at 13:01 +0200, Robert Richter wrote: > > + if (notsup) > > + pr_warn("perf: unsupported attribute flags: %016llx\n", > > notsup); > > This is a dmesg DoS.. This could be

[PATCH -v2] x86, 32-bit: Fix invalid stack address while in softirq

2012-09-12 Thread Robert Richter
Updated version below. Changes are: * add comments to kernel_stack_pointer() * always return a valid stack address by falling back to the address of regs -Robert >From 0114d0e2ff6ce3f6015fd991541a45261f14eab1 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Mon, 3 Sep 2012

Re: [tip:perf/core] perf hists: Introduce perf_hpp for hist period printing

2012-09-12 Thread Robert Richter
On 09.09.12 01:54:39, tip-bot for Namhyung Kim wrote: > Commit-ID: ea251d51d2c7d7233790123227f787c477f567f5 > Gitweb: http://git.kernel.org/tip/ea251d51d2c7d7233790123227f787c477f567f5 > Author: Namhyung Kim > AuthorDate: Mon, 3 Sep 2012 11:53:06 +0900 > Committer: Arnaldo Carvalho de Me

Re: [PATCH 1/3] perf tool: precise mode requires exclude_guest

2012-09-12 Thread Robert Richter
ently ignores all exclude_* bits, so there is no impact > to existing IBS code paths. Robert Richter has a patch where IBS code will > return EINVAL if an exclude_* bit is set. When this goes in it means use > of :p on AMD with IBS will first fail with EINVAL (because exclude_guest > wil

Re: [PATCH 1/3] perf tool: precise mode requires exclude_guest

2012-09-13 Thread Robert Richter
On 12.09.12 11:50:57, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 12, 2012 at 07:46:55PM +0200, Robert Richter escreveu: > > On 12.09.12 09:16:28, David Ahern wrote: > > > > > > Kernel side AMD currently ignores all exclude_* bits, so there is no > > > imp

Re: [PATCH] perf record: Add missing perf_hpp__init for pipe-mode

2012-09-13 Thread Robert Richter
On 13.09.12 13:14:30, Namhyung Kim wrote: > From: Namhyung Kim > > The perf_hpp__init() function was only called from setup_browser() so > that the pipe-mode missed the initialization thus didn't respond to > related options. Fix it. > > Reported-by: Robert Richter

[PATCH] perf record: Change error message on failure

2012-09-13 Thread Robert Richter
Only report No CONFIG_PERF_EVENTS=y kernel support configured? if the syscall fails with ENOSYS. In other cases CONFIG_PERF_EVENTS is set and might confuse users. The default message is now: Not all events could be opened. Signed-off-by: Robert Richter --- tools/perf/builtin-record.c

Re: [PATCH] perf record: Change error message on failure

2012-09-13 Thread Robert Richter
On 13.09.12 17:07:20, Ingo Molnar wrote: > > * Robert Richter wrote: > > > Only report > > > > No CONFIG_PERF_EVENTS=y kernel support configured? > > > > if the syscall fails with ENOSYS. In other cases CONFIG_PERF_EVENTS is > > set and mi

[patch 1/2] x86: apic: Export symbols for extended interrupt LVT functions

2008-02-13 Thread Robert Richter
Signed-off-by: Robert Richter <[EMAIL PROTECTED]> --- arch/x86/kernel/apic_64.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index d8d03e0..2a9f4bc 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/

[patch 0/2] x86: Add AMD Barcelona extended interrupt support for 32bit

2008-02-13 Thread Robert Richter
This patch series adds support for extended interrupts on AMD Barcelona CPUs. Implementation is the same as it exists already for 64bit. Also EXPORT_SYMBOL macros are added to the 64bit code. -- Advanced Micro Devices, Inc. Operating System Research Center email: [EMAIL PROTECTED] -- To unsubs

[patch 2/2] x86: apic: Extended interrupt LVT support for AMD Barcelona (32bit)

2008-02-13 Thread Robert Richter
Signed-off-by: Robert Richter <[EMAIL PROTECTED]> --- arch/x86/kernel/apic_32.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 35a568e..a6f9d25 100644 --- a/arch/x86/kernel/a

Re: [patch 1/2] x86: apic: Export symbols for extended interrupt LVT functions

2008-02-14 Thread Robert Richter
On 13.02.08 14:32:56, Arjan van de Ven wrote: > On Wed, 13 Feb 2008 16:19:36 +0100 (CET) > "Robert Richter" <[EMAIL PROTECTED]> wrote: > > > Signed-off-by: Robert Richter <[EMAIL PROTECTED]> > > --- > > arch/x86/kernel/apic_64.c |2 ++ &

Re: [PATCH] Sometimes, there is OOPS happened when we use oprofile.

2012-10-31 Thread Robert Richter
Jun, On 29.10.12 02:33:54, Zhang, Jun wrote: > Sometimes, there is OOPS happened when we use oprofile. next > is the call stack. From call stack, we find in > call_on_stack if there is a nmi interrupt between "xchgl > %%ebx,%%esp" and "call *%%edi", system will OOPS. this should be related and fi

Re: [PATCH] Sometimes, there is OOPS happened when we use oprofile.

2012-10-31 Thread Robert Richter
On 31.10.12 14:33:17, H. Peter Anvin wrote: > I'm vaguely concerned about the following: > > + * To always return a non-null > + * stack pointer we fall back to regs as stack if no previous stack > + * exists. > > The logic being that if there is no stack pointer and the stack is > too empty, to

Re: [PATCH 08/11] perf tool: precise mode requires exclude_guest

2012-07-26 Thread Robert Richter
On 26.07.12 10:07:37, Peter Zijlstra wrote: > On Thu, 2012-07-26 at 08:50 +0300, Gleb Natapov wrote: > > The commit is 144d31e6, but it introduces hook that is used on VMX only. > > SVM does not need it to implement guest/host only counters since it > > has HW support for that in the PMU. > > Righ

Re: [PATCH v3 08/12] perf, persistent: Exposing persistent events using sysfs

2013-08-27 Thread Robert Richter
On 23.08.13 12:39:53, Vince Weaver wrote: > On Fri, 23 Aug 2013, Robert Richter wrote: > Make no assumptions when documenting. When I as a user have to dig around > the kernel source tree to find out what is going on then the documentation > is lacking. > > > > Is this e

Re: [PATCH v3 12/12] [RFC] perf, persistent: ioctl functions to control persistency

2013-08-27 Thread Robert Richter
On 23.08.13 17:08:11, Vince Weaver wrote: > On Fri, 23 Aug 2013, Borislav Petkov wrote: > > > Maybe this makes it more understandable for you but this is beside the > > point. > > Understandability doesn't matter? I agree with Vince on this, the naming should be intuitive. Esp. since 'attach' is

Re: [PATCH v3 12/12] [RFC] perf, persistent: ioctl functions to control persistency

2013-08-27 Thread Robert Richter
> > On Thu, 22 Aug 2013, Robert Richter wrote: > > > This is for Linux man-pages: Updated description below. -Robert Author: Robert Richter Date: Tue Aug 13 11:22:22 2013 +0200 [RFC] perf, persistent: ioctl functions to control persistency Implementing ioc

Re: [PATCH v3 00/12] perf, persistent: Add persistent events

2013-08-27 Thread Robert Richter
On 24.08.13 11:38:26, Borislav Petkov wrote: > this text is very nicely written and should be in a README somewhere. > :-) Yeah, will put it under tools/perf/Documentation/... > > There are ioctl functions to control persistent events that can be > > used to detach or attach an event to or from a

Re: [PATCH v3 12/12] [RFC] perf, persistent: ioctl functions to control persistency

2013-08-27 Thread Robert Richter
d. This is done with refcounts and already implemented. On 27.08.13 14:22:42, Borislav Petkov wrote: > On Tue, Aug 27, 2013 at 01:54:22PM +0200, Robert Richter wrote: > > I got another idea for this, what about UNCLAIM and CLAIM? It is > > exactly, what it is. A process unclaims an

Re: [RFC 0/4] Transparent on-demand struct page initialization embedded in the buddy allocator

2013-07-12 Thread Robert Richter
x27;d say there's > something else being the current bottleneck, besides page init > granularity. > > Can you boot with just a few gigs of RAM and stuff the rest into hotplug > memory, and then hot-add that memory? That would allow easy profiling of > remaining overhead. &

Re: [tip:perf/urgent] perf tools: Fix build errors with O and DESTDIR make vars set

2013-07-12 Thread Robert Richter
On 12.07.13 01:49:40, tip-bot for Robert Richter wrote: > Commit-ID: 107de3724eff5a6fa6474a4d2aa5460b63749ebf > Gitweb: http://git.kernel.org/tip/107de3724eff5a6fa6474a4d2aa5460b63749ebf > Author: Robert Richter > AuthorDate: Tue, 11 Jun 2013 17:22:38 +0200 > Committer: A

Re: [GIT] kbuild changes for v3.11-rc1

2013-07-12 Thread Robert Richter
On 11.07.13 10:16:18, Linus Torvalds wrote: > On Thu, Jul 11, 2013 at 6:54 AM, Michal Marek wrote: > > > > Yeah. It also reveals another bug that we rewrite the kernel.release > > file each time. The odd thing I have in a specific configuration is that depmod is missing the kernelrelease when I o

Re: [PATCH] tools: perf: Fix liblk not built when using perf_install target

2013-08-30 Thread Robert Richter
On 30.08.13 17:18:36, Sedat Dilek wrote: > So, I tried to build perf the "official" way: > >$ make -C tools/ perf_install > > Unfortunately, my build breaks like this: > ... > make[2]: Entering directory > `~/src/linux-kernel/linux/tools/lib/traceevent' > make[2]: Leaving directory > `~/src/l

Re: [PATCH] arm, kbuild: make "make install" not depend on vmlinux

2013-09-30 Thread Robert Richter
On 18.07.13 11:22:24, Michal Marek wrote: > > So Michal (or ARM people - whoever wants to take the patch), just take > > my ack. No objections. > > I can add it to the kbuild tree if needed. Otherwise you can add > Acked-by: Michal Marek . This didn't make it upstream yet, can somebody at it to a

[PATCH] x86, 32-bit: Fix invalid stack address while in softirq

2012-09-06 Thread Robert Richter
ngo, please take a look at this. Not sure if Linus want to look at this too and if we need more optimization here. Thanks, -Robert >From 8e7c16913b1fcfc63f7b24337551aacc7153c334 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Mon, 3 Sep 2012 20:54:48 +0200 Subject: [PATCH] x86, 32-bit: F

Re: [PATCH] x86, 32-bit: Fix invalid stack address while in softirq

2012-09-06 Thread Robert Richter
On 06.09.12 09:14:42, Steven Rostedt wrote: > On Thu, 2012-09-06 at 12:04 +0200, Robert Richter wrote: > > > please take a look at this. Not sure if Linus want to look at this too > > and if we need more optimization here. > > It could probably go either way. Although

Re: [PATCH] x86, 32-bit: Fix invalid stack address while in softirq

2012-09-06 Thread Robert Richter
On 06.09.12 17:34:07, Robert Richter wrote: > On 06.09.12 11:14:42, Steven Rostedt wrote: > > On Thu, 2012-09-06 at 17:02 +0200, Robert Richter wrote: > > > > > > > --- a/arch/x86/oprofile/backtrace.c > > > > > +++ b/arch/x86/oprofile/backtrace.c >

Re: [PATCH] x86, 32-bit: Fix invalid stack address while in softirq

2012-09-06 Thread Robert Richter
On 06.09.12 11:14:42, Steven Rostedt wrote: > On Thu, 2012-09-06 at 17:02 +0200, Robert Richter wrote: > > > > > --- a/arch/x86/oprofile/backtrace.c > > > > +++ b/arch/x86/oprofile/backtrace.c > > > > @@ -113,7 +113,7 @@ x86_backtrace(struct pt_regs

Re: [PATCH 08/11] perf tool: precise mode requires exclude_guest

2012-09-06 Thread Robert Richter
David, On 06.09.12 00:07:52, Peter Zijlstra wrote: > On Wed, 2012-09-05 at 09:43 -0600, David Ahern wrote: > > We need to require exclude_guest when using precise attribute with perf > > else all running VMs on Intel-based servers will crash. I do not have an > > AMD based server to even attempt

Re: [PATCH 08/11] perf tool: precise mode requires exclude_guest

2012-09-06 Thread Robert Richter
David, just found your patch... On 20.07.12 17:25:53, David Ahern wrote: > PEBS cannot be used with guest mode. If user adds :p modifier set > exclude_guest as well. > @@ -653,6 +653,9 @@ int parse_events_modifier(struct list_head *list, char > *str) > eH = 0; >

Re: [PATCH 08/11] perf tool: precise mode requires exclude_guest

2012-09-06 Thread Robert Richter
On 06.09.12 13:17:19, David Ahern wrote: > On 9/6/12 1:02 PM, Robert Richter wrote: > > just found your patch... I tested the patch and it runs ok with my kernel patch that checks syscall attributes for ibs. perf tools falls back and clears exclude_guest/_host bits in attr. It also shoul

[PATCH] perf, ibs: Check syscall attribute flags

2012-09-07 Thread Robert Richter
On 06.09.12 21:56:45, Robert Richter wrote: > I tested the patch and it runs ok with my kernel patch that checks > syscall attributes for ibs. perf tools falls back and clears > exclude_guest/_host bits in attr. This is the patch that checks syscall attributes for ibs. Should be for

Re: [PATCH] perf, ibs: Check syscall attribute flags

2012-09-07 Thread Robert Richter
On 07.09.12 10:50:35, David Ahern wrote: > On 9/7/12 10:41 AM, Robert Richter wrote: > > + struct perf_event_attr notsupp = { > > + .exclude_user = 1, > > + .exclude_kernel = 1, > > + .exclude_hv = 1, > >

Re: [PATCH] perf, ibs: Check syscall attribute flags

2012-09-07 Thread Robert Richter
On 07.09.12 18:56:27, Peter Zijlstra wrote: > > + .exclude_user = 1, > > + .exclude_kernel = 1, > > + .exclude_hv = 1, > > + .exclude_idle = 1, > > + .exclude_host = 1, > > + .exclude_guest = 1, > > Ide

Re: [PATCH] perf, ibs: Check syscall attribute flags

2012-09-07 Thread Robert Richter
On 07.09.12 11:11:56, David Ahern wrote: > On 9/7/12 11:07 AM, Robert Richter wrote: > >> Am I reading this right - if exclude_guest is set then perf_ibs_init > >> returns -EINVAL? > > > > Yes, the hardware does not support this. I will look for a solution &g

[PATCH -v2] perf, ibs: Check syscall attribute flags

2012-09-10 Thread Robert Richter
clude_guest = 1, Version 2 below with static const used. -Robert >From faf80df002709ec95178cf8a6f3f7298200ac1a7 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Wed, 25 Jul 2012 19:12:45 +0200 Subject: [PATCH] perf, ibs: Check syscall attribute flags Current implementation simply ignores attri

Re: [PATCH] perf, ibs: Check syscall attribute flags

2012-09-10 Thread Robert Richter
On 07.09.12 11:20:19, David Ahern wrote: > I see now... intel returns ENOTSUP if exclude_guest is not set, amd > returns EINVAL if it is set. > > For the AMD case the fallback_missing_features code kicks in for > perf-top and perf-record; I just need to fix up the pr_debug for that case. It is

Re: [ 06/37] x86-32: Fix invalid stack address while in softirq

2012-12-04 Thread Robert Richter
On 04.12.12 11:42:58, Herton Ronaldo Krzesinski wrote: > Hi, this makes build fail with oprofile on i386 on 3.0.54: > ERROR: "kernel_stack_pointer" [arch/x86/oprofile/oprofile.ko] undefined! > > The following commit should address this failure: > > commit cb57a2b4cff7edf2a4e32c0163200e9434807e0a

Re: [PATCH 0/4] perf, amd: Enable AMD family 15h northbridge counters

2012-11-12 Thread Robert Richter
Stephane, On 12.11.12 13:24:38, Stephane Eranian wrote: > Anybody from AMD or formerly @ AMD care to submit a libpfm4 patch > to add the Fam15th NB events? > > I'd like to avoid having to type them in manually. Suravee may probably help you here. HTH -Robert -- To unsubscribe from this list: s

Re: [PATCH 0/4] perf, amd: Enable AMD family 15h northbridge counters

2012-11-12 Thread Robert Richter
On 11.11.12 19:17:07, Stephane Eranian wrote: > On Sat, Nov 10, 2012 at 12:50 PM, Robert Richter wrote: > > Peter's main concerns were that my patch set is not in the > > Intel-uncore style. I started reworking this but was not able to > > finish my work. This concerns s

Re: [PATCH 0/4] perf, amd: Enable AMD family 15h northbridge counters

2012-11-12 Thread Robert Richter
Jacob, On 11.11.12 12:44:26, Jacob Shin wrote: > Because > in an upcoming processor family, there is no core performance counter > extensions, but we do have northbridge performance counters. Meaning > the counter address base would be c001 and northbridge counters > live in c0010240, being 0x

Re: [tip:x86/urgent] x86-32: Fix invalid stack address while in softirq

2012-11-13 Thread Robert Richter
On 13.11.12 16:17:27, Ingo Molnar wrote: > > * tip-bot for Robert Richter wrote: > > > Commit-ID: fa22b5dfbea95c14dd96da264e80cac68857ceb7 > > Gitweb: > > http://git.kernel.org/tip/fa22b5dfbea95c14dd96da264e80cac68857ceb7 > > Author: Robert Richter &

Re: [PATCH 0/4] perf, amd: Enable AMD family 15h northbridge counters

2012-11-10 Thread Robert Richter
On 09.11.12 19:01:34, Jacob Shin wrote: > The following patchset enables 4 additional performance counters in > AMD family 15h processors that counts northbridge events -- such as > DRAM accesses. > > This patchset is based on previous work done by Robert Richter > : > &g

Re: [PATCH 4/4] perf, amd: Enable northbridge performance counters on AMD family 15h

2012-11-16 Thread Robert Richter
Jacob, On 15.11.12 15:31:53, Jacob Shin wrote: > On AMD family 15h processors, there are 4 new performance counters > (in addition to 6 core performance counters) that can be used for > counting northbridge events (i.e. DRAM accesses). Their bit fields are > almost identical to the core performanc

Re: [PATCH 4/4] perf, amd: Enable northbridge performance counters on AMD family 15h

2012-11-16 Thread Robert Richter
On 16.11.12 13:00:30, Jacob Shin wrote: > On Fri, Nov 16, 2012 at 07:43:44PM +0100, Robert Richter wrote: > > On 15.11.12 15:31:53, Jacob Shin wrote: > > > @@ -156,31 +161,28 @@ static inline int amd_pmu_addr_offset(int index) > > > if (offset) > > >

Re: [PATCH 4/4] perf, amd: Enable northbridge performance counters on AMD family 15h

2012-11-18 Thread Robert Richter
On 16.11.12 13:00:30, Jacob Shin wrote: > > > static int setup_event_constraints(void) > > > { > > > - if (boot_cpu_data.x86 >= 0x15) > > > + if (boot_cpu_data.x86 == 0x15) > > > x86_pmu.get_event_constraints = amd_get_event_constraints_f15h; > > > > Since this does not cover family 16

Re: [PATCH 1/1] ARM: oprofile: add A5/A7/A15 entries in op_perf_name

2012-11-20 Thread Robert Richter
Will, On 05.11.12 11:31:03, Will Deacon wrote: > > diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c > > index 99c63d4b..ec10db1 100644 > > --- a/arch/arm/oprofile/common.c > > +++ b/arch/arm/oprofile/common.c > > @@ -37,8 +37,11 @@ static struct op_perf_name { > > { "xscale

Re: [PATCH 1/1] ARM: oprofile: add A5/A7/A15 entries in op_perf_name

2012-11-20 Thread Robert Richter
On 20.11.12 15:57:17, Will Deacon wrote: > On Tue, Nov 20, 2012 at 12:17:47PM +0000, Robert Richter wrote: > > Will, > > > > On 05.11.12 11:31:03, Will Deacon wrote: > > > > diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c > > > >

Re: perf: POWER-event translation questions

2012-11-20 Thread Robert Richter
On 09.11.12 11:26:26, Stephane Eranian wrote: > On Thu, Nov 8, 2012 at 2:10 AM, Sukadev Bhattiprolu > wrote: > > 2. Can we allow hyphens in the {name} token (please see my change to > >util/parse-events.l below). With this change, I can run: > > > The current code does not support this but A

Re: [PATCH 1/1] ARM: oprofile: add A5/A7/A15 entries in op_perf_name

2012-11-20 Thread Robert Richter
On 20.11.12 16:55:17, Will Deacon wrote: > On Tue, Nov 20, 2012 at 04:31:58PM +0000, Robert Richter wrote: > > I am thinking of the following: > > > > # cat /root/cpu_type > > arm/armv7-ca5 > > # cat /dev/oprofile/cpu_type > > unknown > > # mount

Re: [PATCH v2 03/14] perf: Add persistent event facilities

2013-06-14 Thread Robert Richter
On 14.06.13 11:15:13, Namhyung Kim wrote: > > +int perf_get_persistent_event_fd(unsigned cpu, struct perf_event_attr > > *attr) > > +{ > > + struct pers_event_desc *desc; > > + > > + if (cpu >= (unsigned)nr_cpu_ids) > > + return -EINVAL; > > + > > + list_for_each_entry(desc, &per

Re: [PATCH 4/4] perf tools: Retry mapping buffers readonly on EACCES

2013-06-14 Thread Robert Richter
On 14.06.13 11:08:40, Namhyung Kim wrote: > > - if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) { > > +try_again2: > > + if (perf_evlist__mmap(evlist, opts->mmap_pages, opts->mmap_ro) < 0) { > > + if (!opts->mmap_ro && errno == EACCES) { > > + opts->mmap_

Re: [PATCH v2 13/14] perf, persistent: Exposing persistent events using sysfs

2013-06-14 Thread Robert Richter
On 14.06.13 11:36:00, Namhyung Kim wrote: > > +static int pers_event_sysfs_register(struct pers_event *event) > > +{ > > + struct device_attribute *attr = &event->sysfs.attr; > > + int idx; > > + > > + *attr = (struct device_attribute)__ATTR(, 0444, pers_event_sysfs_show, > > +

[PATCH 05/16] perf, persistent: Return resonable error code

2013-05-31 Thread Robert Richter
From: Robert Richter Returning -ENODEV if no file descriptor is found. An error code of -1 (-EPERM) is misleading in this case. Signed-off-by: Robert Richter --- kernel/events/persistent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/persistent.c b/kernel

[PATCH 01/16] perf, persistent: Fix build error for no-tracepoints configs

2013-05-31 Thread Robert Richter
From: Robert Richter The mce_record tracepoint needs tracepoints to be enabled. Fixing build error for no-tracepoints configs. Signed-off-by: Robert Richter --- arch/x86/kernel/cpu/mcheck/mce.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86

[PATCH 16/16] perf, persistent: Allow multiple users for an event

2013-05-31 Thread Robert Richter
From: Robert Richter Usually a fd close leads to the release of the event too. For persistent events this is different as the events should be permanently enabled in the system. Using reference counting to avoid releasing an event during a fd close. This also allows it to have multiple users

[PATCH 06/16] perf, persistent: Return -EACCES if mapped buffers must be readonly

2013-05-31 Thread Robert Richter
From: Robert Richter mmap should return EACCES error if fd can not be opened writable. This error code also helps userland to map buffers readonly on failure. Signed-off-by: Robert Richter --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel

[PATCH 07/16] perf, persistent: Rework struct pers_event_desc

2013-05-31 Thread Robert Richter
From: Robert Richter Struct pers_event_desc is only used in kernel/events/persistent.c. Moving it there. Also, removing attr member as this is a copy of event->attr. Signed-off-by: Robert Richter --- include/linux/perf_event.h | 7 --- kernel/events/persistent.c | 12

[PATCH 15/16] perf, persistent: Exposing persistent events using sysfs

2013-05-31 Thread Robert Richter
From: Robert Richter Expose persistent events in the system to userland using sysfs. Perf tools are able to read existing pmu events from sysfs. Now we use a persistent pmu as an event container containing all registered persistent events of the system. This patch adds dynamically registration

[PATCH 12/16] perf, persistent: Avoid adding identical events

2013-05-31 Thread Robert Richter
From: Robert Richter Check if an event already exists before adding it. Signed-off-by: Robert Richter --- kernel/events/persistent.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/events/persistent.c b/kernel/events/persistent.c index ebef089..1e93b51 100644 --- a/kernel

[PATCH 13/16] perf, persistent: Implementing a persistent pmu

2013-05-31 Thread Robert Richter
From: Robert Richter We want to use the kernel's pmu design to later expose persistent events via sysfs to userland. Initially implement a persistent pmu. The format syntax is introduced allowing to set bits anywhere in struct perf_event_attr. This is used in this case to set the persi

[PATCH 08/16] perf, persistent: Remove rb_put()

2013-05-31 Thread Robert Richter
From: Robert Richter rb_put() is called already in perf_event_release_kernel(), so no need to do the same in del_persistent_event(). We also don't need it in add_persistent_event_on_cpu() after a rework. Since there are no users of rb_put() anymore, we can make it private again to only e

[PATCH 14/16] perf, persistent: Name each persistent event

2013-05-31 Thread Robert Richter
From: Robert Richter For later adding persistent events to sysfs we need a name for each event. Adding a name to each persistent event. Signed-off-by: Robert Richter --- arch/x86/kernel/cpu/mcheck/mce.c | 3 ++- include/linux/perf_event.h | 4 ++-- kernel/events/persistent.c

[PATCH 11/16] perf, persistent: Protect event lists with mutex

2013-05-31 Thread Robert Richter
From: Robert Richter Protect esp. access to struct pers_event_desc *desc. There are race conditions possible where the descriptor could be removed from list while it is used. Signed-off-by: Robert Richter --- kernel/events/persistent.c | 36 ++-- 1 file changed

[PATCH 03/16] perf, persistent: Setting default buffer size to 512k as in perf tools

2013-05-31 Thread Robert Richter
From: Robert Richter The default buffer size used to setup event buffers with perf tools is 512k. Using the same buffer size for persistent events. This also avoids failed mmap calls due to different buffer sizes. Signed-off-by: Robert Richter --- kernel/events/persistent.c | 5 - 1 file

[PATCH 10/16] perf, persistent: Reworking perf_get_persistent_event_fd()

2013-05-31 Thread Robert Richter
From: Robert Richter There is already a function anon_inode_getfd() that does already all the work. Reworking and simplifying code. Signed-off-by: Robert Richter --- kernel/events/persistent.c | 35 +++ 1 file changed, 7 insertions(+), 28 deletions(-) diff

[PATCH 04/16] perf, persistent: Print error code on failure when adding events

2013-05-31 Thread Robert Richter
From: Robert Richter Improve error reporting. Signed-off-by: Robert Richter --- kernel/events/persistent.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/events/persistent.c b/kernel/events/persistent.c index 1e6c03a..6612eb77 100644 --- a/kernel/events

[PATCH 00/16] perf, persistent: Kernel updates for perf tool integration

2013-05-31 Thread Robert Richter
From: Robert Richter This patch set implements out of the box support of perf tools for persistent events. For this the kernel must provide necessary information about existing persistent events via sysfs to userland. Persistent events are provided by the kernel with readonly event buffers. To

[PATCH 09/16] perf, persistent: Introduce get_persistent_event()

2013-05-31 Thread Robert Richter
From: Robert Richter Reducing duplicate code by introducing function get_persistent_event() to get the descriptor of an persistent event. Signed-off-by: Robert Richter --- kernel/events/persistent.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions

[PATCH 02/16] perf, persistent: Fix attr size

2013-05-31 Thread Robert Richter
From: Robert Richter Fixing wrongly determined attribute size. Signed-off-by: Robert Richter --- kernel/events/persistent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/persistent.c b/kernel/events/persistent.c index 5335644..9075164 100644 --- a/kernel

[PATCH 0/4] perf tools: Persistent events, changes for perf tool integration

2013-05-31 Thread Robert Richter
From: Robert Richter This patch set contains userland changes necessary for out-of-the-box support of persistent events. These patches are follow on patches of the kernel patches I sent out today: [PATCH 00/16] perf, persistent: Kernel updates for perf tool integration Persistent events are

[PATCH 1/4] perf tools: Rename flex conditions to avoid name conflicts

2013-05-31 Thread Robert Richter
From: Robert Richter These define's may cause conflicts with other definitions: #define INITIAL 0 #define mem 1 #define config 2 #define event 3 Prefix them with cond_* to avoid this. Signed-off-by: Robert Richter --- tools/perf/util/parse-events.l | 24 1

[PATCH 2/4] perf tools: Modify event parser to update event attribute by index

2013-05-31 Thread Robert Richter
From: Robert Richter In a later patch we want to introduce a syntax that allows updating attribute fields by an index pointing to a certain u64 entry of struct perf_event_attr. We need this to expose any event via sysfs that is available in the system where especially flag fields need to be set

[PATCH 3/4] perf tools: Add attr syntax to event parser

2013-05-31 Thread Robert Richter
From: Robert Richter The event parser is limited to update only a subset of all fields in struct perf_event_attr (config*, period, branch_type). We are not able to set other attr fields, esp. flags. Introducing a new syntax to set any field of the event attribute by using an index to the u64

[PATCH 4/4] perf tools: Retry mapping buffers readonly on EACCES

2013-05-31 Thread Robert Richter
From: Robert Richter Persistent event buffers may only be mmapped readonly. Thus, retry mapping it readonly if mmap returns EACCES after trying to mmap writable. Signed-off-by: Robert Richter --- tools/perf/builtin-record.c | 7 ++- tools/perf/builtin-top.c| 8 ++-- tools/perf

Re: [PATCH 00/16] perf, persistent: Kernel updates for perf tool integration

2013-05-31 Thread Robert Richter
On 31.05.13 11:15:40, Borislav Petkov wrote: > On Fri, May 31, 2013 at 10:47:20AM +0200, Robert Richter wrote: > > Patches base on Boris' patches which I have rebased to latest > > tip/perf/core. All patches can be found here: > > > > git://git.kernel.o

Re: [PATCH 0/4] perf tools: Persistent events, changes for perf tool integration

2013-05-31 Thread Robert Richter
> > On Fri, May 31, 2013 at 02:07:20PM +0200, Ingo Molnar wrote: > > > For that I'd like to create a persistent event that just keeps > > > running, and to which I can occasionally attach to read-only to see > > > what's going on and maybe attach to it read-write to drain the trace > > > entries. I

Re: [PATCH 00/16] perf, persistent: Kernel updates for perf tool integration

2013-06-01 Thread Robert Richter
On 31.05.13 14:21:36, Borislav Petkov wrote: > On Fri, May 31, 2013 at 11:32:10AM +0200, Robert Richter wrote: > > Hmm, since the changes in the onliner patches are either hard effort > > to find in reviewing/testing or more or less related to the new > > implementation, I

Re: [PATCH] perf tools: Fix output directory of Documentation/

2013-06-21 Thread Robert Richter
t the in tree build that fails. The patch below fixes this. Thanks for reporting. -Robert >From 69714303856005a1dc84c0594a4c3ec1013f8a80 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Fri, 21 Jun 2013 14:26:44 +0200 Subject: [PATCH] perf tools: Fixing in-tree documentation build error Fix

Re: [PATCH] perf tools: Fix output directory of Documentation/

2013-06-21 Thread Robert Richter
On 21.06.13 10:34:37, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 21, 2013 at 02:50:20PM +0200, Robert Richter escreveu: > > Jiri and Arnaldo, > > > > On 20.06.13 12:26:03, Arnaldo Carvalho de Melo wrote: > > > Robert, so this one is with: > > > > &g

Re: [PATCH v2 03/14] perf: Add persistent event facilities

2013-06-25 Thread Robert Richter
On 24.06.13 11:44:58, Peter Zijlstra wrote: > > +static void del_persistent_event(int cpu, struct perf_event_attr *attr) > > +{ > > + struct pers_event_desc *desc, *tmp; > > + struct perf_event *event = NULL; > > + > > + list_for_each_entry_safe(desc, tmp, &per_cpu(pers_events, cpu), plist) {

Re: [PATCH v2 02/14] perf: Add persistent events

2013-06-25 Thread Robert Richter
On 24.06.13 21:24:04, Borislav Petkov wrote: > On Mon, Jun 24, 2013 at 11:28:07AM +0200, Peter Zijlstra wrote: > > I find this patch incomplete for its asymmetric; there a dec, but not an > > implied inc. > > There's one in perf_mmap_open. > > Basically the idea was to pull up the ->mmap_count de

Re: [PATCH v2 03/14] perf: Add persistent event facilities

2013-06-25 Thread Robert Richter
On 24.06.13 11:32:04, Peter Zijlstra wrote: > I generally disapprove of indented labels. None of the perf code has > that and the tools are easy to 'fix'. > > My quiltrc contains: > > QUILT_DIFF_OPTS="-F ^[[:alpha:]\$_].*[^:]\$" > > my .gitconfig contains: > > [diff "default"] >

Re: [PATCH v2 03/14] perf: Add persistent event facilities

2013-06-25 Thread Robert Richter
On 25.06.13 09:44:01, Peter Zijlstra wrote: > Elsewhere in this series you use 'pers' to shorten things; it reads a > bit odd to me because 'pers' is the Dutch word for press (both meanings > transfer) but that is just something I'll have to live with isn't it ;-) > > As for tracepoint, it seems c

Re: [PATCH v2 00/14] perf, persistent: Kernel updates for perf tool integration

2013-06-25 Thread Robert Richter
On 24.06.13 12:08:19, Peter Zijlstra wrote: > > git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git > > persistent-v2 > > > > OK, so I gave up on reading the patches :/ and went and looked at the git > tree. There's just too much needless churn in the patches. Ok, we will rework th

Re: [PATCH v2 03/14] perf: Add persistent event facilities

2013-06-25 Thread Robert Richter
On 25.06.13 11:37:06, Borislav Petkov wrote: > On Tue, Jun 25, 2013 at 11:24:39AM +0200, Robert Richter wrote: > > I also see 'pers_' not as an optimum since it could be mixed-up easily > > with 'perf_'. Maybe we take 'persist_

Re: [PATCH v2 03/14] perf: Add persistent event facilities

2013-06-25 Thread Robert Richter
On 25.06.13 17:29:41, Borislav Petkov wrote: > How about > > perf_add_pevent? > > It is nice and short, although maybe too short but "pevent" is almost > like a special term and the name shows that it is a special type of > event, i.e. a p-event. Fine with me, though it's more for internal usage

Re: [PATCH v2 00/14] perf, persistent: Kernel updates for perf tool integration

2013-06-25 Thread Robert Richter
On 24.06.13 12:22:00, Peter Zijlstra wrote: > On Tue, Jun 11, 2013 at 06:42:26PM +0200, Robert Richter wrote: > > Note that perf tools need to support the 'attr' syntax that is > > added in a separate patch set. With it we are able to run perf tool > > commands

  1   2   3   4   5   6   7   8   9   10   >