Re: [PATCH 01/23] perf record: Add --all-user/--all-kernel options

From: Arnaldo Carvalho de Melo
Date: Wed Feb 17 2016 - 09:26:26 EST


Em Tue, Feb 16, 2016 at 07:10:37PM -0800, Andi Kleen escreveu:
> > Need to investigate why there are kernel samples when --all-user is used and
> > the other way around as well.

> This is a known issue due to skid. PEBS usually avoids it.

Right, thanks for pointing this out, we have to detect that :p is not
being used and warn the user about this possibility, i.e. user asks for
just kernel samples, tool finds user samples, tell that using :p+ may
help.

Now, using plain:

# perf record --all-user -a sleep 2

will make it use the default which is 'cycles' with the highest
precision available on the machine, and that leaves just a few samples
that supposedly have the MISC_KERNEL bit set in the perf_event_attr
header, those are not mapping to any mmap area known to the tool, I'm
investigating what this is.

I'll apply the patch as-is, we'll check later OPT_ magic to tell that
those options are mutually exclusive.

- Arnaldo