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

From: Jiri Olsa
Date: Mon Jul 09 2018 - 11:21:01 EST


On Mon, Jul 09, 2018 at 07:15:22AM -0700, kan.liang@xxxxxxxxxxxxxxx wrote:
> From: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
>
> 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 <sunil.k.pandey@xxxxxxxxx>
> Signed-off-by: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>

Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

thanks,
jirka