[PATCH] perf: Fix UAPI fallout

From: Ingo Molnar
Date: Sun Oct 14 2012 - 04:56:25 EST



Find below a stab at that, lightly tested.

Arnaldo: the way we include some of the include files directly
into tools/perf/ .c files [such as hw_breakpoint.h] and
represent others transparently via utils/include/ [such as
rbtree.h] is a bit messy and ought to be cleaned up I suspect.

What we want in .c files are not ../.. inclusions but the
'seemless' <linux/abc.h> inclusions. Which is the overwhelming
majority, gladly. Do we want to make that the 100% majority?

We should probably also think about how to represent kernel
versus UAPI headers in tools/perf/, plus the /usr/include/linux/
headers which are always an option to get picked up.

I think the best model would be to cleanly separate from any
/usr/include/linux/ muck, which might be out of sync, and which
might stand in the way of changes. Is it possible to exclude all
of /usr/include/ and try to build purely from
include/uapi/linux/, with a few exceptions (with clearly
distinctive patterns) where we [currently] need to pick up
include/linux/ headers, such as hw_breakpoint.h or rbtree.h?

This would clean up the code and would also make it easier to
drive UAPI conversions: the bits that we still pick up from
include/linux/ are candidates for (incremental, slow, well
tested, please) UAPI conversions.

Thanks,

Ingo

------------>