On Mon, May 30, 2016 at 02:39:06AM +0200, Jan Hubicka wrote:
> > 
> > Since maintaining the script would be somewhat tedious (needs changes
> > every time a new CPU comes out) I auto generated it from the online
> > Intel event database. The script to do that is in contrib and can be
> > rerun.
> 
> I guess we need to figure out how to ship this to users.  At the moment
> the script will tell you to rebuild when it meets new CPU, but it reffers
> to gcc sources which is not the best place.

I don't have a better solution.

> 
> Also the script should insteall when it is documented in invoke.texi

I wasn't sure if it should be installed or not, but opted for not. 
For now I can remove the documentation.

> 
> What happens when you ahve wrong perf?

You mean with the manual example? It will just error out,
because it requires Google's special patched version.
Also the event name is not always the same, so it's only working
on some CPUs.

With my script perf should work, but you need LBR support in the kernel for
using -b. LBRs are a model specific feature, and this needs:

- The kernel is new enough and knows about your CPU model
(dmesg | grep Perf.*LBR outputs something)

- LBRs are typically not virtualized[1], so it usually does not work
in VMs

When the LBR support is not there the profiling run will not
work at all.

-Andi

[1] There are some patches for KVM, but they are not mainline so far.

-- 
a...@linux.intel.com -- Speaking for myself only

Reply via email to