Re: [PATCH v2 4/4] perf/x86/intel/pt: Opportunistically use single range output mode

From: Alexander Shishkin
Date: Wed Oct 23 2019 - 11:09:50 EST


Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> writes:

> diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
> index 2f20d5a333c1..6edd7b785861 100644
> --- a/arch/x86/events/intel/pt.c
> +++ b/arch/x86/events/intel/pt.c
> @@ -491,7 +491,9 @@ static void pt_config(struct perf_event *event)
> }
>
> reg = pt_config_filters(event);
> - reg |= RTIT_CTL_TOPA | RTIT_CTL_TRACEEN;
> + reg |= RTIT_CTL_TRACEEN;
> + if (!buf->single)
> + reg |= RTIT_CTL_TOPA;

This one is broken. The below is better.