Re: [PATCH 0/4] perf, pt, coresight: AUX flags and VMX update

From: Alexander Shishkin
Date: Mon Feb 20 2017 - 11:32:43 EST


Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> writes:

> Em Mon, Feb 20, 2017 at 05:39:43PM +0200, Adrian Hunter escreveu:
>> On 20/02/17 17:18, Alexander Shishkin wrote:
>> > Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> writes:
>> >
>> >> With the vmm_exclusive=0, PT seems to be much more usable on BDW now. This
>> >> patchset does three things:
>> >> * adds a flag to PERF_RECORD_AUX, signalling that a transaction has gaps
>> >> in it (due to VMX root mode kicking in),
>> >
>> > In the above context, will something like this be fine?
>
>> Looks fine to me.
>
>> Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
>>
>> > From: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
>> > Subject: [PATCH] perf tools: Handle partial AUX records and print a warning
>
>> > This patch decodes the 'partial' flag in AUX records and prints
>> > a warning to the user, so that they don't have to guess why their
>> > PT traces contain gaps (or missing altogether):
>
>> >> Warning:
>> >> AUX data had gaps in it 6 times out of 8!
>
> The above should be left for a more verbose mode?
>
>> >> Are you running a KVM guest in the background?
>
> The warning should be a bit more precise, as you said, tuning
> vmm_exclusive is key here, i.e.:
>
> "Are you running a KVM guest in the background with
> kvm_intel.vmm_exclusive=1?"

You'll still get gaps with vmm_exclusive=0 if you run perf record -a or
if you try to trace the actual kvm.

> And that we can even figure out, its just a matter of reading:
>
> [root@jouet ~]# cat /sys/module/kvm_intel/parameters/vmm_exclusive
> Y
>
> I have tested after setting that using:
>
> modprobe kvm_intel vmm_exclusive=n
>
> And I was able to get Intel PT records from a workload.
>
> So perhaps we can get this patch in, which improves the situation, and
> then, on top of it do these extra checks and give proper hints, ok?

Sure.

Thanks,
--
Alex