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

From: Alexander Shishkin
Date: Thu Mar 16 2017 - 12:42:11 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?

Other similar warnings come at the default verbosity level (that is,
same as this one), so I thought I'd just follow their example. It's
useful information though, you can make deductions based on how many
records are 'partial'. If it's all of them, then you should likely stop
trying to trace kvm process, for example.

>> >> 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?"
>
> And that we can even figure out, its just a matter of reading:
>
> [root@jouet ~]# cat /sys/module/kvm_intel/parameters/vmm_exclusive
> Y

Indeed, how about something like below? I'm kind of new to wording
user-friendly warnings, but the general idea is like what you're
suggesting.