summaryrefslogtreecommitdiff
path: root/tools/perf/feature-tests.mak
AgeCommit message (Collapse)Author
2011-04-19perf tools: git mv tools/perf/{features-tests.mak,config/}Michael Witten
Signed-off-by: Michael Witten <mfwitten@gmail.com> Link: http://lkml.kernel.org/n/tip-a6zhefjayuounko1tk5sjji2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-04-19perf tools: Move `try-cc'Michael Witten
The `try-cc' user-defined function was in tools/perf/feature-tests.mak; this commit moves it to tools/perf/config/utilities.mak. Signed-off-by: Michael Witten <mfwitten@gmail.com> Link: http://lkml.kernel.org/n/tip-bqhwcuxsrve0iodn6q4ejaoi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-04-19perf tools: Makefile: PYTHON{,_CONFIG} to bandage Python 3 incompatibilityMichael Witten
Currently, Python 3 is not supported by perf's code; this can cause the build to fail for systems that have Python 3 installed as the default python: python{,-config} The Correct Solution is to write compatibility code so that Python 3 works out-of-the-box. However, users often have an ancillary Python 2 installed: python2{,-config} Therefore, a quick fix is to allow the user to specify those ancillary paths as the python binaries that Makefile should use, thereby avoiding Python 3 altogether; as an added benefit, the Python binaries may be installed in non-standard locations without the need for updating any PATH variable. This commit adds the ability to set PYTHON and/or PYTHON_CONFIG either as environment variables or as make variables on the command line; the paths may be relative, and usually only PYTHON is necessary in order for PYTHON_CONFIG to be defined implicitly. Some rudimentary error checking is performed when the user explicitly specifies a value for any of these variables. In addition, this commit introduces significantly robust makefile infrastructure for working with paths and communicating with the shell; it's currently only used for handling Python, but I hope it will prove useful in refactoring the makefiles. Thanks to: Raghavendra D Prabhu <rprabhu@wnohang.net> for motivating this patch. Acked-by: Raghavendra D Prabhu <rprabhu@wnohang.net> Link: http://lkml.kernel.org/r/e987828e-87ec-4973-95e7-47f10f5d9bab-mfwitten@gmail.com Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-11-19perf tools: Remove hardcoded include paths for elfutilsRobert Morell
This change removes the use of hardcoded absolute "/usr/include/elfutils" paths from the perf build. The problem with hardcoded paths is that it prevents them from being overridden by $prefix or by -I in CFLAGS (e.g., for cross-compiling purposes). Instead, just include the "elfutils/" subdirectory as a relative path when files are needed from that directory. Tested by building perf: - Cross-compiled for ARM on x86_64 - Built natively on x86_64 - Built on x86_64 with /usr/include/elfutils moved to another location and manually included in CFLAGS Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> LKML-Reference: <1289945793-31441-1-git-send-email-rmorell@nvidia.com> Signed-off-by: Robert Morell <rmorell@nvidia.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-08-25Merge branch 'linus' into perf/coreIngo Molnar
Merge reason: pick up perf fixes Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-08-21perf tools: add test for strlcpy()Kirill A. Shutemov
Some Linux distributions like ALT Linux provides patched glibc with contains strlcpy(). It's confilcts with strlcpy() from perf. Let's add check for strlcpy(). Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu> LKML-Reference: <1282351101-8879-1-git-send-email-kirill@shutemov.name> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-08-18perf tools: Fix build error on read only source.Kusanagi Kouichi
Parts of the build process were generating files outside the specified O= directory, causing the build to fail on systems where the sources are in a read only file system. Fix it by using $(OUTPUT) on these locations. Also check that $(OUTPUT) actually exists, just like the top level kernel Makefile does. Otherwise the failure message emitted is completely misleading. Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20100817140841.0859362C03A@msa106.auone-net.jp> Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-06-09perf tools: Reorganize the Makefile feature testsArnaldo Carvalho de Melo
Moving the tests to a separate file, feature-tests.mak and using a try-cc function similar to the try-run in Kbuild. This also makes the output more quiet as we can stop using the INTERMEDIATE target to remove the .perf.dev.null file needed for some gcc versions where /dev/null can't be used as the output file name. As the tests get shorter by uninlining the source code used to test for features, we can more properly use identation. The feature tests itself can be made more clear and reused, like when trying to see what is needed to have bfd_demangle. We also get a bit closer to reusing scripts/Kbuild.include, reducing the distance from the kernel build system. Tests performed: [root@emilia perf]# make -j9 O=/tmp/perf PERF_VERSION = 0.0.2.PERF GEN /tmp/perf/common-cmds.h * new build flags or prefix GEN perf-archive CC /tmp/perf/builtin-annotate.o CC /tmp/perf/bench/sched-messaging.o CC /tmp/perf/builtin-diff.o <SNIP> CC /tmp/perf/scripts/python/Perf-Trace-Util/Context.o CC /tmp/perf/perf.o CC /tmp/perf/builtin-help.o AR /tmp/perf/libperf.a LINK /tmp/perf/perf [root@emilia perf]# If we uninstall, for instance newt-devel we get: [root@emilia perf]# rpm -e newt-devel [root@emilia perf]# make -j9 O=/tmp/perf Makefile:564: newt not found, disables TUI support. Please install newt-devel or libnewt-dev * new build flags or prefix GEN perf-archive CC /tmp/perf/perf.o CC /tmp/perf/builtin-annotate.o <SNIP> AR /tmp/perf/libperf.a LINK /tmp/perf/perf [root@emilia perf]# And then binutils-devel: [root@emilia perf]# make -j9 O=/tmp/perf Makefile:564: newt not found, disables TUI support. Please install newt-devel or libnewt-dev Makefile:632: No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling * new build flags or prefix GEN perf-archive CC /tmp/perf/perf.o <SNIP> AR /tmp/perf/libperf.a LINK /tmp/perf/perf [root@emilia perf]# And then strictly required devel packages: [root@emilia perf]# rpm -e elfutils-libelf-devel elfutils-devel [root@emilia perf]# make -j9 O=/tmp/perf Makefile:509: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev Makefile:542: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel. Stop. [root@emilia perf]# After installing everything back on: [root@emilia perf]# yum install elfutils-devel binutils-devel newt-devel <SNIP> Installed: binutils-devel.x86_64 0:2.20.51.0.2-5.11.el6 elfutils-devel.x86_64 0:0.147-1.el6 elfutils-libelf-devel.x86_64 0:0.147-1.el6 newt-devel.x86_64 0:0.52.11-1.el6 Complete! [root@emilia perf]# make -j9 PERF_VERSION = 0.0.2.PERF GEN common-cmds.h * new build flags or prefix GEN perf-archive CC builtin-annotate.o <SNIP> AR libperf.a LINK perf [root@emilia perf]# make -j9 [root@emilia perf]# Thanks to Sam for pointing me to try-run. Cc: David S. Miller <davem@davemloft.net> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Michal Marek <mmarek@suse.cz> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>