Re: [PATCH] perf evlist: Fix error out while applying initial delay and LBR

2018-07-26 Thread Arnaldo Carvalho de Melo
Em Mon, Jul 09, 2018 at 05:20:54PM +0200, Jiri Olsa escreveu:
> On Mon, Jul 09, 2018 at 07:15:22AM -0700, kan.li...@linux.intel.com wrote:
> > After applying the patch:
> >   perf record -D 1000 -a -e cycles -j any -- sleep 2
> >   [ perf record: Woken up 1 times to write data ]
> >   [ perf record: Captured and wrote 1.054 MB perf.data (828 samples) ]
> > 
> > Reported-by: Pandey, Sunil K 
> > Signed-off-by: Kan Liang 
> 
> Acked-by: Jiri Olsa 

Thanks, applied, tested.

- Arnaldo


Re: [PATCH] perf evlist: Fix error out while applying initial delay and LBR

2018-07-26 Thread Arnaldo Carvalho de Melo
Em Mon, Jul 09, 2018 at 05:20:54PM +0200, Jiri Olsa escreveu:
> On Mon, Jul 09, 2018 at 07:15:22AM -0700, kan.li...@linux.intel.com wrote:
> > After applying the patch:
> >   perf record -D 1000 -a -e cycles -j any -- sleep 2
> >   [ perf record: Woken up 1 times to write data ]
> >   [ perf record: Captured and wrote 1.054 MB perf.data (828 samples) ]
> > 
> > Reported-by: Pandey, Sunil K 
> > Signed-off-by: Kan Liang 
> 
> Acked-by: Jiri Olsa 

Thanks, applied, tested.

- Arnaldo


Re: [PATCH] perf evlist: Fix error out while applying initial delay and LBR

2018-07-09 Thread Jiri Olsa
On Mon, Jul 09, 2018 at 07:15:22AM -0700, kan.li...@linux.intel.com wrote:
> From: Kan Liang 
> 
> Perf record will error out if both --delay and LBR are applied.
> For example:
>   perf record -D 1000 -a -e cycles -j any -- sleep 2
>   Error:
>   dummy:HG: PMU Hardware doesn't support sampling/overflow-interrupts.
>   Try 'perf stat'
> 
> A dummy event is added implicitly for initial delay, which has the same
> configurations as real sampling events. The dummy event is a software
> event. If LBR is configured, perf must error out.
> 
> The dummy event only be used to track PERF_RECORD_MMAP while perf waits
> for the initial delay to enable the real events. The BRANCH_STACK bit
> can be safely cleared for the dummy event.
> 
> After applying the patch:
>   perf record -D 1000 -a -e cycles -j any -- sleep 2
>   [ perf record: Woken up 1 times to write data ]
>   [ perf record: Captured and wrote 1.054 MB perf.data (828 samples) ]
> 
> Reported-by: Pandey, Sunil K 
> Signed-off-by: Kan Liang 

Acked-by: Jiri Olsa 

thanks,
jirka


Re: [PATCH] perf evlist: Fix error out while applying initial delay and LBR

2018-07-09 Thread Jiri Olsa
On Mon, Jul 09, 2018 at 07:15:22AM -0700, kan.li...@linux.intel.com wrote:
> From: Kan Liang 
> 
> Perf record will error out if both --delay and LBR are applied.
> For example:
>   perf record -D 1000 -a -e cycles -j any -- sleep 2
>   Error:
>   dummy:HG: PMU Hardware doesn't support sampling/overflow-interrupts.
>   Try 'perf stat'
> 
> A dummy event is added implicitly for initial delay, which has the same
> configurations as real sampling events. The dummy event is a software
> event. If LBR is configured, perf must error out.
> 
> The dummy event only be used to track PERF_RECORD_MMAP while perf waits
> for the initial delay to enable the real events. The BRANCH_STACK bit
> can be safely cleared for the dummy event.
> 
> After applying the patch:
>   perf record -D 1000 -a -e cycles -j any -- sleep 2
>   [ perf record: Woken up 1 times to write data ]
>   [ perf record: Captured and wrote 1.054 MB perf.data (828 samples) ]
> 
> Reported-by: Pandey, Sunil K 
> Signed-off-by: Kan Liang 

Acked-by: Jiri Olsa 

thanks,
jirka