This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] configure: check for perf_event.h version


On 08/06/2015 02:06 PM, Markus Metzger wrote:
> Intel(R) Processor Trace support requires a recent linux/perf_event.h header.
> 
> When GDB is built on an older system, Intel(R) Processor Trace will not be
> available and there is no indication in the configure and build log as to
> what went wrong.
> 
> Check for a compatible linux/perf_event.h at configure-time.


> diff --git a/gdb/configure.ac b/gdb/configure.ac
> index 905c27b..d867e85 100644
> --- a/gdb/configure.ac
> +++ b/gdb/configure.ac
> @@ -1252,6 +1252,20 @@ if test "${with_intel_pt}" = no; then
>    AC_MSG_WARN([Intel(R) Processor Trace support disabled; some features may be unavailable.])
>    HAVE_LIBIPT=no
>  else
> +  AC_PREPROC_IFELSE(AC_LANG_SOURCE([[
> +#include <linux/perf_event.h>
> +#ifdef PERF_ATTR_SIZE_VER5
> +# error
> +#endif

Can you explain what kind of symbol PERF_ATTR_SIZE_VER5 is?
>From the patch, I understand that that is something that is _not_
defined in the perf versions that are supposedly supported?
(otherwise, I'd expect an #ifndef instead.)

What about these? :

nat/linux-btrace.c:722:#if defined (PERF_ATTR_SIZE_VER5)
nat/linux-btrace.c:739:#endif /* defined (PERF_ATTR_SIZE_VER5) */
nat/linux-btrace.c:759:#if defined (PERF_ATTR_SIZE_VER5)
nat/linux-btrace.c:872:#else /* !defined (PERF_ATTR_SIZE_VER5) */
nat/linux-btrace.c:881:#endif /* !defined (PERF_ATTR_SIZE_VER5) */

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]