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

2012-09-10 Thread Arnaldo Carvalho de Melo
Em Mon, Sep 10, 2012 at 03:07:00PM +0200, Robert Richter escreveu: > 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

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: [PATCH] perf, ibs: Check syscall attribute flags

2012-09-07 Thread Peter Zijlstra
On Fri, 2012-09-07 at 19:18 +0200, Robert Richter wrote: > I was thinking of this too. But this breaks existing code to compile > since static initialization of struct perf_event_attr fails, e.g.: > > builtin-test.c:469:3: error: unknown field ‘watermark’ specified in > initializer > > Oh bugg

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 > > which emulates this is software. > >

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

2012-09-07 Thread David Ahern
On 9/7/12 11:11 AM, 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 which emulates this is software. ugh, that's exactly we n

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 David Ahern
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 which emulates this is software. ugh, that's exactly we need for Intel: if precise is set, exclud

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, > > + .exclude_idle = 1, > > + .exclud

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

2012-09-07 Thread Peter Zijlstra
On Fri, 2012-09-07 at 18:41 +0200, Robert Richter wrote: > From 1d037614edef576da441936bd8c917d31f57b179 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 at

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

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