perf: Auto-detect libbfd
Since the C++ demangling isn't needed for everybody and bfd/iberty aren't widely/easily available on all machines, make it optional. It also allows you to forcefully disable demangling by using NO_DEMANGLE=1 and otherwise tries to detect libbfd/libiberty combinations that result in a compiling demangler. Reported-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Kyle McMartin <kyle@mcmartin.ca> LKML-Reference: <20090801082048.GX12579@kernel.dk> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:

committed by
Ingo Molnar

parent
114cfab222
commit
2cdbc46d7b
@@ -6,7 +6,16 @@
|
||||
#include <libelf.h>
|
||||
#include <gelf.h>
|
||||
#include <elf.h>
|
||||
|
||||
#ifndef NO_DEMANGLE
|
||||
#include <bfd.h>
|
||||
#else
|
||||
static inline
|
||||
char *bfd_demangle(void __used *v, const char __used *c, int __used i)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *sym_hist_filter;
|
||||
|
||||
|
Reference in New Issue
Block a user